Detailed installation and configuration process for pureftpd _ MySQL

Source: Internet
Author: User
Tags ftp connection
In the installation and configuration process of pureftpd, FTP is always indispensable. over the years, we have been accustomed to using pureftp and haven't installed it for a long time. find the documents we wrote before. By the way, we will integrate the documents into ttlsa, for more information, see. I used to write my own documents.

Prepare pureftp
#cd /usr/local/src/#wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.22.tar.gz#tar –xzvf pure-ftpd-1.0.22.tar.gz
Compile and install
# Cd pure-ftpd-1.0.22 #. configure/-prefix =/usr/local/pureftpd // pureftpd installation directory-with-everything /// install almost all functions, including altlog, cookies, throttling, ratios, ftpwho, upload script, virtual users (puredb), quotas, virtual hosts, directory aliases, external authentication, Bonjour, privilege separation this installation only uses this option. -- With-cookie // when a user logs on, the specified banner is displayed -- with-diraliases // Directory alias is supported, use a shortcut to generate a cd command -- with-extauth // compile a module that supports extended verification. most users do not use this option -- with-ftpwho // supports the pure-ftpwho command, enabling this function requires more additional memory -- with-language = english // modify the server language. the default memory is english. if you want to modify it, translate the 'src/messages_en.h 'file -- with-ldap // LADP directory support. openldap -- with-minimal // FTP installation is required, the most basic feature-with-mysql // MySQL support. if MySQL is installed in a custom directory, you need to run the command-with-mysql =/usr/local/mysq -- with-nonroot // you can start the service without the need of a root user # make install
Install the configuration file
# Cd/usr/local/src/pure-ftpd-1.0.22 // switch to the source directory # cd configuration-files // switch to this directory # chmod 755 pure-config.pl // give users full permissions (because no execution permission) # cp pure-config-pl/usr/local/pureftpd/bin // Copy the execution file to the bin directory # mkdir/usr/local/pureftpd/etc // create FTP configuration folder directory # cp pure-ftpd.conf/usr/local/pureftpd/etc // Copy ftp configuration file to etc # cd .. // switch to the/pure-ftpd-1.0.22 Directory # cp pureftpd-ldap.conf/usr/local/pureftpd/etc // Copy the related configuration file to the etc # cp pureftpd-mysql.conf/usr/local/pureftpd/etc // related copy configuration file to etc # cp pureftpd-pgsql.conf/usr/local/pureftpd/etc // related configuration file to etc
Pure-ftpd.conf configuration
ChrootEveryoneyes // lock all users in the home directory # TrustedGID100 // Trust group ID100, maxClientsNumber50 // maximum number of clients cannot be locked MaxClientsPerIP 8 // the same IP allows eight connections DisplayDotFiles no // no hidden file AnonymousOnly no // only anonymous user NoAnonymous yes/ /do not allow anonymous users DontResolve yes // disable reverse resolution MaxIdleTime 10 // Max idle 10 min # LDAPConfigFile/etc/pureftpd-ldap.conf // LDAP configuration file directory # MySQLConfigFile/etc/pureftpd-mysql.conf // mySQL configuration file directory # PGSQLConfigFile/etc/pureftpd-pgsql.conf // PGSQL configuration file directory PureDB/usr/local/pureftpd/etc/pureftpd. pdb // virtual user database # UnixAuthenticationyes // host authentication LimitRecursion2000 8 // The table displays a maximum of 2000 files, maximum 8 directories: AnonymousCanCreateDirsno // allows anonymous users to create directories # MaxLoad 4 // maximum number of downloadable directories # PassivePortRange30000 50000 // The Port range for active connection is ForcePassiveIP192.168.0.1 // This address is always anonymous Directory # AnonymousRatio1 10 // upload/download speed ratio of anonymous users # UserRatio 1 10 // user upload/download speed ratio # Bind127.0.0.1, 21 // bind the IP address and port # AnonymousBandwidth8 // Anonymous user bandwidth 8KB # UserBandwidth 8 // user bandwidth 8 KBUmask 133: 022 // The umaskMinUID1000 file and directory must have a user ID greater than 1000 to log on to AllowUserFXPno // whether to allow users to log on to AllowAnonymousFXP no // whether anonymous users can use the FXP protocol ProhibitDotFilesWrite // whether to allow writing to the point file ProhibitDotFilesReadno // whether to allow reading the point file AnonymousCantUpload yes // not allow anonymous users to upload # NoChmod yes // do not allow users to change permissions # KeepAllFilesyes // allow users resumable Upload # Quota 1000:10 // disk Quota # MaxDiskUsage 99 // maximum disk utilization # NoRenameyes // automatic renaming of limit 4only yes // only IPV4 protocol is allowed
Create a virtual user

Note: Before creating a virtual user, you must create a combined user (on the operating system ).

# Groupadd ftpgroup // create a system Group # useradd-g ftpgroup-d/dev/null-s/sbin/nologin ftpuser // add a new user to ftpgroup # cd/usr/local/ pureftpd/bin // switch to the bin directory #. /pure-pw useradd puser-u ftpuser-d/www/ftptest-m // pure-pw useradd virtual username-u parasitic to system username-d FTP directory-m (put user add the password to the PDB database, no need to restart FTP) # cd/www // switch to WWW # chmod-R ftpuser: ftpgroup ftptest // change the user and group of the FTP directory to the system user and group that the virtual user depends on
Start test
#/usr/local/pureftpd/bin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.confRunning: /usr/local/pureftpd/sbin/pure-ftpd -A -c50 -B -C8 -E -fftp -H -I10 -lpuredb:/usr/local/pureftpd/etc/pureftpd.pdb -L2000:8 -s -U133:022 -u1000 -i -Z -4

Note: If running occurs, the startup is successful.

Next, test the ftP connection.

Article title: address of this article: Unless specified, blog posts are original "O & M survival time". For more information, please indicate the address of this article.

Q Group: 39514058

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.