自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

CentOS平臺(tái)下pureftpd搭建

運(yùn)維 系統(tǒng)運(yùn)維
CentOS平臺(tái)下pureftpd搭建:CentOS下配置pureftpd還是比較常用的,這里所講解CentOS平臺(tái)下pureftpd搭建。那么該如何在CentOS平臺(tái)下pureftpd搭建?本章將一一簡(jiǎn)述。

  一、系統(tǒng):  CentOS 5.3

  二、軟件以及下載地址

  pure-ftpd-1.0.24.tar.gz

  ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.24.tar.gz

  三、說明:用來控制用戶的ftp上傳功能,僅允許ftp用戶在自己的目錄文件下操作其網(wǎng)站。前提:CentOS 5.3具有搭建好的LAMP環(huán)境。

  四、搭建環(huán)境

  1、編譯安裝pureftp 源代碼http://www.pureftpd.org/

  [root@localhost src]$ wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.24.tar.gz

  --16:21:29-- ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.24.tar.gz

  => `pure-ftpd-1.0.24.tar.gz.1'

  正在解析主機(jī) ftp.pureftpd.org... 91.121.49.42

  Connecting to ftp.pureftpd.org|91.121.49.42|:21... 已連接。

  正在以 anonymous 登錄 ... 登錄成功!

  ==> SYST ... 完成。 ==> PWD ... 完成。

  ==> TYPE I ... 完成。 ==> CWD /pub/pure-ftpd/releases ... 完成。

  ==> SIZE pure-ftpd-1.0.24.tar.gz ... 560565

  ==> PASV ... 完成。 ==> RETR pure-ftpd-1.0.24.tar.gz ... 完成。

  長(zhǎng)度:560565 (547K)

 

  1.   100%[=======================================>] 560,565 10.5K/s in 28s  
  2.  
  3.   16:22:04 (19.3 KB/s) - `pure-ftpd-1.0.24.tar.gz.1' saved [560565]  
  4.  
  5.   [root@localhost src]$tar zxvf pure-ftpd-1.0.24.tar.gz  
  6.  
  7.   pure-ftpd-1.0.24/  
  8.  
  9.   pure-ftpd-1.0.24/aclocal.m4  
  10.  
  11.   … …  
  12.  
  13.   pure-ftpd-1.0.24/configuration-file/pure-config.py.in  
  14.  
  15.   pure-ftpd-1.0.24/configuration-file/pure-ftpd.conf.in  
  16.  
  17.   [root@localhost pure-ftpd-1.0.24]#  
  18.  

   如果出現(xiàn)類似configure: error: Your MySQL client libraries aren't properly installed 的錯(cuò)誤,將mysql目錄下的 include/mysql下的mysql.h文件以及l(fā)ib/mysql下的全部文件,連接(直接復(fù)制過去或許也可)到 /usr/lib 目錄下.

  如果編譯安裝pure-ftpd出現(xiàn)configure: error: Your MySQL client libraries aren't properly installed錯(cuò)誤,解決辦法:

  1.   [root@jowei pure-ftpd-1.0.22]#vi /etc/profile 在最后添加  
  2.  
  3.   export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib/mysql  
  4.  

  如果出現(xiàn)你安裝的Mysql是rpm包形式的,則直接用 --with-mysql 將其路徑刪除即可。

  1.   [root@jowei pure-ftpd-1.0.22]# ./etc/profile  
  2.  

  然后再進(jìn)行./configure ......

  出現(xiàn)下面這個(gè)表示配置成功

  1.   configure: WARNING: unrecognized options: --with-largefile, --with-upload_script_, --with-virtualroot  
  2.  
  3.   configure: +--------------------------------------------------------+  
  4.  
  5.   configure: | You can subscribe to the Pure-FTPd users mailing-list |  
  6.  
  7.   configure: | to ask for help and to stay informed of new releases. |  
  8.  
  9.   configure: | Go to http://www.pureftpd.org/ml/ now! |  
  10.  
  11.   configure: +--------------------------------------------------------+  
  12.  
  13.   [root@localhost pure-ftpd-1.0.22]# make;make install  
  14.  

  五、建立配置文件

  1.   [root@localhost pure-ftpd-1.0.22]# mkdir -m 755 /usr/local/pureftpd/etc  
  2.  
  3.   [root@localhost pure-ftpd-1.0.22]#  
  4.  
  5.   cp pureftpd-mysql.conf /usr/local/pureftpd/etc/  
  6.  
  7.   [root@localhost pure-ftpd-1.0.22]#  
  8.  
  9.   cp configuration-file/pure-ftpd.conf /usr/local/pureftpd/etc/  
  10.  
  11.   [root@localhost pure-ftpd-1.0.22]# cp configuration-file/pure-config.pl /usr/local/pureftpd/bin/  
  12.  
  13.   [root@localhost pure-ftpd-1.0.22]#  
  14.  
  15.   chmod 755 /usr/local/pureftpd/bin/pure-config.pl  
  16.  
  17.   [root@localhost pure-ftpd-1.0.22]#  
  18.  
  19.   cp contrib/redhat.init /etc/init.d/pureftpd  
  20.  
  21.   [root@localhost pure-ftpd-1.0.22]# chmod 755 /etc/init.d/pureftpd  
  22.  
  23.   [root@localhost pure-ftpd-1.0.22]# chown root:root /etc/init.d/pureftpd //設(shè)置root權(quán)限  
  24.  
  25.   [root@localhost pure-ftpd-1.0.22]# chkconfig --add pureftpd  
  26.  
  27.   //加入系統(tǒng)啟動(dòng)  
  28.  
  29.   [root@localhost pure-ftpd-1.0.22]# chkconfig pureftpd on //開機(jī)啟動(dòng)  
  30.  
  31.   [root@localhost pure-ftpd-1.0.22]# vi /etc/init.d/pureftpd //修改pureftpd一下幾項(xiàng)  
  32.  
  33.   # Path to the pure-ftp binaries.  
  34.  
  35.   prog=pure-config.pl  
  36.  
  37.   fullpath=/usr/local/pureftpd/sbin/$prog //修改此處  
  38.  
  39.   pureftpwho=/usr/local/pureftpd/sbin/pure-ftpwho //修改pure-ftpwho路徑  
  40.  
  41.   start() {  
  42.  
  43.   echo -n $"Starting $prog: "  
  44.  
  45.   $fullpath /usr/local/pureftpd/etc/pure-ftpd.conf --daemonize //修改pure-ftpd.conf路徑  
  46.  
  47.   RETVAL=$?  
  48.  
  49.   [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog  
  50.  
  51.   echo  
  52.  
  53.   }  
  54.  

#p#

   六、建立mysql認(rèn)證數(shù)據(jù)庫(kù)表

  1.   [root@jowei pureftpd]# mysql -u root -p  
  2.  
  3.   Enter password: ----輸入mysql root用戶密碼進(jìn)入  
  4.  
  5.   mysql> create database pureftpd;  
  6.  
  7.   mysql> grant all on pureftpd.* to pureftpd@localhost identified by 'pureftpd';  
  8.  
  9.   mysql> use pureftpd  
  10.  
  11.   mysql> CREATE TABLE users (  
  12.  
  13.   id int(32) unsigned NOT NULL auto_increment,  
  14.  
  15.   User varchar(16) NOT NULL default '*',  
  16.  
  17.   Password varchar(64) NOT NULL default '*',  
  18.  
  19.   Uid varchar(11) NOT NULL default '-1',  
  20.  
  21.   Gid varchar(11) NOT NULL default '-1',  
  22.  
  23.   Dir varchar(128) NOT NULL default '-1',  
  24.  
  25.   QuotaSize smallint(5) NOT NULL default 0,  
  26.  
  27.   QuotaFiles int(11) NOT NULL default 0,  
  28.  
  29.   ULBandwidth smallint(5) NOT NULL default 0,  
  30.  
  31.   DLBandwidth smallint(5) NOT NULL default 0,  
  32.  
  33.   ULRatio smallint(6) NOT NULL default 0,  
  34.  
  35.   DLRatio smallint(6) NOT NULL default 0,  
  36.  
  37.   comment tinytext NOT NULL,  
  38.  
  39.   ipaccess varchar(15) NOT NULL default '*',  
  40.  
  41.   status enum('0','1') NOT NULL default '0',  
  42.  
  43.   create_date datetime NOT NULL default '0000-00-00 00:00:00',  
  44.  
  45.   modify_date datetime NOT NULL default '0000-00-00 00:00:00',  
  46.  
  47.   PRIMARY KEY (id,User),  
  48.  
  49.   UNIQUE KEY User (User)  
  50.  
  51.   ) TYPE=MyISAM AUTO_INCREMENT=5;  
  52.  

  建立用戶

  你可以用下面建立的test用戶登錄到/var/pureftp

  1.   INSERT INTO users VALUES (1,'test1', '123456', '2000', '2000', '/var/pureftp', 0, 0, 0, 0, 0, 0, '*', '*', '1', '2009-7-11 09:20:33', '2009-7-11 09:20:33');  
  2.  
  3.   INSERT INTO users VALUES (1,'test2', '123456', '2000', '2000', '/var/pureftp', 0, 0, 0, 0, 0, 0, '*', '*', '1', '2009-7-11 09:20:33', '2009-7-11 09:20:33');  
  4.  

  /var/pureftp ftp登陸的文件目錄

  七、建立用于pureftpd認(rèn)證用戶的系統(tǒng)信息

  你可以自己向下面這樣建立一個(gè)用戶做pureftpd驗(yàn)證但是我下面直接用的是root

  1.   [root@localhost /]# groupadd -g 2000 pureftp  
  2.  
  3.   [root@localhost /]# useradd -u 2000 -g pureftp -d /var/pureftp -s /sbin/nologin pureftp  
  4.  

#p#

  八、修改pureftpd的配置文件

  1.   [root@localhost var]# vi /usr/local/pureftpd/etc/pure-ftpd.conf  
  2.  
  3.   ############################################################  
  4.  
  5.   # #  
  6.  
  7.   # Configuration file for pure-ftpd wrappers #  
  8.  
  9.   # #  
  10.  
  11.   ############################################################  
  12.  
  13.   # 如果你想要使用配置文件代替命令行選項(xiàng)來運(yùn)行 Pure-FTPd ,請(qǐng)運(yùn)行下面的命令:  
  14.  
  15.   #  
  16.  
  17.   # /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf  
  18.  
  19.   #  
  20.  
  21.   # RPM 缺省使用另外一個(gè)配置文件:  
  22.  
  23.   # /etc/sysconfig/pure-ftpd  
  24.  
  25.   #  
  26.  
  27.   # 請(qǐng)不要忘了瀏覽一下 http://www.pureftpd.org/documentation.html 的  
  28.  
  29.   # 文檔,查看全部的選項(xiàng)列表。  
  30.  
  31.   # 限制所有用戶在其主目錄中  
  32.  
  33.   ChrootEveryone yes  
  34.  
  35.   # 如果前一個(gè)指令被設(shè)置為了 "no",下面組的成員(GID)就不受主目錄的限制了。而其他的用戶還是  
  36.  
  37.   # 會(huì)被限制在自己的主目錄里。如果你不想把任何用戶限制在自己的主目錄里,只要注釋掉 ChrootEveryone  
  38.  
  39.   # 和 TrustedGID 就可以了。  
  40.  
  41.   # TrustedGID 100  
  42.  
  43.   # 兼容ie等比較非正規(guī)化的ftp客戶端  
  44.  
  45.   BrokenClientsCompatibility no  
  46.  
  47.   # 服務(wù)器總共允許同時(shí)連接的最大用戶數(shù)  
  48.  
  49.   MaxClientsNumber 50  
  50.  
  51.   # 做為守護(hù)(doemon)進(jìn)程運(yùn)行(Fork in background)  
  52.  
  53.   Daemonize yes  
  54.  
  55.   # 同一IP允許同時(shí)連接的用戶數(shù)(Maximum number of sim clients with the same IP address)  
  56.  
  57.   MaxClientsPerIP 8  
  58.  
  59.   # 如果你要記錄所有的客戶命令,設(shè)置這個(gè)指令為 "yes"。  
  60.  
  61.   # This directive can be duplicated to also log server responses.  
  62.  
  63.   VerboseLog no  
  64.  
  65.   # 即使客戶端沒有發(fā)送 '-a' 選項(xiàng)也列出隱藏文件( dot-files )。  
  66.  
  67.   DisplayDotFiles yes  
  68.  
  69.   # 不允許認(rèn)證用戶 - 僅作為一個(gè)公共的匿名FTP。  
  70.  
  71.   AnonymousOnly no  
  72.  
  73.   # 不允許匿名連接,僅允許認(rèn)證用戶使用。  
  74.  
  75.   NoAnonymous no  
  76.  
  77.   # Syslog facility (auth, authpriv, daemon, ftp, security, user, local*)  
  78.  
  79.   # 缺省的功能( facility )是 "ftp"。 "none" 將禁止日志。  
  80.  
  81.   SyslogFacility ftp  
  82.  
  83.   # 定制用戶登陸后的顯示信息(Display fortune cookies)  
  84.  
  85.   # FortunesFile /usr/share/fortune/zippy  
  86.  
  87.   # 在日志文件中不解析主機(jī)名。日志沒那么詳細(xì)的話,就使用更少的帶寬。在一個(gè)訪問量很大  
  88.  
  89.   # 的站點(diǎn)中,設(shè)置這個(gè)指令為 "yes" ,如果你沒有一個(gè)能工作的DNS的話。  
  90.  
  91.   DontResolve yes  
  92.  
  93.   # 客戶端允許的最大的空閑時(shí)間(分鐘,缺省15分鐘)  
  94.  
  95.   MaxIdleTime 15  
  96.  
  97.   # LDAP 配置文件 (參考 README.LDAP)  
  98.  
  99.   # LDAPConfigFile /etc/pureftpd-ldap.conf  
  100.  
  101.   # MySQL 配置文件 (參考 README.MySQL)  
  102.  
  103.   MySQLConfigFile /usr/local/pureftpd/etc/pureftpd-mysql.conf #關(guān)鍵部分,你整合mysql就靠它了  
  104.  
  105.   # Postgres 配置文件 (參考 README.PGSQL)  
  106.  
  107.   # PGSQLConfigFile /etc/pureftpd-pgsql.conf  
  108.  
  109.   # PureDB 用戶數(shù)據(jù)庫(kù) (參考 README.Virtual-Users)  
  110.  
  111.   # PureDB /etc/pureftpd.pdb  
  112.  
  113.   # pure-authd 的socket 路徑(參考 README.Authentication-Modules)  
  114.  
  115.   # ExtAuth /var/run/ftpd.sock  
  116.  
  117.   # 如果你要啟用 PAM 認(rèn)證方式, 去掉下面行的注釋。  
  118.  
  119.   # PAMAuthentication yes  
  120.  
  121.   # 如果你要啟用 簡(jiǎn)單的 Unix系統(tǒng) 認(rèn)證方式(/etc/passwd), 去掉下面行的注釋。  
  122.  
  123.   # UnixAuthentication yes  
  124.  
  125.   # 請(qǐng)注意,LDAPConfigFile, MySQLConfigFile, PAMAuthentication 和  
  126.  
  127.   # UnixAuthentication 這些指令只能被使用一次,不過,他們能被混合在一起用。例如:如果你使用了  
  128.  
  129.   # MySQLConfigFile 和 UnixAuthentication,那么 SQL 服務(wù)器將被訪問。如果因?yàn)橛脩裘凑? 
  130.  
  131.   # 到而使 SQL 認(rèn)證失敗的話,就會(huì)在/etc/passwd 和 /etc/shadow 中嘗試另外一種認(rèn)證,如果因  
  132.  
  133.   # 為密碼錯(cuò)誤而使 SQL 認(rèn)證失敗的話,認(rèn)證就會(huì)在此結(jié)束了。認(rèn)證方式由它們被給出來的順序而被鏈  
  134.  
  135.   # 接了起來。  
  136.  
  137.   # 'ls' 命令的遞歸限制。第一個(gè)參數(shù)給出文件顯示的最大數(shù)目。第二個(gè)參數(shù)給出最大的子目錄深度。  
  138.  
  139.   LimitRecursion 2000 8  
  140.  
  141.   # 允許匿名用戶創(chuàng)建時(shí)間:2009-11-11 15:38:00新目錄?  
  142.  
  143.   AnonymousCanCreateDirs no  
  144.  
  145.   # 如果系統(tǒng)被 loaded 超過下面的值,匿名用戶會(huì)被禁止下載。  
  146.  
  147.   MaxLoad 4  
  148.  
  149.   # 被動(dòng)連接響應(yīng)的端口范圍。- for firewalling.  
  150.  
  151.   # PassivePortRange 30000 50000  
  152.  
  153.   # 強(qiáng)制一個(gè)IP地址使用被動(dòng)響應(yīng)( PASV/EPSV/SPSV replies)。 - for NAT.  
  154.  
  155.   # Symbolic host names are also accepted for gateways with dynamic IP  
  156.  
  157.   # addresses.  
  158.  
  159.   # ForcePassiveIP 192.168.0.1  
  160.  
  161.   # 匿名用戶的上傳/下載的比率。  
  162.  
  163.   # AnonymousRatio 1 10  
  164.  
  165.   # 所有用戶的上傳/下載的比率。  
  166.  
  167.   # This directive superscedes the previous one.  
  168.  
  169.   # UserRatio 1 10  
  170.  
  171.   # 不接受所有者為 "ftp" 的文件的下載。例如:那些匿名用戶上傳后未被本地管理員驗(yàn)證的文件。  
  172.  
  173.   AntiWarez yes  
  174.  
  175.   # 服務(wù)監(jiān)聽的IP 地址和端口。(缺省是所有IP地址和21端口)  
  176.  
  177.   # Bind 127.0.0.1,21  
  178.  
  179.   # 匿名用戶的最大帶寬(KB/s)。  
  180.  
  181.   # AnonymousBandwidth 8  
  182.  
  183.   # 所有用戶的最大帶寬(KB/s),包括匿名用戶。  
  184.  
  185.   # Use AnonymousBandwidth *or* UserBandwidth, both makes no sense.  
  186.  
  187.   # UserBandwidth 8  
  188.  
  189.   # 新建目錄及文件的屬性掩碼值。<文件掩碼>;:<目錄掩碼>; .  
  190.  
  191.   # 177:077 if you feel paranoid.  
  192.  
  193.   Umask 133:022  
  194.  
  195.   # 認(rèn)證用戶允許登陸的最小組ID(UID) 。  
  196.  
  197.   MinUID 100  
  198.  
  199.   # 僅允許認(rèn)證用戶進(jìn)行 FXP 傳輸。  
  200.  
  201.   AllowUserFXP yes  
  202.  
  203.   # 對(duì)匿名用戶和非匿名用戶允許進(jìn)行匿名 FXP 傳輸。  
  204.  
  205.   AllowAnonymousFXP no  
  206.  
  207.   # 用戶不能刪除和寫點(diǎn)文件(文件名以 '.' 開頭的文件),即使用戶是文件的所有者也不行。  
  208.  
  209.   # 如果 TrustedGID 指令是 enabled ,文件所屬組用戶能夠訪問點(diǎn)文件(dot-files)。  
  210.  
  211.   ProhibitDotFilesWrite no  
  212.  
  213.   # 禁止讀點(diǎn)文件(文件名以 '.' 開頭的文件) (.history, .ssh...)  
  214.  
  215.   ProhibitDotFilesRead no  
  216.  
  217.   # 永不覆蓋文件。當(dāng)上傳的文件,其文件名已經(jīng)存在時(shí),自動(dòng)重命名,如: file.1, file.2, file.3, ...  
  218.  
  219.   AutoRename no  
  220.  
  221.   # 不接受匿名用戶上傳新文件( no = 允許上傳)  
  222.  
  223.   AnonymousCantUpload no  
  224.  
  225.   # 僅允許來自以下IP地址的非匿名用戶連接。你可以使用這個(gè)指令來打開幾個(gè)公網(wǎng)IP來提供匿名FTP,  
  226.  
  227.   # 而保留一個(gè)私有的防火墻保護(hù)的IP來進(jìn)行遠(yuǎn)程管理。你還可以只允許一內(nèi)網(wǎng)地址進(jìn)行認(rèn)證,而在另外  
  228.  
  229.   # 一個(gè)IP上提供純匿名的FTP服務(wù)。  
  230.  
  231.   #TrustedIP 10.1.1.1  
  232.  
  233.   # 如果你要為日志每一行添加 PID 去掉下面行的注釋。  
  234.  
  235.   # LogPID yes  
  236.  
  237.   # 使用類似于Apache的格式創(chuàng)建一個(gè)額外的日志文件,如:  
  238.  
  239.   # fw.c9x.org - jedi [13/Dec/1975] "GET /ftp/linux.tar.bz2" 200 21809338  
  240.  
  241.   # 這個(gè)日志文件能被 www 流量分析器處理。  
  242.  
  243.   # AltLog clf:/var/log/pureftpd.log  
  244.  
  245.   # 使用優(yōu)化過的格式為統(tǒng)計(jì)報(bào)告創(chuàng)建一個(gè)額外的日志文件。  
  246.  
  247.   # AltLog stats:/var/log/pureftpd.log  
  248.  
  249.   # 使用標(biāo)準(zhǔn)的W3C格式創(chuàng)建一個(gè)額外的日志文件。(與大部分的商業(yè)日志分析器兼容)  
  250.  
  251.   # AltLog w3c:/var/log/pureftpd.log  
  252.  
  253.   # 不接受 CHMOD 命令。用戶不能更改他們文件的屬性。  
  254.  
  255.   # NoChmod yes  
  256.  
  257.   # 允許用戶恢復(fù)和上傳文件,卻不允許刪除他們。  
  258.  
  259.   # KeepAllFiles yes  
  260.  
  261.   # 用戶主目錄不存在的話,自動(dòng)創(chuàng)建。  
  262.  
  263.   # CreateHomeDir yes  
  264.  
  265.   # 啟用虛擬的磁盤限額。第一個(gè)數(shù)字是最大的文件數(shù)。  
  266.  
  267.   # 第二個(gè)數(shù)字是最大的總的文件大小(單位:Mb)。  
  268.  
  269.   # 所以,1000:10 就限制每一個(gè)用戶只能使用 1000 個(gè)文件,共10Mb。  
  270.  
  271.   # Quota 1000:10  
  272.  
  273.   # 如果你的 pure-ftpd 編譯時(shí)加入了獨(dú)立服務(wù)器( standalone )支持,你能夠改變 pid 文件  
  274.  
  275.   # 的位置。缺省位置是 /var/run/pure-ftpd.pid 。  
  276.  
  277.   # PIDFile /var/run/pure-ftpd.pid  
  278.  
  279.   # 如果你的 pure-ftpd 編譯時(shí)加入了 pure-uploadscript 支持,這個(gè)指令將會(huì)使 pure-ftpd  
  280.  
  281.   # 發(fā)送關(guān)于新上傳的情況信息到 /var/run/pure-ftpd.upload.pipe,這樣 pure-uploadscript  
  282.  
  283.   # 就能讀然后調(diào)用一個(gè)腳本去處理新的上傳。  
  284.  
  285.   # CallUploadScript yes  
  286.  
  287.   # 這個(gè)選項(xiàng)對(duì)允許匿名上傳的服務(wù)器是有用的。當(dāng) /var/ftp 在 /var 里時(shí),需要保留一定磁盤空間  
  288.  
  289.   # 來保護(hù)日志文件。當(dāng)所在磁盤分區(qū)使用超過百分之 X 時(shí),將不在接受新的上傳。  
  290.  
  291.   MaxDiskUsage 99  
  292.  
  293.   # 如果你不想要你的用戶重命名文件的話,就設(shè)置為 'yes' 。  
  294.  
  295.   # NoRename yes  
  296.  
  297.   # 是 'customer proof' : 工作區(qū)(workaround)反對(duì)普通的客戶錯(cuò)誤,類似于:'chmod 0 public_html' 的錯(cuò)誤。  
  298.  
  299.   # 那是一個(gè)有效的命令,不過,將導(dǎo)致無知的客戶所定他們自己的文件,將使你的技術(shù)支持忙于愚蠢的的問題中。  
  300.  
  301.   # 如果你確信你所有的用戶都有基本的Unix知識(shí)的話,這個(gè)特性將沒什么用了。不過,如果你是一個(gè)主機(jī)提供商  
  302.  
  303.   # 的話,啟用它。  
  304.  
  305.   CustomerProof yes  
  306.  
  307.   # 每一個(gè)用戶的并發(fā)限制。只有在添加了 --with-peruserlimits 編譯選項(xiàng)進(jìn)行編譯后,這個(gè)指令才起  
  308.  
  309.   # 作用。(大部分的二進(jìn)制的發(fā)布版本就是例子)  
  310.  
  311.   # 格式是 : <每一個(gè)用戶最大允許的進(jìn)程>;:<最大的匿名用戶進(jìn)程>;  
  312.  
  313.   # 例如: 3:20 意思是同一個(gè)認(rèn)證用戶最大可以有3個(gè)同時(shí)活動(dòng)的進(jìn)程。而且同時(shí)最多只能有20個(gè)匿名用戶進(jìn)程。  
  314.  
  315.   # PerUserLimits 3:20  
  316.  

#p#

  九、修改pureftpd-mysql.conf的配置文件

  1.   [root@localhost var]# vi /usr/local/pureftpd/etc/pureftpd-mysql.conf  
  2.  
  3.   ##############################################  
  4.  
  5.   # #  
  6.  
  7.   # Sample Pure-FTPd Mysql configuration file. #  
  8.  
  9.   # See README.MySQL for explanations. #  
  10.  
  11.   # #  
  12.  
  13.   ##############################################  
  14.  
  15.   # Optional : MySQL server name or IP. Don't define this for unix sockets.  
  16.  
  17.   MYSQLServer localhost  
  18.  
  19.   #服務(wù)器地址  
  20.  
  21.   # Optional : MySQL port. Don't define this if a local unix socket is used.  
  22.  
  23.   MYSQLPort 3306  
  24.  
  25.   #服務(wù)器端口  
  26.  
  27.   # Optional : define the location of mysql.sock if the server runs on this host.  
  28.  
  29.   MYSQLSocket /tmp/mysql.sock  
  30.  
  31.   #這里換成你的真實(shí)地址  
  32.  
  33.   # Mandatory : user to bind the server as.  
  34.  
  35.   MYSQLUser root  
  36.  
  37.   #登錄服務(wù)器用戶名  
  38.  
  39.   # Mandatory : user password. You must have a password.  
  40.  
  41.   MYSQLPassword 123456  
  42.  
  43.   #登錄服務(wù)器密碼  
  44.  
  45.   # Mandatory : database to open.  
  46.  
  47.   MYSQLDatabase pureftpd  
  48.  
  49.   #配置文件所在的數(shù)據(jù)庫(kù)  
  50.  
  51.   # Mandatory : how passwords are stored  
  52.  
  53.   # Valid values are : "cleartext", "crypt", "md5" and "password"  
  54.  
  55.   # ("password" = MySQL password() function)  
  56.  
  57.   # You can also use "any" to try "crypt", "md5" *and* "password"  
  58.  
  59.   MYSQLCrypt cleartext  
  60.  
  61.   #驗(yàn)證方式  
  62.  
  63.   # In the following directives, parts of the strings are replaced at  
  64.  
  65.   # run-time before performing queries :  
  66.  
  67.   #  
  68.  
  69.   # \L is replaced by the login of the user trying to authenticate.  
  70.  
  71.   # \I is replaced by the IP address the user connected to.  
  72.  
  73.   # \P is replaced by the port number the user connected to.  
  74.  
  75.   # \R is replaced by the IP address the user connected from.  
  76.  
  77.   # \D is replaced by the remote IP address, as a long decimal number.  
  78.  
  79.   #  
  80.  
  81.   # Very complex queries can be performed using these substitution strings,  
  82.  
  83.   # especially for virtual hosting.  
  84.  
  85.   # Query to execute in order to fetch the password  
  86.  
  87.   MYSQLGetPW SELECT Password FROM users WHERE User="\L" AND status="1" 
  88.  
  89.   #登錄服務(wù)器的用戶密碼驗(yàn)證字段,status="1"為此用戶必需為激活模式.  
  90.  
  91.   # Query to execute in order to fetch the system user name or uid  
  92.  
  93.   MYSQLGetUID SELECT Uid FROM users WHERE User="\L" 
  94.  
  95.   #用戶的UID  
  96.  
  97.   # Optional : default UID - if set this overrides MYSQLGetUID  
  98.  
  99.   #MYSQLDefaultUID 1000  
  100.  
  101.   # Query to execute in order to fetch the system user group or gid  
  102.  
  103.   MYSQLGetGID SELECT Gid FROM users WHERE User="\L" 
  104.  
  105.   #用戶的Gid  
  106.  
  107.   # Optional : default GID - if set this overrides MYSQLGetGID  
  108.  
  109.   #MYSQLDefaultGID 1000  
  110.  
  111.   # Query to execute in order to fetch the home directory  
  112.  
  113.   MYSQLGetDir SELECT Dir FROM users WHERE User="\L" 
  114.  
  115.   #用戶的主目錄  
  116.  
  117.   # Optional : query to get the maximal number of files  
  118.  
  119.   # Pure-FTPd must have been compiled with virtual quotas support.  
  120.  
  121.   MySQLGetQTAFS SELECT QuotaFiles FROM users WHERE User="\L" 
  122.  
  123.   #用戶的最大文件數(shù)量  
  124.  
  125.   # Optional : query to get the maximal disk usage (virtual quotas)  
  126.  
  127.   # The number should be in Megabytes.  
  128.  
  129.   # Pure-FTPd must have been compiled with virtual quotas support.  
  130.  
  131.   MySQLGetQTASZ SELECT QuotaSize FROM users WHERE User="\L" 
  132.  
  133.   #用戶的最大磁盤空間  
  134.  
  135.   # Optional : ratios. The server has to be compiled with ratio support.  
  136.  
  137.   MySQLGetRatioUL SELECT ULBandwidth FROM users WHERE User="\L" 
  138.  
  139.   MySQLGetRatioDL SELECT DLBandwidth FROM users WHERE User="\L" 
  140.  
  141.   #上邊兩項(xiàng)為,用戶上傳與下載的速度,單位 Kb/s  
  142.  
  143.   # Optional : bandwidth throttling.  
  144.  
  145.   # The server has to be compiled with throttling support.  
  146.  
  147.   # Values are in KB/s .  
  148.  
  149.   # MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L" 
  150.  
  151.   # MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L" 
  152.  
  153.   # Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :  
  154.  
  155.   # 1) You know what you are doing.  
  156.  
  157.   # 2) Real and virtual users match.  
  158.  
  159.   # MySQLForceTildeExpansion 1  
  160.  
  161.   # If you upgraded your tables to transactionnal tables (Gemini,  
  162.  
  163.   # BerkeleyDB, Innobase...), you can enable SQL transactions to  
  164.  
  165.   # avoid races. Leave this commented if you are using the  
  166.  
  167.   # traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.  
  168.  
  169.   # MySQLTransactions On  
  170.  

#p#

  十、運(yùn)行pureftpd

  啟動(dòng)pureftpd

  1.   [root@localhost ~]# /etc/init.d/pureftpd start 或者下面也可以  
  2.  
  3.   [root@localhost ~]#/usr/local/pureftpd/bin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf  

 

【編輯推薦】

  1. Linux下vsftp服務(wù)器配置
  2. vsFTPd服務(wù)器的啟動(dòng)和關(guān)閉
  3. 怎樣安裝vsFTPd
  4. Linux下配置vsftpd
  5. vsftpd安裝篇
  6. vsftpd 啟動(dòng)篇
  7. Linux下vsftpd的配置
  8. 如果SELinux拒絕vsftpd上傳文件到用戶主目錄怎么辦
  9. vsFTPd常用功能之限速和限制鏈接點(diǎn)
責(zé)任編輯:zhaolei 來源: CSDN網(wǎng)
相關(guān)推薦

2011-04-01 09:06:49

WebDAV協(xié)作平臺(tái)

2011-08-17 11:28:54

Objective-C模擬開發(fā)Windows平臺(tái)

2018-03-19 10:50:26

2013-03-19 09:27:37

MongoDB

2011-11-08 16:31:10

Java

2011-01-07 16:35:53

2010-07-16 11:39:36

自動(dòng)登錄telnet

2016-08-23 10:00:28

LinuxPython腳本

2016-08-22 21:53:06

LinuxPython腳本

2011-08-29 09:33:24

WindowsQt庫(kù)靜態(tài)

2019-06-18 15:28:24

TomcatLinux優(yōu)化

2011-03-02 13:16:33

Pureftpd

2011-02-25 16:22:34

2011-03-03 15:09:30

PureFTPdFAQ

2011-07-06 14:32:52

Mac XCode

2011-06-21 17:35:11

Qt Creator 編譯

2011-09-26 10:46:32

Android云計(jì)算開發(fā)

2009-04-14 10:11:29

.NETWeb測(cè)試工具

2011-04-02 11:11:44

windows安裝MRTG

2021-09-23 17:21:19

網(wǎng)易數(shù)據(jù)質(zhì)量大數(shù)據(jù)平臺(tái)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)