PROFTPD Learning Notes (i)

Source: Internet
Author: User
Tags add ftp include modify mysql ftp client linux
Notes these days, the company finally had a holiday, finally can be a good heart to learn some proftp+mysql+quota.

Install proftp before, you must do a job, if your MySQL is compiled by itself, it must first modify the/etc/ld.so.conf, otherwise run PROFTP will be an error.
Vi/etc/ld.so.conf

Add the following line:

/usr/local/mysql/lib/mysql


Note that if the MySQL installation path is not the same as mine, then fill in the appropriate path, the compilation of MySQL installation please refer to the "linux+apache+mysql+php typical configuration."

1. Download related software

wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.9.tar.gz

Download the latest version of ProFTP 1.2.9

wget http://www.castaglia.org/proftpd/modules/proftpd-mod-quotatab-1.2.11.tar.gz

This is the module that fits the PROFTP disk quota.

2. Decompression compilation

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

Find the #include line and change the mysql.h to the path of this file on your system, such as/usr/local/mysql/include/mysql/mysql.h

Compile:

./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/mysql \
--with-libraries=/usr/local/mysql/lib/mysql

Make

Make install

Here we compile the time has been added to the support of modules such as Mysql,quota,ratio, I will talk about their application in the later

OK, now we can start the proftp, as long as

/usr/local/proftpd/sbin/proftpd

Use your FTP client to test the following, should be able to log on normally, including anonymous and Linux username can be.

In fact, the default ProFTP to meet the day-to-day management of the server or more than enough, there is a place to modify it, is the default ProFTP profile does not support FTP retransmission, so we just

Vi/usr/local/proftpd/etc/proftpd.conf

Add the following two lines

Allowretrieverestart on
Allowstorerestart on

After restarting the following proftp, the file can be resumed normally.

Creating PROFTPD Scripts

Just in the ProFTP source directory

CP PROFTPD-1.2.9/CONTRIB/DIST/RPM/PROFTPD.INIT.D/ETC/RC.D/INIT.D/PROFTPD

Remember to modify the proftpd file, generally to modify the actual path of the PROFTPD

chmod 755/etc/rc.d/init.d/proftpd

Ok

Then you can use this to start, stop, reboot proftp

Oh, today to say these, tomorrow to talk about some of the basic configuration of proftp:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.