Proftpd learning notes (1)
In these days, the company finally had a holiday, and finally I can take some Proftp MySQL quota.
Before installing Proftp, you must do a job first. If your MySQL is compiled by yourself, you must first modify /etc/ld.so.conf, otherwise run the Proftp later error. vi /etc/ld.so.conf
Add below:
/ usr / local / mysql / lib / mysql
Note that if you are different from Mysql installation path, fill in the corresponding path, please refer to "Linux Apache MySQL PHP Typical Configuration" for MySQL.
1. Download related software
Wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.9.tar.gz
Download Proftp's latest version 1.2.9
Wget http://www.castaglia.org/proftpd/modules/proftpd-mod-quotatab-1.2.11.tar.gz
This is a module that matches the disk limit of Proftp
2. Decompression compilation
TAR ZVXF Proftpd-1.2.9.tar.gz
TAR ZVXF PrOFTPD-Mod-quotatab-1.2.11.tar.gz
CP MOD_QUTATAB / *. C PROFTPD-1.2.9 / Contrib /
CP MOD_QUTATAB / *. H ProftPD-1.2.9 / Contrib /
Vi ProftPD-1.2.9 / Contrib / MOD_SQL_MYSQL.C
Find #include #include
This line, change mysql.h into your path where this file is located, such as /usr/local/mysql/include/mysql/mysql.h
Compile:
./configure /
--Prefix = / usr / local / proFTPD /
--with-modules = mod_sql: MOD_SQL_MYSQL: MOD_QUTATAB /
: mod_quotatab_sql: mod_ratio /
--with-incrudes = / usr / local / mysql / incrude / mysql /
--with-libraries = / usr / local / mysql / lib / mysql
Make
Make Install
Here we compiled the support of Mysql, Quota, Ratio and other modules, I will tell their application later.
OK, now we can start Proftp, as long as
/ usr / local / proFTPD / SBIN / PROFTPD
With your FTP client test, you should log in normally, including anonymity and Linux username.
In fact, the default proFTP meets daily server management or more than enough, there is a place or modification, it is the default PROFTP configuration file does not support FTP renewal, so we only need
Vi /usr/local/proftpd/etc/proftpd.conf
Add the following two lines
ALLOWRETRIEVERESTART ON
ALLOWSTORERESTART ON
Restart the following PROFTP, you can renew the file normally.
Create a ProftPd script
As long as the source code directory of Proftp
CP proftpd-1.2.9 / contrib / dist / rpm / proFTPd.init.d /etc/rc.d/initis d pp
Remember to modify the proFTPD file, generally modify the actual path of ProftPD
Chmod 755 /etc/rc.d/init.d/proftpd
OK