=======================安装ProFTPD
vi /etc/fstab
文件加入 /var/www /home none bind
vi /etc/yum.repos.d/dag.repo
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
# Load modules for sql support
LoadModule mod_sql.c
LoadModule mod_sql_mysql.c
ServerName "Servername"
ServerType standalone
ServerIdent on "Servers identifying string"
DeferWelcome off
DefaultServer on
DefaultRoot ~ !adm
AllowOverwrite on
UseReverseDNS off
IdentLookups off
Port 21
Umask 022
MaxInstances 15
MaxClientsPerHost 3 "Only %m connections per host allowed"
MaxClients 10 "Only %m total simultanious logins allowed"
MaxHostsPerUser 1
# Define log-files to use
TransferLog /var/log/proftpd/xferlog
ExtendedLog /var/log/proftpd/access_log WRITE,READ write
ExtendedLog /var/log/proftpd/auth_log AUTH auth
ExtendedLog /var/log/proftpd/paranoid_log ALL default
SQLLogFile /var/log/proftpd/mysql
# Set up authentication via SQL
# ===========
AuthOrder mod_sql.c
SQLAuthTypes Crypt
SQLConnectInfo ftp@localhost ftp proftpaddjlp1114
SQLUserInfo users username passwd uid gid homedir shell
SQLGroupInfo groups groupname gid members
#SQLUserWhereClause "disabled=0 and (NOW()<=expiration or expiration=-1 or expiration=0)"
#SQLHomedirOnDemand on
# Log the user logging in
SQLLog PASS counter
SQLNamedQuery counter UPDATE "lastlogin=now(), count=count+1 WHERE username='%u'" users
# display last login time when PASS command is given
SQLNamedQuery login_time SELECT "lastlogin from users where username='%u'"
SQLShowInfo PASS "230" "Last login was: %{login_time}"