Linux环境PureFTPd安装配置如下:
1、下载pure-ftpd源码包,解压
2、编译、安装、准备
进入解压好的源码目录
#配置编译参数,偷懒--everything
./configure --with-everything --with-language=simplified-chinese
#编译、安装
make
make install
#设置配置工具
chmod 755 configuration-file/pure-config.pl
cp configuration-file/pure-config.pl /usr/local/sbin/
cp configuration-file/pure-ftpd.conf /etc/
#配置自动启动脚本,采用官方编译样例,写得确实比较一般
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
修改执行权限
chmod a+x /etc/rc.d/init.d/pure-ftpd
进入setup工具,配置自动启动
通过文章我们看出Pureftpd安装配置挺简单的。希望对你们有帮助!
【编辑推荐】