51/AVRµ¥Æ¬»ú¼¼ÊõæäÕ¾£¡  <ÔÚÏß·­Òë> ©ª    ±ãÀû¹¤¾ß    ÌØÉ«ÍøÖ·  ©ª ÎÞµ¯´°¡¢ÎÞ²å¼þµÄÂÌÉ«Õ¾µã...  Ó¢²ÅÕÐƸ   Ñ§Àú²éѯ ©ª Ï²»¶>>ÊÕ²ØÎÒÕ¾ 

µ±Ç°Î»ÖãºÊ×Ò³ > ARM/CPLD/×ÛºÏ > ÏêϸÄÚÈÝ
RHEL4.0+Pureftp+Webpureftp+Mysql+Zend
·¢²¼Ê±¼ä£º2009/7/23  ÔĶÁ´ÎÊý£º723  ×ÖÌå´óС: ¡¾Ð¡¡¿ ¡¾ÖС¿¡¾´ó¡¿

RHEL4.0+Pureftp+Webpureftp+Mysql+Zend OptimizerʵÏÖÒ»¸ö¹¦ÄܽÏÈ«ÃæµÄFTP·þÎñϵͳ£º

ʵÑé»·¾³£º
±¾ÊµÑéµÄ»·¾³²ÉȡϵͳÊÇRHEL4.0ÒÔ¼°ÉÏÃæËùÌáµ½µÄÏà¹ØÈí¼þ£»
¹¹³É¼òµ¥µÄC/Sϵͳ£¬ÆäÖÐRHEL4.0³ýÁ˳ÉΪFTP·þÎñÆ÷Ö®Í⻹³äµ±DNS·þÎñÆ÷ÒÔ¼°WEB·þÎñÆ÷½ÇÉ«¡£
·þÎñÆ÷IPµØַΪ£º192.168.1.10£¬FQDNΪserver.jerrywjl.com£¬¿Í»§¶ËΪWindowsXP£¬IPµØַΪ192.168.1.1

ÒÔÏÂΪʵÑé²½Ö裺
Ê×ÏÈÅäÖûù±¾µÄÍøÂç²ÎÊýÒÔ¼°Ïà¹ØµÄFTPºÍWEB·þÎñ£¬ÅäÖõÄÄ¿µÄÊÇʵÏÖÈý¸ö½âÎö£º
server.jerrywjl.com¡¢ftp.jerrywjl.com¡¢www.jerrywjl.com
Õâ¸ö¹ý³Ì±È½Ï¼òµ¥£¬ËùÒÔ¾ßÌå²½ÖèÔÚʵÑéÖÐÂÔ¹ý£¬Ö»ÊÇÇ¿µ÷һϲ½Ö裺
1.ÅäÖÃÖ÷»úÃû³ÆFQDN£»
2.ÅäÖÃÖ÷»úTCP/IP·þÎñÒÔ¼°DNS·þÎñÒÔ¼°Æô¶¯DNS·þÎñ£»
3.ÅäÖò¢Æô¶¯Apache·þÎñ
ÔÚApacheÖ÷ÅäÖÃÎĵµÖиü¸ÄÏÂÃæÁ½´¦£º
ÔÚÔ­À´AddDefaultCharset UTF-8ÏÂÌí¼ÓÒ»ÐСª¡ªAddDefaultCharset GB2312£»
½«ÎĵµÖеÄÖ÷»úÃû¸ü¸ÄΪftp.jerrywjl.com£»
×îºó±£´æ²¢Æô¶¯·þÎñ½øÐÐhttp·þÎñ²âÊÔ¡£

ÅäÖÃÍê³ÉÖ®ºó£¬»ù±¾»·¾³ËãÊÇ×¼±¸Íê³É£¬ÏÖÔÚ°²×°Mysql²¢ÇÒ½øÐÐMysql·þÎñÅäÖÃÓë²âÊÔ£º
Ê×ÏÈ×°MysqlµÄÈí¼þ°ü£º
[root@server RPMS]# rpm -ihv --aid mysql-server-4.1.7-4.RHEL4.1.i386.rpm
[root@server RPMS]# rpm -ihv --aid mysqlclient10-*
[root@server RPMS]# rpm -ihv --aid mysql-devel-4.1.7-4.RHEL4.1.i386.rpm
[root@server RPMS]# rpm -ihv --aid php-mysql-4.3.9-3.1.i386.rpm

Íê³ÉÖ®ºóÆô¶¯·þÎñ£¬²¢ÇÒÉèÖÃMysql·þÎñÆ÷ÃÜÂëÒÔ¼°½øÐеǼ²âÊÔ£º
[root@server ~]# service mysqld start
Initializing MySQL database:    [    OK    ]
Starting MySQL:    [    OK    ]
[root@server ~]# chkconfig mysqld on
[root@server ~]# mysqladmin -u root password 123456
[root@server ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.    Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 4.1.7

Type help; or \h for help. Type \c to clear the buffer.

mysql> show databases;
+-------------+
| Database          |
+-------------+
| mysql                   |
| test                     |
+-------------+
2 rows in set (0.00 sec)

mysql> quit
Bye
[root@server ~]#

ÏÂÃ濪ʼ°²×°pure-ftpd·þÎñÈí¼þ£¬ÔÚ´Ë֮ǰ£¬Ê×ÏÈ»ñÈ¡ËùÓеÄÊÔÑéÖÐÐèÒªµÄÈí¼þ°ü£º
Õâ¾ÍÊÇʵÑéËùÐèÒªµÄÈí¼þ£º
[root@server ~]# cd /usr/local/packages/
[root@server packages]# ls
pure-ftpd-1.0.20.tar.gz    webpureftp0.1.tar.gz    ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz
[root@server packages]# ll
total 4656
-rwxr-xr-x    1 root root    561412 Mar 21 22:30 pure-ftpd-1.0.20.tar.gz
-rwxr-xr-x    1 root root    196917 Mar 21 22:30 webpureftp0.1.tar.gz
-rwxr-xr-x    1 root root 3973599 Mar 21 22:30 ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz
ÏÈ°²×°pure-ftpd£º
[root@server packages]# mkdir temp
[root@server packages]# tar -zxf pure-ftpd-1.0.20.tar.gz -C temp/
[root@server packages]#
[root@server packages]# cd temp/pure-ftpd-1.0.20/
[root@server pure-ftpd-1.0.20]#
[root@server pure-ftpd-1.0.20]# cd

[root@server ~]# vi install_pureftpd                                                 ¡ª¡ª¡ª¡ªÕâÊÇpureftpdµÄ°²×°½Å±¾
ÄÚÈÝÈçÏ£º
cd /usr/local/packages/temp/pure-ftpd-1.0.20                          ¡ª¡ª¡ª¡ª½âѹºópureftpËùÔÚµÄĿ¼
./configure \
--prefix=/usr/local/pureftpd \                                                                 ¡ª¡ª¡ª¡ªÖ¸¶¨°²×°Ä¿Â¼
--with-mysql \                                                                                                ¡ª¡ª¡ª¡ªÖ§³ÖʹÓÃMysql±£´æÐéÄâÕʺÅ
--with-virtualchroot \                                                                                 ¡ª¡ª¡ª¡ª¿ÉÒÔʹÓû§ÔÚ×Ô¼ºÖ÷Ŀ¼ÏÂͨ¹ýÌí¼Ó·ûºÅÁ´½ÓµÄ·½Ê½·ÃÎÊÆäËûÔ­±¾
                                                                                                                                                  ²»ÔÊÐíchrootµÄĿ¼
--with-virtualhosts \                                                                                     ¡ª¡ª¡ª¡ªÔÊÐíÐéÄâÖ÷»ú
--with-virtualroot \                                                                                      ¡ª¡ª¡ª¡ªÖ§³ÖÐéÄâroot¸ùĿ¼
--with-diraliases \                                                                                          ¡ª¡ª¡ª¡ªÖ§³ÖĿ¼±ðÃû
--with-uploadscript \                             ¡ª¡ª¡ª¡ªÖ§³Öµ±Ò»¸öÉÏ´«Íê³ÉÖ®ºó£¬×Ô¶¯ÆôÓöîÍâ³ÌÐòºÍ½Å±¾
--with-cookie \                                         ¡ª¡ª¡ª¡ªÖ§³Öµ±Óû§µÇ¼ʱÏÔʾ¶¨ÖÆÐÅÏ¢
--with-quotas \                                        ¡ª¡ª¡ª¡ª¿ªÆô´ÅÅÌÅä¶î¹¦ÄÜ
--with-sysquotas \                                  ¡ª¡ª¡ª¡ªÔÊÐíʹÓòÙ×÷ϵͳ´ÅÅÌÅä¶î
--with-ratios \                                            ¡ª¡ª¡ª¡ªÖ§³ÖÉÏ´«/ÏÂÔرÈÀý
--with-throttling \                                   ¡ª¡ª¡ª¡ªÖ§³Ö´ø¿íÏÞÖÆ
--with-largefile \                                       ¡ª¡ª¡ª¡ªÖ§³ÖÏÂÔØ´óÓÚ2GÎļþ
--with-peruserlimits \                             ¡ª¡ª¡ª¡ª¿ªÆôÏÞÖÆͬһ¸öÕʺſÉÒÔͬʱµÇ¼µÄ¸öÊý
--with-paranoidmsg \                          ¡ª¡ª¡ª¡ªÎÞÂÛºÎÖÖÔ­ÒòµÇ¼ʧ°Ü¶¼ÏÔʾʧ°ÜÔ­Òò
--with-welcomemsg \                             ¡ª¡ª¡ª¡ª ÏÔʾ»¶Ó­ÐÅÏ¢
--with-language=simplified-chinese                                                      ¡ª¡ª¡ª¡ªÊ¹ÓüòÌåÖÐÎÄ×÷ΪÈí¼þ½çÃæ
Íê³ÉÖ®ºó±£´æÍ˳ö£¬¸øÓè¸ÃÎļþ¿ÉÖ´ÐÐÎļþ£¬²¢ÇÒ°´Õսű¾·½Ê½À´Ö´Ðа²×°²Ù×÷¡£
[root@server ~]# chmod 755 install_pureftpd
[root@server ~]# ./install_pureftpd
ÉÏÊö²Ù×÷Ö´ÐÐÁ˱àÒëÇ°µÄ»·¾³ÅäÖã¬ÈçÏ£º
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­
configure: You have /dev/urandom - Great
configure: You have /dev/random - Great
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating pam/Makefile
config.status: creating man/Makefile
config.status: creating gui/Makefile
config.status: creating configuration-file/Makefile
config.status: creating contrib/Makefile
config.status: creating m4/Makefile
config.status: creating configuration-file/pure-ftpd.conf
config.status: creating configuration-file/pure-config.pl
config.status: creating configuration-file/pure-config.py
config.status: creating puredb/Makefile
config.status: creating puredb/src/Makefile
config.status: creating pure-ftpd.spec
config.status: creating config.h
config.status: executing depfiles commands
configure: +--------------------------------------------------------------------------+
configure: | You can subscribe to the Pure-FTPd users mailing-list                                                      |
configure: | to ask for help and to stay informed of new releases.                                                       |
configure: | Go to http://www.pureftpd.org/ml/ now!                                                                                 |
configure: +--------------------------------------------------------------------------+

½øÈëÖ¸¶¨Ä¿Â¼½øÐбàÒë²¢ÇÒ°²×°£º
[root@server ~]# cd /usr/local/packages/temp/pure-ftpd-1.0.20/
[root@server ~]# cd /usr/local/packages/temp/pure-ftpd-1.0.20/
[root@server pure-ftpd-1.0.20]# make
[root@server pure-ftpd-1.0.20]# make install
Éú³ÉÅäÖýű¾£º
[root@server pure-ftpd-1.0.20]# cp configuration-file/pure-config.pl /usr/local/pureftpd/sbin/
¸ü¸ÄÅäÖýű¾È¨ÏÞ£º
[root@server pure-ftpd-1.0.20]# chmod +x /usr/local/pureftpd/sbin/pure-config.pl
Éú³ÉftpµÄ·þÎñÖ÷Ŀ¼£º
[root@server pure-ftpd-1.0.20]# mkdir /ftproot
ÒÔÏÂÒªÉú³Épure-ftp·þÎñ¹ÜÀí½Å±¾£º
[root@server pure-ftpd-1.0.20]# cd contrib/
[root@server contrib]# vi redhat.init
½«ÆäÖÐÏÂÃæµÄÓï¾ä£º
fullpath=/usr/local/sbin/$prog
pureftpwho=/usr/local/sbin/pure-ftpwho
¸ü¸ÄΪ£º
fullpath=/usr/local/pureftpd/sbin/$prog
pureftpwho=/usr/local/pureftpd/sbin/pure-ftpwho
½«¸ÃÎļþ¸´ÖƵ½/etc/init.dĿ¼Öв¢ÇÒÖØÃüÃûΪpure-ftpd
[root@server contrib]# cp redhat.init /etc/init.d/pure-ftpd
²¢ÇÒ¸ü¸Ä¸ÃÎļþΪ¿ÉÖ´ÐУº
[root@server contrib]# chmod +x /etc/init.d/pure-ftpd
½«¸Ã·þÎñÌí¼Óµ½Æô¶¯·þÎñÁÐ±í²¢ÅäÖø÷þÎñËæϵͳÆô¶¯¶øÆô¶¯£º
[root@server contrib]# chkconfig --add pure-ftpd
[root@server contrib]# chkconfig pure-ftpd on
ÓÉÓÚpure-ftpd½«FTPÄäÃûÓû§Ó³Éäµ½ÃûΪftpµÄϵͳÕʺţ¬ËùÒÔftpϵͳÕʺŵÄÖ÷Ŀ¼¾ÍÊÇFTPÄäÃûÓû§µÄÖ÷Ŀ¼¡£Èç¹ûÐèÒªFTP·þÎñÆ÷ÔÊÐíÄäÃûµÇ¼£¬¾ÍÐèÒª½¨Á¢Ò»¸öÃûΪftpµÄϵͳÕʺţ¬¶øÇÒ¸ÃÕʺŵÄÖ÷Ŀ¼±ØÐë´æÔÚ¡£Ä¬ÈÏÇé¿öÏÂpure-ftpd°²×°µÄʱºòÒѾ­½¨Á¢ÁËftpÕʺţ¬µ«ÊǸÃÕʺÅĬÈϵÄÖ÷Ŀ¼/var/ftp²»´æÔÚ£¬ËùÒÔÒª½¨Á¢/var/ftp£¬µ«ÊÇÈç¹ûϵͳÖÐÒѾ­°²×°vsftp·þÎñµÄ»°£¬¸ÃĿ¼»á×Ô¶¯½¨Á¢¡£ÒòΪÈç¹ûÏ£ÍûFTPÄäÃûÓû§Äܹ»ÉÏ´«Îļþ£¬¾Í±£Ö¤ftpϵͳÕʺŶÔÖ÷Ŀ¼ÓÐдÈëȨÏÞ£º
[root@server contrib]# chown ftp.ftp /var/ftp

ÏÖÔÚ¿ªÊ¼°²×°¶Ôpure-ftpd½øÐйÜÀíµÄ»ùÓÚwebµÄ¹ÜÀí¹¤¾ßwebpureftp£¬µ«ÊÇÒòΪ¸ÃÈí¼þµÄPHPÔ´´úÂëʹÓÃÁËZendEncode½øÐÐÁ˼ÓÃÜ£¬ËùÒÔÐèÒª°²×°Zend Oprimizer²Å¿ÉÒÔÖ´ÐÐwebpureftpĿ¼ÖмÓÃܵÄPHP³ÌÐò¡£·ñÔò»á³öÏÖÂÒÂë¡£Òò´ËÏÖÔÚ°²×°ZendEncode£º
[root@server ~]# cd /usr/local/packages/
[root@server packages]# ls
pure-ftpd-1.0.20.tar.gz    webpureftp0.1.tar.gz
temp                                   ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz
[root@server packages]# tar -zxf ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz -C temp/
[root@server packages]# cd temp/ZendOptimizer-2.5.10a-linux-glibc21-i386/
[root@server ZendOptimizer-2.5.10a-linux-glibc21-i386]# ./install.sh
ͨ¹ýÉÏÊö²Ù×÷£¬»áÓÐÒ»¸ö°²×°Ïòµ¼£¬½¨Òé½ÓÊÜÈ«²¿µÄĬÈÏÌõ¼þ£º
1£®ÊÇ·ñ½ÓÊÜЭÒ顪¡ª¡ª¡ªÊÇ
2£®Zend°²×°Ä¿Â¼ÊÇ·ñ/usr/local/Zend¡ª¡ª¡ª¡ªÊÇ
3£®È·ÈÏphp.iniÅäÖÃÎļþÊÇ·ñÔÚ/etc/Ŀ¼ÖСª¡ª¡ª¡ªÊÇ
4£®ÊÇ·ñʹÓÃApache×÷ΪĬÈϵÄWEB·þÎñÆ÷¡ª¡ª¡ª¡ªÊÇ
5£®ApacheĬÈϵĿØÖÆ·¾¶ÊÇ·ñÊÇ/usr/sbin/apachectlĿ¼¡ª¡ª¡ª¡ªÊÇ
6£®ÊÇ·ñÖØÆôApache·þÎñ¡ª¡ª¡ª¡ªÊÇ

×¢ÒâÕâÀïµÄÌáʾ£º
The following configuration changes have been made:                                   
                   x - The php.ini file has been relocated from /etc to /usr/local/Zend/etc    x
                   x - A symbolic link for the php.ini file has been created in /etc.              x
                   x - The original php.ini was backed up to /etc/php.ini-zend_optimizer.bak              x
ÔÚÉÏÊöµÄÍê³É¹ý³ÌÖУ¬¿ÉÄÜ»áÅöµ½Zend OptimizerÓëSELinuxµÄÅäºÏÎÊÌâ¡£
Ö÷ÒªÒòΪZendÔÚ°²×°Ê±ÐèÒªÐÞ¸Ä/etc/php.iniÎļþµÄÄÚÈÝ£¬²¢½«¸ÃÎļþÌ滻Ϊһ¸ö·ûºÅÁ´½ÓÎļþ£¬Ö¸Ïò/usr/local/Zend/etc/php.ini£¬ËùÒÔÔì³ÉApache·þÎñÆ÷ÔÚÿ´ÎÆô¶¯¶¼»áÎ¥·´SELinuxµÄ¹æÔò³ö´í¡£
½â¾öµÄ·½·¨ÓÐÁ½ÖÖ£º

µÚÒ»ÖÖ£ºÔÚÕû¸öÅäÖÃ֮ǰ¹Ø±ÕSELinux£º
[root@server ~]# vi /etc/sysconfig/selinux
Õë¶ÔÏÂÃæµÄÄÚÈÝ£º
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#           enforcing - SELinux security policy is enforced.
#           permissive - SELinux prints warnings instead of enforcing.
#           disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
#           targeted - Only targeted network daemons are protected.
#           strict - Full SELinux protection.
SELINUXTYPE=targeted
½«SELINUX=enforcing¸ü¸ÄΪSELINUX=disabled²¢ÇÒÖØÐÂÆô¶¯ÏµÍ³

µÚ¶þÖÖ£ºÔÚûÓиü¸Ä¸ÃÅäÖÃÎļþÇé¿öÏÂʹÓÃÏÂÃæÃüÁîÉèÖÃÎļþÏà¹Ø°²È«ÊôÐÔ£º
[root@server ~]# rm -f /etc/php.ini
[root@server ~]# cp /usr/local/Zend/etc/php.ini /etc/
[root@server ~]# chcon -u system_u /etc/php.ini
[root@server ~]# chcon -t shlib_t /usr/local/Zend/lib/ZendExtensionManager.so
[root@server ~]# chcon -t shlib_t /usr/local/Zend/lib/Optimizer-2.5.10/php-4.3.x/ZendOptimizer.so

ÏÂÃ濪ʼÉú³ÉMysqlÊý¾Ý¿â£¬Í¨¹ýwebpureftpÈí¼þµÄ°²×°¿ÉÒÔʵÏÖ¹ÜÀípure-ftpdºÍmysql½á¹¹ÖеÄphpÕÊ»§£¬·½·¨ÈçÏ£º
[root@server ~]# cd /usr/local/packages/
[root@server packages]# tar -zxf webpureftp0.1.tar.gz -C temp/

ÏÂÃ濪ʼ¶ÔÖ÷ÅäÖÃÎļþ½øÐÐÐ޸ģº
[root@server ~]# cd /usr/local/packages/
[root@server packages]# tar -zxf webpureftp0.1.tar.gz -C temp/
[root@server packages]# cd temp/webpureftp0.1/
[root@server webpureftp0.1]#
[root@server webpureftp0.1]# vi SQL/pureftp_0.1.sql
ÕÒµ½DROP TABLE IF EXISTS `depart_info`;Õâ¾ä£¬ÔÚÇ°Ãæ¼ÓÉÏ£º
CREATE DATABASE pureftp;
USE pureftp;


ÄÇôÕû¶Î³ÉΪ£º
CREATE DATABASE pureftp;
USE pureftp;
DROP TABLE IF EXISTS `depart_info`;
CREATE TABLE `depart_info` (
    `id` int(4) NOT NULL auto_increment,
    `name` varchar(30) NOT NULL default ,
    PRIMARY KEY    (`id`),
    KEY `id` (`id`)
) TYPE=MyISAM AUTO_INCREMENT=21 ;
±£´æÍ˳ö¡£
×îºóÖ´ÐÐÃüÁîÉú³ÉmysqlÊý¾Ý¿â£º

[root@server webpureftp0.1]# mysql -u root -p < SQL/pureftp_0.1.sql
Enter password:
[root@server webpureftp0.1]#

²âÊÔ£º
[root@server webpureftp0.1]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.    Commands end with ; or \g.
Your MySQL connection id is 8 to server version: 4.1.7

Type help; or \h for help. Type \c to clear the buffer.

mysql> show databases;
+-------------+
| Database         |
+-------------+
| mysql                |
| pureftp              |
| test                    |
+-------------+
3 rows in set (0.01 sec)

mysql> use pureftp;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------------+
| Tables_in_pureftp               |
+------------------------+
| depart_info                              |
| ftp_users                                  |
| ftp_users_info                        |
| user_info                                   |
+------------------------+
4 rows in set (0.00 sec)

mysql> quit
Bye
[root@server webpureftp0.1]#



ÏÖÔÚÐÞ¸Äpure-ftpdµÄÖ÷ÅäÖÃÎļþ
[root@server webpureftp0.1]# cd docs/
[root@server docs]# vi pureftpd-mysql.conf£¬¸ü¸ÄÏÂÁÐÓï¾ä£º
½«£º
MYSQLUser           network              ¸ü¸ÄΪ£º              MYSQLUser           root
½«£º
MYSQLPassword     123456              ¸ü¸ÄΪ£º              MYSQLPassword     123456
£¨ÓÉÓÚÎÒÕâÀï¾ÍÊÇʹÓÃ123456£¬ËùÒÔ²»¸Ä£©

½«£º
MYSQLDatabase     network                                        ¸ü¸ÄΪ£º              MYSQLDatabase     pureftp

Íê³ÉÖ®ºó¸´ÖÆÏÂÃæÁ½¸öÎļþµ½/etc/Ŀ¼Ï£º
[root@server docs]# cp pure-ftpd.conf /etc
[root@server docs]# cp pureftpd-mysql.conf /etc

×îºóÒ»²½£¬¿ªÊ¼ÅäÖÃwebpureftp£¬½øÈëwebpureftp½âѹĿ¼£¬Ò²¾ÍÊǸղŵÄwebpureftp0.1±à¼­config×ÓĿ¼ÖеÄconfig.inc.phpÎļþ£¬½«ÆäÖеÄ·¾¶ÐÞ¸ÄÊÇʵ¼Ê·¾¶£¬½«¿ÚÁîÒ²ÐÞ¸ÄΪʵ¼Ê¿ÚÁ
[root@server docs]# pwd
/usr/local/packages/temp/webpureftp0.1/docs
[root@server docs]# cd ..
[root@server webpureftp0.1]# vi config/config.inc.php
ÏÂÃæÊÇÔ­À´Î´Ð޸ĵÄÄÚÈÝ£º
$orig_title = Web PureFTP¹ÜÀìϵͳ;

$pagesize=20;
$topsize[0]=8;
$topsize[1]=10;
$topsize[2]=15;
$topsize[3]=20;
$;

$default_ftp_root=/data/ftp;

$obj_db=new db(localhost,root,,pureftp);
?>
¸ü¸ÄΪÒÔÏÂÄÚÈÝ£º
$orig_title = Web PureFTP¹ÜÀìϵͳ;

$pagesize=20;
$topsize[0]=8;
$topsize[1]=10;
$topsize[2]=15;
$topsize[3]=20;
$;

$default_ftp_root=/ftproot;

$obj_db=new db(localhost,root,123456,pureftp);
?>
±£´æÍ˳ö£¬²¢½«Õû¸öµÄĿ¼¿½±´µ½apache·þÎñÆ÷µÄ·þÎñĿ¼Ï£¬½øÐÐÖØÃüÃû£º
[root@server webpureftp0.1]# cd ..
[root@server temp]# cp -a webpureftp0.1/ /var/www/html/webpureftp
[root@server temp]#

ÏÖÔÚ½øÐÐʵ¼ÊµÄ²âÊÔ£º
Ê×ÏÈʹÓÿͻ§¶Ë½øÐеǼ²âÊÔ£ºhttp://www.jerrywjl.com/webpureftp£¨µ±È»¿Í»§¶ËÒª×÷DNSÖ¸Ïò£©
Èô³öÏֵǼҳÃ棬ʹÓÃĬÈϵĹÜÀíÔ±ÕʺÅadminÒÔ¼°ÃÜÂëadmin¾Í¿ÉÒÔ½øÈëÕâÌ×¹ÜÀíϵͳ£º

¸Ã¹ÜÀíϵͳÖ÷ҪʵÏÖÕʺŵÄÌí¼ÓÒÔ¼°¹ÜÀí¹¤×÷£¬ÖÁÓÚpure-ftpµÄ²Ù×÷£¬»¹±ØÐëÒªÐ޸ĸ÷þÎñµÄÖ÷ÅäÖÃÎļþ£¬²¢ÇÒÆô¶¯¸Ã·þÎñ¡£Pure-ftpµÄ·þÎñÅäÖÃÎļþÔÚ/etc/pure-ftpd.confÖС£
Õë¶Ô¸ÃÅäÖÃÎļþ£¬¿ÉÒÔ×÷Èçϸü¸Ä£º
[root@server temp]# vi /etc/pure-ftpd.conf


############################################################
#                                                                                                                                                                                                  #
#               Configuration file for pure-ftpd wrappers                                                                                          #
#                                                                                                                                                                                                  #
############################################################

# If you want to run Pure-FTPd with this configuration
# instead of command-line options, please run the
# following command :
#
# /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
#
# Please dont forget to have a look at documentation at
# http://www.pureftpd.org/documentation.html for a complete list of
# options.

# Cage in every user in his home directory

ChrootEveryone                        yes                          ¡ª¡ª¡ª¡ªÊÇ·ñ½«ËùÓÐÓû§Ëø¶¨µ½×ÔÉíĿ¼ÖÐ

# If the previous option is set to no, members of the following group
# wont be caged. Others will be. If you dont want chroot()ing anyone,
# just comment out ChrootEveryone and TrustedGID.

# TrustedGID                                  100


# Turn on compatibility hacks for broken clients

BrokenClientsCompatibility    no

# Maximum number of simultaneous users

MaxClientsNumber                    50


# Fork in background

Daemonize                               yes


# Maximum number of sim clients with the same IP address

MaxClientsPerIP                     8                                        ¡ª¡ª¡ª¡ªÃ¿¸öIPµØÖ·µÄ×î´óÁ¬½ÓÊý


# If you want to log all client commands, set this to yes.
# This directive can be duplicated to also log server responses.

VerboseLog                              no


# List dot-files even when the client doesnt send -a.

DisplayDotFiles                     yes


# Dont allow authenticated users - have a public anonymous FTP only.

AnonymousOnly                         no                          ¡ª¡ª¡ª¡ªÊÇ·ñÖ»ÔÊÐíÄäÃûÓû§Á¬½Ó


# Disallow anonymous connections. Only allow authenticated users.

NoAnonymous                             no                          ¡ª¡ª¡ª¡ªÊÇ·ñÔÊÐíÄäÃûÓû§µÇ¼


# Syslog facility (auth, authpriv, daemon, ftp, security, user, local*)
# The default facility is ftp. none disables logging.

SyslogFacility                        ftp


# Display fortune cookies

# FortunesFile                        /usr/share/fortune/zippy                         
FortunesFile                    /etc/ftpmsg                          ¡ª¡ª¡ª¡ªÉèÖû¶Ó­ÐÅÏ¢ÎļþλÖÃ


# Dont resolve host names in log files. Logs are less verbose, but
# it uses less bandwidth. Set this to yes on very busy servers or
# if you dont have a working DNS.

DontResolve                             yes
              

# Maximum idle time in minutes (default = 15 minutes)

MaxIdleTime                             15                          ¡ª¡ª¡ª¡ªÉèÖÃÓû§¿Õ϶ÄÇʱ¼ä³¬¹ýÏÞÖÆ


# LDAP configuration file (see README.LDAP)

# LDAPConfigFile                          /etc/pureftpd-ldap.conf


# MySQL configuration file (see README.MySQL)

MySQLConfigFile                         /etc/pureftpd-mysql.conf


# Postgres configuration file (see README.PGSQL)

# PGSQLConfigFile                         /etc/pureftpd-pgsql.conf


# PureDB user database (see README.Virtual-Users)

# PureDB                                        /etc/pureftpd.pdb


# Path to pure-authd socket (see README.Authentication-Modules)

# ExtAuth                                       /var/run/ftpd.sock


# If you want to enable PAM authentication, uncomment the following line

# PAMAuthentication                     yes


# If you want simple Unix (/etc/passwd) authentication, uncomment this

# UnixAuthentication                    yes


# Please note that LDAPConfigFile, MySQLConfigFile, PAMAuthentication and
# UnixAuthentication can be used only once, but they can be combined
# together. For instance, if you use MySQLConfigFile, then UnixAuthentication,
# the SQL server will be asked. If the SQL authentication fails because the
# user wasnt found, another try # will be done with /etc/passwd and
# /etc/shadow. If the SQL authentication fails because the password was wrong,
# the authentication chain stops here. Authentication methods are chained in
# the order they are given.


# ls recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth

LimitRecursion                        2000 8

# Are anonymous users allowed to create new directories ?

AnonymousCanCreateDirs          no                          ¡ª¡ª¡ª¡ªÊÇ·ñÔÊÐíÄäÃûÓû§½¨Á¢Ä¿Â¼

# If the system is more loaded than the following value,
# anonymous users arent allowed to download.

MaxLoad                                   4


# Port range for passive connections replies. - for firewalling.

# PassivePortRange                30000 50000                          ¡ª¡ª¡ª¡ªÓÃÓÚÁ¬½ÓµÄ±»¶¯¶Ë¿Ú·¶Î§

# Force an IP address in PASV/EPSV/SPSV replies. - for NAT.
# Symbolic host names are also accepted for gateways with dynamic IP
# addresses.

# ForcePassiveIP                          192.168.0.1

# Upload/download ratio for anonymous users.

# AnonymousRatio                          1 10


# Upload/download ratio for all users.
# This directive superscedes the previous one.

# UserRatio                             1 10


# Disallow downloading of files owned by ftp, ie.
# files that were uploaded but not validated by a local admin.

AntiWarez                               yes                          ¡ª¡ª¡ª¡ªÊÇ·ñÔÊÐíÏÂÔØÓÉÄäÃûÓû§ÉÏ´«µÄÎļþ


# IP address/port to listen to (default=all IP and port 21).

# Bind                                    127.0.0.1,21                          ¡ª¡ª¡ª¡ªÉèÖ÷þÎñÆ÷°ó¶¨µÄµØÖ·ºÍ¶Ë¿Ú


# Maximum bandwidth for anonymous users in KB/s

# AnonymousBandwidth                    8                          ¡ª¡ª¡ª¡ªÉèÖÃÄäÃûÓû§¿ÉÒÔʹÓõĴø¿í

# Maximum bandwidth for *all* users (including anonymous) in KB/s
# Use AnonymousBandwidth *or* UserBandwidth, both makes no sense.

# UserBandwidth                     8                          ¡ª¡ª¡ª¡ªÉèÖñ¾µØÓû§¿ÉÒÔʹÓõĴø¿í


# File creation mask. : .
# 177:077 if you feel paranoid.

Umask                                       133:022


# Minimum UID for an authenticated user to log in.

MinUID                                    100

# Allow FXP transfers for authenticated users only.

AllowUserFXP                          yes

# Allow anonymous FXP for anonymous and non-anonymous users.

AllowAnonymousFXP                   no

# Users cant delete/write files beginning with a dot (.)
# even if they own them. If TrustedGID is enabled, this group
# will have access to dot-files, though.

ProhibitDotFilesWrite           no


# Prohibit *reading* of files beginning with a dot (.history, .ssh...)

ProhibitDotFilesRead              no


# Never overwrite files. When a file whoose name already exist is uploaded,
# it get automatically renamed to file.1, file.2, file.3, ...

AutoRename                              no


# Disallow anonymous users to upload new files (no = upload is allowed)

AnonymousCantUpload               no                          ¡ª¡ª¡ª¡ªÊÇ·ñÔÊÐíÄäÃûÓû§ÉÏ´«Îļþ


# Only connections to this specific IP address are allowed to be
# non-anonymous. You can use this directive to open several public IPs for
# anonymous FTP, and keep a private firewalled IP for remote administration.
# You can also only allow a non-routable local IP (like 10.x.x.x) to
# authenticate, and keep a public anon-only FTP server on another IP.

#TrustedIP                              10.1.1.1


# If you want to add the PID to every logged line, uncomment the following
# line.

LogPID                                   yes

# Create an additional log file with transfers logged in a Apache-like format :
# fw.c9x.org - jedi [13/Dec/1975:19:36:39] GET /ftp/linux.tar.bz2 200 21809338
# This log file can then be processed by www traffic analyzers.

#AltLog                                   clf:/tmp/pureftpd.log


# Create an additional log file with transfers logged in a format optimized
# for statistic reports.

#AltLog                                   stats:/tmp/pureftpd.log


# Create an additional log file with transfers logged in the standard W3C
# format (compatible with most commercial log analyzers)

#AltLog                                   w3c:/var/log/pureftpd.log

# Disallow the CHMOD command. Users cant change perms of their files.

#NoChmod                                   yes

# Allow users to resume and upload files, but *NOT* to delete them.

#KeepAllFiles                          yes

# Automatically create home directories if they are missing

CreateHomeDir                         yes                          ¡ª¡ª¡ª¡ªÉèÖÃÊÇ·ñ×Ô¶¯½¨Á¢Óû§Ö÷Ŀ¼


# Enable virtual quotas. The first number is the max number of files.
# The second number is the max size of megabytes.
# So 1000:10 limits every user to 1000 files and 10 Mb.

#Quota                                       1000:10


# If your pure-ftpd has been compiled with standalone support, you can change
# the location of the pid file. The default is /var/run/pure-ftpd.pid

#PIDFile                                   /var/run/pure-ftpd.pid


# If your pure-ftpd has been compiled with pure-uploadscript support,
# this will make pure-ftpd write info about new uploads to
# /var/run/pure-ftpd.upload.pipe so pure-uploadscript can read it and
# spawn a script to handle the upload.

#CallUploadScript yes

# This option is useful with servers where anonymous upload is
# allowed. As /var/ftp is in /var, it save some space and protect
# the log files. When the partition is more that X percent full,
# new uploads are disallowed.

MaxDiskUsage                         99


# Set to yes if you dont want your users to rename files.

#NoRename                              yes


# Be customer proof : workaround against common customer mistakes like
# chmod 0 public_html, that are valid, but that could cause ignorant
# customers to lock their files, and then keep your technical support busy
# with silly issues. If youre sure all your users have some basic Unix
# knowledge, this feature is useless. If youre a hosting service, enable it.

CustomerProof                        yes

# Per-user concurrency limits. It will only work if the FTP server has
# been compiled with --with-peruserlimits (and this is the case on
# most binary distributions) .
# The format is : :
# For instance, 3:20 means that the same authenticated user can have 3 active
# sessions max. And there are 20 anonymous sessions max.

# PerUserLimits                    3:20                          ÉèÖÃÿ¸öÓû§×î´ó²¢·¢Á¬½ÓÊý

# When a file is uploaded and there is already a previous version of the file
# with the same name, the old file will neither get removed nor truncated.
# Upload will take place in a temporary file and once the upload is complete,
# the switch to the new version will be atomic. For instance, when a large PHP
# script is being uploaded, the web server will still serve the old version and
# immediatly switch to the new one as soon as the full file will have been
# transfered. This option is incompatible with virtual quotas.

# NoTruncate                         yes

# This option can accept three values :
# 0 : disable SSL/TLS encryption layer (default).
# 1 : accept both traditional and encrypted sessions.
# 2 : refuse connections that dont use SSL/TLS security mechanisms,
#         including anonymous sessions.
# Do _not_ uncomment this blindly. Be sure that :
# 1) Your server has been compiled with SSL/TLS support (--with-tls),
# 2) A valid certificate is in place,
# 3) Only compatible clients will log in.

# TLS                                    1

# Listen only to IPv4 addresses in standalone mode (ie. disable IPv6)
# By default, both IPv4 and IPv6 are enabled.

# IPV4Only                             yes

# Listen only to IPv6 addresses in standalone mode (ie. disable IPv4)
# By default, both IPv4 and IPv6 are enabled.

# IPV6Only                             yes

¶Ô¸ÃÎļþÐÞ¸ÄÍê±ÏºóÖØÆô·þÎñ£º
[root@server temp]# /etc/init.d/pure-ftpd start
Starting pure-config.pl: Running: /usr/local/pureftpd/sbin/pure-ftpd --daemonize -A -c50 -B -C8 -D -fftp -F/etc/ftpmsg -H -I15 -lmysql:/etc/pureftpd-mysql.conf -L2000:8 -m4 -s -U133:022 -u100 -w -1 -j -k99 -Z

[root@server temp]# chkconfig pure-ftpd on
[root@server temp]#
´ËʱʹÓÃÃüÁîÐнøÐзÃÎʲâÊÔ£¬»á³öÏÖÏÂÁд°¿Ú£º
[root@server temp]# ftp
ftp> open 192.168.1.10
Connected to 192.168.1.10.
220---------- »¶Ó¬À´µ½ Pure-FTPd ----------
220-Ĩ²ÊÇµÚ 1 ¸öʹÓÃÕߣ¬¡Á¤¿É´ï 50 ¸öÁ¬½Ó
220-ÏÖÔÚ¡À¾µØÊ¡À¼äÊÇ 00:05¡£•þÎñơ¶˿ڣº 21¡£
220-Õⲿ֡»¨²Ò²»¶Ó¬IPv6µÄÁ¬½Ó
220 ÔÚ 15 •ÖÖÓÄÚûÓл£¬Ä¨²¡À»»¨¢¶ÏÏß¡£
500 ¡ã²È«À©³äÏîδʵʩ
500 ¡ã²È«À©³äÏîδʵʩ
KERBEROS_V4 rejected as an authentication type
Name (192.168.1.10:root):
¿ÉÒÔʹÓÃÄäÃûÕʺŵǼ·þÎñÆ÷¡£

ÎÒÒªÆÀÂÛ
  • ÄäÃû·¢±í
  • [Ìí¼Óµ½ÊղؼÐ]
  • ·¢±íÆÀÂÛ£º(ÄäÃû·¢±íÎÞÐèµÇ¼£¬ÒѵǼÓû§¿ÉÖ±½Ó·¢±í¡£) µÇ¼״̬£ºÎ´µÇ¼
×îÐÂÆÀÂÛ
ËùÓÐÆÀÂÛ[0]
    ÔÝÎÞÒÑÉóºËÆÀÂÛ!

©® ÍøÕ¾µ¼º½ ©® ¹ÜÀíµÇ½ ©® ÃâÔðÉùÃ÷ ©® ÎÊÌâ·´À¡ ©® ÓÑÁ´ËµÃ÷©®
±¾Õ¾²¿·ÖÄÚÈÝÀ´×ÔÍøÂç¹²Ïí×ÊÔ´£¬ÈçÓÐð·¸ÄúµÄȨÀûÇëÀ´ÐŸæ֮ɾ³ý»ò¾ÀÕý£¡
²»µÃ¶Ô±¾Õ¾½øÐи´ÖÆ¡¢µÁÁ´»ò¾µÏñ£¬×ªÔØÄÚÈÝÐë»ñµÃͬÒâ»òÊÚȨ£»»¶Ó­ÓÑÇéÁ´½Ó¡¢Õ¾ÎñºÏ×÷£¡

    ÎÒÒª±¨¾¯ Alexa
 mcusy_cn#126.com (Çë°Ñ#¸Ä³É@) ½»Á÷£º522422171
±¾Õ¾Ñ§Ï°½»Á÷Ⱥ£º138..158(¸ß¼¶Èº1-Âú)¡¢77930286(¸ß¼¶Èº2)¡¢61804809(Ⱥ3)
Copyright© MCUSY All Rights Reserved
±¾Õ¾Íø¾¯±¸°¸ºÅ£º WZ36040002485
  ICP±¸°¸Ö¤ÊéºÅ£ºÔÁICP±¸09034963ºÅ