分类: LINUX
2008-12-15 17:27:59
#cd /opt/distfiles
#wget
#wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-
#wget http://blogimg.chinaunix.net/blog/upfile2/081215163458.gz
#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
#tar zxvf pure-ftpd-
#cd pure-ftpd-
#./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
安装webpureftp需要先安装apache或者lighttpd等WEB服务器,创建一个目录
下载ftp_v_cn
这个是支持中文的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/ 下面,之后通过
进行访问
之后就按照提示进行配置就可以了