cd proftpd-1.3.2 #进入源码包
./configure --prefix=/home/ftp/proftpd #编译安装路径
make && make install #编译二进制码和安装
cp contrib/dist/rpm/proftpd.init.d /etc/init.d/proftpd #【拷贝启动文件,是为了方便用service proftpd start 来启动ftp服务】
chmod o+x /etc/rc.d/init.d/proftpd #给启动脚本执行权限
vi /etc/init.d/proftpd #修改启动文件错误的路径
######################################################
#!/bin/sh
#
# Startup script for ProFTPD
#
# chkconfig: 345 85 15
# description: ProFTPD is an enhanced FTP server with \
# a focus toward simplicity, security, and ease of configuration. \
# It features a very Apache-like configuration syntax, \
# and a highly customizable server infrastructure, \
# including support for multiple 'virtual' FTP servers, \
# anonymous FTP, and permission-based directory visibility.
# processname: proftpd
# config: /home/ftp/proftpd/etc/proftpd.conf #路径如果不正确需要修改
#
# By: Osman Elliyasa <osman@Cable.EU.org>
# $Id: proftpd.init.d,v 1.7 2002/12/07 21:50:27 jwm Exp $
. /etc/rc.d/init.d/functions
. /etc/sysconfig/proftpd
fi
#########################################################
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.
ServerType standalone
DefaultServer on
Port 21 #制定端口
UseIPv6 off #关闭ip6
# from being group and world writable.
Umask 002 #给上传文件权限
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 30 #最大连接数
User nobody #指定启动用户
Group nobody#制定启动组
# directory, uncomment this line.
DefaultRoot ~ !admin#指定能访问全部服务器资源的权限
AllowOverwrite on #权限设置
IdentLookups off
<Limit SITE_CHMOD>
DenyAll
</Limit>