First, the system support system needs to be installed with Mysql Apache DNS (optional). Second, prepare the software FTPD Server:
Pure-ftpd-1.0.20.tar.gz
Pureftpd_php_manager:
Pureftpd_php_manager.tar.gz
Third, custom installation 1: Decompress the two files where the downloaded file is located. # CD Download # tar zxvf pure-ftpd-1.0.20.tar.gz # tar zxvf pureft_php_manager.tar.gz2: Compile #CD pure-ftpd- 1.0.20 #. / Configure / - prefix = / usr / local / pureftpd / - with-mysql = / usr / local / mysql / - with-paradow / - with-welcoMSG / --With-Uploadscript / - With-Quotas / - with-cookie / - with-Pam / - VirtualHosts / - With-VirtualRoot / - with-diraliases / - with-sysquotas / WITH-RATIOS / - with-ftpwho / - with-throttling / - with-language = Simplified-Chinese --------------- >> Socket session shows the language of information displayed By English, Simplified-Chinese Simplified Chinese, Traditional-Chinese Big5 Traditional Chinese --with-mysql = / usr / local / mysql / usSQL This / usr / local / mysql is changed to your MySQL actual installation path. If you appear configure: error: Your MySQL Client Libraries Aren't Properly Installed error, please connect the mysql.h file under the mysql directory in the mysql.h file and all files under lib / mysql (directly copy past perhaps Can be) to / usr / lib directory 3: Installation # make # make checkpd-mysql.conf / usr / local / etc / # cd configuration-file # chmod u x pure-config.pl # CP pure-config.pl / usr / local / sbin / # cp / usr / local / pureft / sbin / pur E-ftpwho / usr / local / sbin / # cp pure-ftpd.conf / usr / local / etc / copy pureft_php_manager directory to the website directory cp -r pureft_php_manager / opt / www / pureft_php_manager
Fourth, configure service 1: Editor /usR/local/etc/pure-ftpd.conf file to find #createHomedir yes to change to createHomedir YES effect is, user login, if the primary directory does not exist, it is automatically established. Find uMask 133: 022 Set the default properties of the new file for Umask 755: 755. Find # mysqlconfigfile /etc/pureftpd-mysql.conf to mysqlconfile /usr/local/etc/pureftpd-mysql.conf Set the parameters of the FTPD service to get the pureft-mysql .conf file set #################################################################################################################################################################################################################################################################################################### Is such that
Source code:
#############################################################
# ## Sample pure-ftpd mysql configuration file. #
# See readme.mysql for expembions. #
# # # # # # #
#############################################################
# Optional: MySQL Server Name OR IP. Don't define this for UNIX Sockets.
MySQLServer Localhost
#server address
# Optional: mysql port. Don't define this if a local unix socket is used.
Mysqlport 3306
# Server port
# Optional: Define the location of mysql.sock if the server runs on this host.
Mysqlsocket /opt/mysql/var/mysql.sock
# 这里 换 换 真 真 地址
# Mandatory: User to bind the server as.
Mysqluser root
#Login server username
# Mandatory: User password. You Must Have a password.
MySQLPassword 123456
#Logue server password
# Mandatory: Database to open.
MySQLDATABASE FTPD
# Profile the database where the file is located
# Mandatory: How Passwords Are Stored
# Valid Values Are: "Cleartext", "CRYPT", "MD5" and "password"
# ("Password" = mysql password () function)
# You can also use "any" to try "crypt", "md5" * and * "password"
Mysqlcrypt Cleartext
#Ways of identifying
# In The Following Directives, Parts of The Strings Are Replaced At
# Run-time before performing queries:
#
# / L is replaced by the login of the user trying to automate.
# / I is replaced by the ip address the user connection.
# / P is replaced by the port number the user connection.
# / R is replaced by the ip address the user connection from.
# / D is replaced by The Remote IP Address, AS A Long Decimal Number.
#
# Very Complex Queries Can Be Performed Using these Substitution Strings,
# especially for virtual hosting.
# Query to execute in order to fetch the password
MySQLGETPW SELECT Password from users where user = "/ l" and status = "1"
# Log in to the user password verification field of the server, status = "1" is required for this user to activate mode.
# Query to execute in Order to fetch the system user name or uid
MysqlgetUid select uid from users where user = "/ l"
# User's UID
# Optional: Default Uid - IF Set this overrides mysqlgetuid
#Mysqldefaultuid 1000
# Query to execute in Order to fetch the system user group or gid
MySQLGETGID SELECT GID from users where user = "/ l"
# 用户 用户 GID
# Optional: Default Gid - IF Set this overrides mysqlgetgid
#Mysqldefaultgid 1000
# Query to execute in Order to Fetch The Home Directory
Mysqlgetdir Select Dir from users where user = "/ l"
# 用户 主 主目
# Optional: Query To Get The maximal number of files
# Pure-ftpd Must Have Been Compiled with Virtual Quotas Support.
MySQLGETQTAFS SELECT Quotafiles from users where user = "/ l"
# 用户 用户 的 最 最
#Botional: query to get the maximal disk usage (virtual quotas)
# The number shen megabytes.
# Pure-ftpd Must Have Been Compiled with Virtual Quotas Support.
MySQLGETQTASZ SELECT Quotasize from users where user = "/ l"
# 用户 的 用户 最 空 空间
# Optional: Ratios. The Server Has To BE Compiled with Ratio Support.
MySQLGETRATIOUL SELECT ULBANDWIDTH from users where user = "/ l"
MySQLGETRATIODL SELECT DLBANDWIDTH from users where user = "/ l"
# Two items, users upload and download speed, unit KB / S
#Boptional: Bandwidth Throttling.
# The Server Has To Be Compiled with THROTTLING Support.
# Values are in kb / s.
# Mysqlgetbandwidthul select ulbandwidth from users where user = "/ l"
# Mysqlgetbandwidthdl select dlbandwidth from users where user = "/ l"
# Enable ~ Expansion. Never Enable this BLINDLY UNSS: # 1) You know what you are doing.
# 2) REAL AND Virtual Users Match.
# MySQLForCetildeExpansion 1
# If You Upgraded your Tables to Transactionnal Tables (Gemini,
# BerkeleyDB, Innobase ...), you can enable SQL Transactions to
# Avoid Races. Leave this commented if you are use
# Traditionnal Myisam Databases or ORD (<3.23.x) mysql version.
# Mysqltransactions on
Save and exit Please modify it. Or directly find the wrong copy. 3: Modify /opt/www/pureftpd_php_manager/index.php file #unzip -d pureft_php_manager pureft_php_php_manager note: Because I have written pureftpd-mysql.conf so here without moving #mv pureftpd-mysql.conf.sample /usr/local/etc/pureftpd-mysql.conf#cp -R pureftpd_php_manager / var / wwwroot / html / pureftpd_php_manager # cd / var / wwwroot / HTML / PUREFTPD_PHP_MANAGER # vi pureftp.config.php modification: /opt/www/pureftpd_php_manager/pureftp.config.php file
Source code:
#######################################
####### setup ########
#######################################
// Set the location of the pureftpd-mysql.conf, this should be noted, don't write wrong.
$ Pureftp_config_file = '/usr/local/etc/pureftpd-mysql.conf';
// the location where all the forms directed to. (Mayby No change Need)
$ Self_URL = 'Index.php';
// the location of your pure-ftpdwho binary 4711)
$ Ftp_who = "/ usr / local / sbin / pure-ftpwho";
##############################
# Default new-user params #
##############################
$ Db_table = 'users'; # new increase variable, define data table name
$ Defaultuser = "ftpuser"; # default user
$ Defaultpass = "passwd"; # default initial user password
$ Defaultuid = "2004"; # default UID (set to apache's UID, your perhaps not 48, can be used for PHP to set up) $ defaultGid = "2004"; # default GID (set to apache) GID, you may not be 48, the directory established for PHP can be used normally)
$ Defaultdir = "/ var / ftproot / ftpusershome"; # default user home directory
$ Defaultul = "0"; # default user upload speed limit (KB / S)
$ Defaultdl = "0"; # default user download rate limit (KB / S)
$ DEFAULTIP = "*"; # Set which IP can log in
$ Defaultqs = "50"; # User default quota
$ Defaultcmt = ""; # default note information
$ Defaultqf = "0"; # default file number quota
$ PWC = "55"; # vorsatz Fuerr Crypt Password