步骤如下: 代码:
¢ vi /etc/ld.so.conf 添加:/usr/local/mysql/lib
tar zvxf proftpd-1.2.9.tar.gz tar zvxf proftpd-mod-quotatab-1.2.11.tar.gz cp mod_quotatab/*.c proftpd-1.2.9/contrib/ cp mod_quotatab/*.h proftpd-1.2.9/contrib/ vi proftpd-1.2.9/contrib/mod_sql_mysql.c #include</usr/local/mysql/include/mysql/mysql.h> 修改mysql.h的实际路径 cd proftpd-1.2.9 ./configure \--prefix=/usr/local/proftpd \--with-modules=mod_sql:mod_sql_mysql:mod_quotatab\:mod_quotatab_sql:mod_ratio \--with-includes=/usr/local/mysql/include \--with-libraries=/usr/local/mysql/lib make make install cp proftpd-1.2.9/contrib/dist/rpm/proftpd.init.d /etc/rc.d/init.d/proftpd vi /etc/rc.d/init.d/proftpd 修改:PATH="$PATH:/usr/local/proftpd/sbin" chmod 755 /etc/rc.d/init.d/proftpd chkconfig --level 3 proftpd on groupadd -g 5500 ftpgroup adduser -u 5500 -s /bin/false -d /bin/null -c "proftpd user" -g ftpgroup ftpuser 然后配置你的Proftpd.conf 最后就是启动啦。/usr/local/proftpd/sbin/proftpd
-------------------------------Proftpd.conf---------------------------------- 代码: # This is a basic ProFTPD configuration file (rename it to # ''''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.
ServerName "ltsnet" ServerType standalone DefaultServer on
# Port 21 is the standard FTP port. Port 21
# Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable. Umask 022
# To prevent DoS attacks, set the maximum number of child processes # 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
# Set the user and group under which the server will run. User nobody Group nobody
# To cause every FTP user to be "jailed" (chrooted) into their home # directory, uncomment this line. ServerIdent off DisplayLogin welcome.msg DefaultRoot ~ # Normally, we want files to be overwriteable. <Directory /> AllowOverwrite on </Directory>
# A basic anonymous configuration, no upload directories. If you do not # want anonymous users, simply delete this entire <Anonymous> section. <Anonymous /home/ftp> User ftp Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous ftp
# Limit the maximum number of anonymous logins MaxClients 10
# We want ''''welcome.msg'''' displayed at login, and ''''.message'''' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message
# Limit WRITE everywhere in the anonymous chroot <Limit WRITE> DenyAll </Limit> </Anonymous>