Pureftpd安装文档(1)
Pureftpd安装文档(1)
Pureftpd安装文档如下:
需要的软件
pure-ftpd-1.0.21.tar.gz
pureftpd_php_manager.tar.gz
全面设置
tar zvxf pure-ftpd-1.0.21.tar.gz
cd pure-ftpd-1.0.21
#./configure --prefix=/usr/local/pureftpd --with-mysql=/usr/local/mysql --with-paranoidmsg
--with-shadow --with-welcomemsg --with-uploadscript --with-quotas --with-cookie --with-pam
--with-virtualhosts --with-virtualroot --with-diraliases --with-sysquotas --with-ratios
--with-ftpwho --with-throttling --with-language=simplified-chinese
make
make check
make install
cd configuration-file
chmod u+x pure-config.pl
cp pure-config.pl /usr/local/sbin/
cp pure-ftpd.conf /usr/local/etc/
vi /usr/local/etc/pure-ftpd.conf
按你的需要编辑pure-ftpd.conf
-------------------------------------
- # Cage in every user in his home directory
- # 限制每个用户到自己的根目录
ChrootEveryone yes
- # Disallow anonymous connections. Only allow authenticated users.
- # 取消anonymous用户
NoAnonymous yes
- # MySQL configuration file (see README.MySQL)
- # pureftpd-mysql.conf文件的位置
MySQLConfigFile /usr/local/etc/pureftpd-mysql.conf
CreateHomeDir yes
-------------------------------------
tar zvxf pureftpd_php_manager.tar.gz
cd pureftpd_php_manager
mv pureftpd-mysql.conf.sample /usr/local/etc/pureftpd-mysql.conf
cd ..
cp -R pureftpd_php_manager /home/www/pureftpd_php_manager
cd /home/www/pureftpd_php_manager
vi pureftp.config.php
按照你的需要修改里面的设置代码:
-------------------------------------------------------------------------------------
// 设置pureftpd-mysql.conf的位置,这个要注意,不要写错哦
$PUREFTP_CONFIG_FILE = '/usr/local/etc/pureftpd-mysql.conf';
// The location where all the Forms directed to. (Mayby no change needed)
$SELF_URL = 'index.php';
// The location of your pure-ftpdwho binary (set this to chmod 4711)
$FTP_WHO = "/usr/local/sbin/pure-ftpwho";
$DefaultUser = "ftpuser"; # 默认用户
$DefaultPass = ""; # 默认初始用户密码
$DefaultUid = "2002"; # 默认的uid(设置为ftpusers的uid)
$DefaultGid = "2002"; # 默认的gid(设置为ftpusers的gid)
$DefaultDir = "/var/ftproot/ftpusershome"; # 默认的用户主目录
$DefaultUL = "0"; # 默认用户上传速率限制(KB/S)
$DefaultDL = "0"; # 默认用户下载速率限制(KB/S)
$Defaultip = "*"; # 设置用户可以从哪些IP登陆
$DefaultQS = "50"; # 用户默认的quota
$Defaultcmt = ""; # 默认备注信息
$DefaultQF = "0"; # 默认文件数目quota
$PWC = "55"; # Vorsatz fuerr Crypt Password
-------------------------------------------------------------------------------------
增加用户组及用户
- #groupadd ftpusers -g 2002
- #useradd ftp -u 2002 -g ftpusers -s /sbin/nologin
删除多余的东西
rm -f history.txt pureftpd-mysql.conf.sample
如果要投入真实的使用,最好用apache做身份验证!
在mysql中添加FTP用户数据库
代码:
CREATE TABLE ftpd (
User varchar(16) NOT NULL default '',
status enum('0','1') NOT NULL default '0',
Password varchar(64) NOT NULL default '',
Uid varchar(11) NOT NULL default '-1',
Gid varchar(11) NOT NULL default '-1',
Dir varchar(128) NOT NULL default '',
ULBandwidth smallint(5) NOT NULL default '0',
DLBandwidth smallint(5) NOT NULL default '0',
comment tinytext NOT NULL,
ipaccess varchar(15) NOT NULL default '*',
QuotaSize smallint(5) NOT NULL default '0',
QuotaFiles int(11) NOT NULL default 0,
PRIMARY KEY (User),
UNIQUE KEY User (User)
) TYPE=MyISAM;
评论暂时关闭