How to install and configure the Linux environment PureFTPd
This article mainly introduces how to install and configure PureFTPd in Linux environment, which is very detailed and has certain reference value. Friends who are interested must finish reading it!
The Linux environment PureFTPd installation configuration is as follows:
1. Download the pure-ftpd source code package and decompress it.
2. Compile, install, prepare
Enter the decompressed source directory
# configure compilation parameters and be lazy-- everything
. / configure-with-everything-with-language=simplified-chinese
# compile and install
Make
Make install
# set configuration tool
Chmod 755 configuration-file/pure-config.pl
Cp configuration-file/pure-config.pl / usr/local/sbin/
Cp configuration-file/pure-ftpd.conf / etc/
# configure the automatic startup script and use the official compilation sample, which is really ordinary.
Vi / etc/rc.d/init.d/pure-ftpd
#! / bin/bash
#
# script for the pure-ftpd FTP Server $Revision: 1.3$
#
# chkconfig: 2345 85 15
# description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd
# processname: pure-ftpd
# pidfile: / var/run/pure-ftpd.pid
# config: / etc/pure-ftpd.conf
# Source function library.
. / etc/rc.d/init.d/functions
RETVAL=0
# Path to the pure-ftp binaries.
Prog=pure-config.pl
Fullpath=/usr/local/sbin/$prog
Pureftpwho=/usr/local/sbin/pure-ftpwho
Start () {
Echo-n $"Starting $prog:"
$fullpath / etc/pure-ftpd.conf-- daemonize
RETVAL=$?
[$RETVAL = 0] & & touch / var/lock/subsys/$prog
Echo
}
Stop () {
Echo-n $"Stopping $prog:"
Kill $(cat / var/run/pure-ftpd.pid)
RETVAL=$?
[$RETVAL = 0] & & rm-f / var/lock/subsys/$prog
Echo
}
# See how we were called.
Case "$1" in
Start)
Start
Stop)
Stop
Restart)
Stop
Start
Condrestart)
If [- f / var/lock/subsys/$prog]; then
Stop
# avoid race
Sleep 3
Start
Fi
Status)
Status $prog
RETVAL=$?
If [- f $pureftpwho] & & [$RETVAL-eq 0]; then
$pureftpwho
Fi
*)
Echo $"Usage: $prog {start | stop | restart | condrestart | status}"
RETVAL=1
Esac
Exit $RETVAL
Modify execution permissions
Chmod axix / etc/rc.d/init.d/pure-ftpd
Enter the setup tool and configure automatic startup
These are all the contents of the article "how to install and configure PureFTPd in Linux Environment". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!