在眾多的FTP服務器中PROFTPD由於它的配置靈活
下載最新的軟件版本
#wgetftp:///distrib/source/proftpd
首先創建ROFTPD運行的用戶和組
#groupaddnogroup
#useradd?Cgnogroup?Cd/dev/null?Cs/sbin/nologinnobody
首先創建上傳下載的用戶和組
#groupaddftp
#useradd?Cgftp?Cd/home/down?Cs/sbin/nologindown
#useradd?Cgftp?Cd/home/upload?Cs/sbin/nologinupload
用戶密碼設置略
編譯安裝PROFRPD:
#tar?Czxvfproftpd
#cdproftpd
#
#make
#makeinstall
配置PROFTPD服務器
#vi/etc/nf
================+================+=================
#ThisisabasicProFTPDconfigurationfile(renameitto
#
#andasingleanonymouslogin
#
ServerName
ServerTypestandalone
DefaultServeron
AllowRetrieveRestarton
AllowStoreRestarton
ServerTypestandalone
ServerIdenton
SystemLog/var/log/proftpd
UseReverseDNSoff
IdentLookupsoff
RequireValidShelloff
#Port
Port
#Umask
#frombeinggroupandworldwritable
Umask
MaxInstances
#Settheuserandgroupunderwhichtheserverwillrun
Usernobody
Groupnogroup
#TocauseeveryFTPusertobe
#directory
DefaultRoot~
#Normally
AllowOverwriteon
#Wewant
#ineachnewlychdireddirectory
DisplayLogin
Dssage
#LimitUserofbeingenbledloginftpserver
AllowGroupftp
DenyAll
#########################ssl/tls############################
#MOD_TLSSETTING
TLSEngineon
TLSLog/var/log/proftpd
TLSProtocolSSLv
#AreclientsrequiredtouseFTPoverTLSwhentalkingtothisserver?
TLSRequiredctrl
#Server
TLSRSACertificateFile/etc/proftpd
TLSRSACertificateKeyFile/etc/proftpd
#AuthenticateclientsthatwanttouseFTPoverTLS
TLSVerifyClientoff
#########################ssl/tls############################
DenyGroupftp
TransferRateRETR
DenyGroupftp
TransferRateSTOR
MaxClientsPerHost
PassivePorts
================+================+=================
創建PROFTPD的日志文件
#touch/var/log/proftpd
#touch/var/log/proftpd
#chownnobody:nogroup/var/log/proftpd
創建SSL傳輸的證書和密匙
#cp/usr/share/ssl/f
#opensslreq
這裡安裝提示需要輸入證書信息略
把證書和密匙復制到指定目錄
#cpproftpd
最後創建PROFTPD啟動教本
#vi/etc/init
================+================+=================
#!/bin/sh
#StartupscriptforProFTPD
#chkconfig:
#description:ProFTPDisanenhancedFTPserver
#processname:proftpd
#config:/etc/nf
#Sourcefunctionlibrary
if;then
fi
PATH=
#Seehowwewerecalled
case
start)
echo
daemonproftpd$OPTIONS
echo
touch/var/lock/subsys/proftpd
;;
stop)
echo
killprocproftpd
echo
rm
;;
status)
statusproftpd
;;
restart)
$
$
;;
reread)
echo
killprocproftpd
echo
;;
suspend)
hashftpshut>/dev/null
if;then
if;then
shift
echo
ftpshut$*
else
echo
ftpshutnow
fi
else
echo
fi
echo
;;
resume)
if;then
echo
rm
else
echo
fi
echo
;;
*)
echo
hashftpshut
if;then
echo
else
echo
echo
fi
exit
esac
if;then
shift
$
fi
exit
================+================+=================
#chomd
#chkconfig–
#chkconfigproftpdon
到這裡ftp服務器端安裝設置完畢
如下圖所示
alt=
alt=
From:http://tw.wingwit.com/Article/os/fwq/201404/30364.html