Linux环境PureFTPd如何安装配置
这篇文章主要介绍Linux环境PureFTPd如何安装配置,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
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工具,配置自动启动
以上是"Linux环境PureFTPd如何安装配置"这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!