免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1583 | 回复: 0
打印 上一主题 下一主题

pureftp+mysql+webpureftpd [复制链接]

论坛徽章:
4
ChinaUnix专家徽章
日期:2015-07-27 10:05:26IT运维版块每日发帖之星
日期:2015-09-01 06:20:00IT运维版块每日发帖之星
日期:2016-07-29 06:20:00PHP
日期:2016-10-25 16:08:01
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-15 17:27 |只看该作者 |倒序浏览

1.下载安装软件
#cd /opt/distfiles
1.1下载mysql
#wget http://mysql.rhnet.is/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz
1.2下载pureftp
#wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.21.tar.gz
1.3下载webpureftp
#wget http://blogimg.chinaunix.net/blog/upfile2/081215163458.gz
2.安装软件
2.1安装配置mysql
#cd /opt/distfiles
#tar zxvf mysql-5.0.67.tar.gz
#cd mysql-5.0.67
编译:
#./configure \
--prefix=/opt/modules/mysql5 \
--with-mysqld-user=mysql \
--without-debug \
--with-big-tables \
--with-charset=latin1 \
--with-collation=latin1_swedish_ci \
--with-extra-charsets=all \
--with-pthread \
--enable-static \
--enable-thread-safe-client \
--with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static \
--enable-assembler \
--without-ndb-debug
#make &&make install
初始化:
#groupadd mysql
#useradd mysql –g mysql
#chown –R mysql.mysql /opt/modules/mysql5/
# /opt/modules/mysql5/bin/mysql_install_db --user=mysql
# /opt/modules/mysql5/share/mysql/mysql.server start
# /opt/modules/mysql5/bin/mysqladmin -u root password 'new-password'
#cp support-files/my-large.cnf /etc/my.cnf
#/opt/modules/mysql5/share/mysql/mysql.server restart
2.2安装配置pureftp
#tar zxvf pure-ftpd-1.0.21.tar.gz
#cd pure-ftpd-1.0.21
#./configure \
--prefix=/opt/modules/pureftpd \
--with-mysql=/opt/modules/mysql5/ \
--with-cookie \
--with-throttling \
--with-ratios \
--with-altlog \
--with-ratios \
--with-quotas \
--with-ftpwho \
--with-largefile \
--with-virtualhosts \
--with-virtualchroot \
--with-diraliases \
--with-debug \
make &&make install
配置:
创建配置文件:
#vi /etc/pureftpd-mysql.conf
内容:
#MYSQLServer     localhost
#MYSQLPort       3306
MYSQLSocket     /tmp/mysql.sock
MYSQLUser       root
MYSQLPassword   rootpw
MYSQLDatabase   pureftpd
MYSQLCrypt      cleartext
MYSQLGetPW      SELECT Password FROM users WHERE User="\L"
MYSQLGetUID     SELECT Uid FROM users WHERE User="\L"
MYSQLGetGID     SELECT Gid FROM users WHERE User="\L"
MYSQLGetDir     SELECT Dir FROM users WHERE User="\L"
MySQLGetQTASZ  SELECT QuotaSize FROM users WHERE User="\L"
MySQLGetQTAFS  SELECT QuotaFiles FROM users WHERE User="\L"

#cd configuration-file
#cp pure-ftpd.conf /etc/
#vi pure-config.pl
加入pure-ftpd路径:
my $PUREFTPD;
-x && ($PUREFTPD=$_, last) for qw(
        ${exec_prefix}/sbin/pure-ftpd
        /opt/modules/pureftpd/sbin/pure-ftpd
);

#chmod 755 pure-config.pl
#./pure-config.pl /et       c/pure-ftpd.conf
#vi pure-ftpd.conf
内容:
ChrootEveryone              yes
BrokenClientsCompatibility     no
MaxClientsNumber            50
Daemonize                   yes
MaxClientsPerIP             8
VerboseLog                 yes
DisplayDotFiles             yes
AnonymousOnly               no
NoAnonymous                yes
SyslogFacility             daemon
DontResolve                no
MaxIdleTime                 15
MySQLConfigFile               /etc/pureftpd-mysql.conf
LimitRecursion              2000 8
AnonymousCanCreateDirs      no
MaxLoad                     4
AntiWarez                   yes
Bind                      127.0.0.1,21
Umask                       133:022
MinUID                      100
AllowUserFXP                no
AllowAnonymousFXP           no
ProhibitDotFilesWrite       no
ProhibitDotFilesRead        no
AutoRename                  no
AnonymousCantUpload        yes
AltLog                     clf:/opt/modules/pureftpd/log/pureftpd.log
NoChmod                    no
CreateHomeDir               yes
PIDFile                     /var/run/pure-ftpd.pid
MaxDiskUsage               99
CustomerProof              yes

2.3安装配置web pureftpd 管理
安装webpureftp需要先安装apache或者lighttpd等WEB服务器,创建一个目录
下载ftp_v_cn1.3.1.tar.gz
这个是支持中文的pureftpd WEB管理程序(自己汉化的,希望大家笑纳)
#tar zxvf 081215163458.gz
#mv ftp /opt/www/html/
#vi /opt/www/html/ftp/config.php
内容:
$LANG = $DUTCH;                     // Language (Options are $DUTCH, $ENGLISH, //$PT_BR, $RUSSIAN
                                      //           $SPANISH, $COREAN, //$FRENCH, $HUNGARIAN, //$GERMAN
                                      //           $TURKISH,$CN(中文), $DANISH //or $NORWEGIAN)

  $LocationImages =  "images";        // Location of images

  $DBHost = "127.0.0.1";              // Ip-adres of MySQL server
                                      // (Don~Rt change this if you are using the default //database)

  $DBLogin = "ftp";                   // Username of MySQL user

  $DBPassword = "tmppasswd";          // Password of MySQL user

  $DBDatabase = "ftpusers";           // Name of database

  $FTPAddress = "myipaddress.com:21"; // Domain name or ip-address of your ftp server

  $DEFUserID = "65534"; // nobody     // Default user id of virtual ftp user.

  $DEFGroupID = "31";   // guest      // Default group is of virtual ftp user.

  $UsersFile = "/etc/passwd";        // The unix user file

  $GroupFile = "/etc/group";         // The unix group file

  /* This list of users will not appear in the dropdown menu. */
  $BlacklistUsers = array ('adm','bin','bind','daemon','gopher','halt','kmem','lp',
                           'mailnull','man','named','nfsnobody','nscd','operator',
                           'pop','root','rpc','rpcuser','rpm','shutdown','smmsp',
                           'sshd','sync','toor','tty','uucp','vcsa','xfs');

  /* This list of groups will not appear in the dropdown menu. */
  $BlacklistGroups = array ('adm','bin','bind','daemon','dialer','dip','disk','floppy','gopher','kmem',
                           'lock','lp','mailnull','man','named','mem','network','news',
                           'nscd','ntp','operator','pcap','root','rpc','rpcuser','rpm','slocate','smmsp',
                           'sshd','staff','sys','tty','utmp','uucp','vcsa','wheel','xfs');

配置apache或lighttpd将访问目录配置到/opt/www/html/ 下面,之后通过
http://localhost/ftp/
进行访问
之后就按照提示进行配置就可以了


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/88527/showart_1722067.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP