已经安装好mysql数据库,准备提供ftp服务:
[root@hz tools]# wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.36.tar.gz
[root@hz tools]# tar zxf pure-ftpd-1.0.36.tar.gz
[root@hz tools]# cd pure-ftpd-1.0.36
[root@hz pure-ftpd-1.0.36]# ./configure --prefix=/byrd/server/pure-ftpd-thr-1.0.32.1 --with-mysql=/usr/local/mysql/
[root@hz pure-ftpd-1.0.36]# make && make install
[root@hz pure-ftpd-1.0.36]# mkdir /byrd/server/pure-ftpd-thr-1.0.32.1/etc
[root@hz pure-ftpd-1.0.36]# cp pureftpd-mysql.conf /byrd/server/pure-ftpd-thr-1.0.32.1/etc
[root@hz pure-ftpd-1.0.36]# cp configuration-file/pure-config.pl /byrd/server/pure-ftpd-thr-1.0.32.1/sbin
[root@hz pure-ftpd-1.0.36]# chmod +x /byrd/server/pure-ftpd-thr-1.0.32.1/sbin/pure-config.pl
[root@hz pure-ftpd-1.0.36]# cp configuration-file/pure-ftpd.conf /byrd/server/pure-ftpd-thr-1.0.32.1/etc/
[root@hz pure-ftpd-1.0.36]# cp contrib/redhat.init /byrd/server/pure-ftpd-thr-1.0.32.1/sbin/service
[root@hz pure-ftpd-1.0.36]# chmod +x /byrd/server/pure-ftpd-thr-1.0.32.1/sbin/service
[root@hz pure-ftpd-1.0.36]# cd /byrd/server/pure-ftpd-thr-1.0.32.1/
[root@hz pure-ftpd-thr-1.0.32.1]# cp sbin/service sbin/service.backup
[root@hz pure-ftpd-thr-1.0.32.1]# cp etc/pure-ftpd.conf etc/pure-ftpd.conf.backup
[root@hz pure-ftpd-thr-1.0.32.1]# cp etc/pureftpd-mysql.conf etc/pureftpd-mysql.conf.backup
[root@hz pure-ftpd-thr-1.0.32.1]# cp sbin/pure-config.pl sbin/pure-config.pl.backup
[root@hz pure-ftpd-thr-1.0.32.1]# sed -i 's#fullpath=/usr/local/sbin/$prog#fullpath=/byrd/server/pure-ftpd-thr-1.0.32.1/sbin/$prog#g' sbin/service
[root@hz pure-ftpd-thr-1.0.32.1]# sed -i 's#pureftpwho=/usr/local/sbin/pure-ftpwho#pureftpwho=/byrd/server/pure-ftpd-thr-1.0.32.1/sbin/pure-ftpwho#g' sbin/service
[root@hz pure-ftpd-thr-1.0.32.1]# sed -i 's#$fullpath /etc/pure-ftpd.conf --daemonize#$fullpath /byrd/server/pure-ftpd-thr-1.0.32.1/etc/pure-ftpd.conf --daemonize#g' sbin/service
[root@hz pure-ftpd-thr-1.0.32.1]# sed -i 's#NoAnonymous no#NoAnonymous yes#g' etc/pure-ftpd.conf
[root@hz pure-ftpd-thr-1.0.32.1]# sed -i 's#\# MySQLConfigFile /etc/pureftpd-mysql.conf#MySQLConfigFile etc/pureftpd-mysql.conf#g' etc/pure-ftpd.conf
####################################################################################
修改sbin/pure-config.pl
在/usr/sbin/pure-ftpd后面添加一行/byrd/server/pure-ftpd-thr-1.0.32.1/sbin/pure-ftpd
####################################################################################
mysql> create database ftp default character set utf8 collate utf8_general_ci;
mysql> create user 'ftp'@'localhost' identified by 'admin';
mysql> grant all on ftp.* to 'ftp'@'localhost' identified by 'admin';
mysql> flush privileges;
[root@hz pure-ftpd-thr-1.0.32.1]# cat mysql.sql
CREATE TABLE IF NOT EXISTS `users` (
`User` varchar(16) NOT NULL,
`Password` varchar(64) NOT NULL,
`Uid` int(11) NOT NULL DEFAULT '-1',
`Gid` int(11) NOT NULL DEFAULT '-1',
`Dir` varchar(128) NOT NULL,
PRIMARY KEY (`User`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COMMENT='FTP Users';
[root@hz pure-ftpd-thr-1.0.32.1]# mysql -uftp -p
mysql> use ftp;
Database changed
mysql> SELECT database();
+------------+
| database() |
+------------+
| ftp |
+------------+
1 row in set (0.00 sec)
[root@hz pure-ftpd-thr-1.0.32.1]# /usr/local/mysql/bin/mysql -uftp -p'admin' ftp < ./mysql.sql
mysql> show tables;
+---------------+
| Tables_in_ftp |
+---------------+
| users |
+---------------+
1 row in set (0.00 sec)
mysql> desc users;
+----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+-------+
| User | varchar(16) | NO | PRI | NULL | |
| Password | varchar(64) | NO | | NULL | |
| Uid | int(11) | NO | | -1 | |
| Gid | int(11) | NO | | -1 | |
| Dir | varchar(128) | NO | | NULL | |
+----------+--------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
mysql> INSERT INTO `users` (`User`, `Password`, `Uid`, `Gid`, `Dir`) VALUES
-> ('byrd', 'byrd', 777, 777, '/home/web');
mysql> select * from users;
+--------+----------+-----+-----+-----------+
| User | Password | Uid | Gid | Dir |
+--------+----------+-----+-----+-----------+
| byrd | byrd | 777 | 777 | /home/web |
+--------+----------+-----+-----+-----------+
1 row in set (0.00 sec)
[root@hz pure-ftpd-thr-1.0.32.1]# sed -i 's#MYSQLUser root#MYSQLUser ftp#g' etc/pureftpd-mysql.conf
[root@hz pure-ftpd-thr-1.0.32.1]# sed -i 's#MYSQLPassword rootpw#MYSQLPassword admin#g' etc/pureftpd-mysql.conf
[root@hz pure-ftpd-thr-1.0.32.1]# sed -i 's#MYSQLDatabase pureftpd#MYSQLDatabase ftp#g' etc/pureftpd-mysql.conf
[root@hz pure-ftpd-thr-1.0.32.1]# iptables -I INPUT -p tcp --dport 20 -j ACCEPT
[root@hz pure-ftpd-thr-1.0.32.1]# iptables -I INPUT -p tcp --dport 21 -j ACCEPT
[root@hz pure-ftpd-thr-1.0.32.1]# iptables -I INPUT -p tcp --dport 10000:50000 -j ACCEPT
[root@hz pure-ftpd-thr-1.0.32.1]# iptables-save
[root@hz pure-ftpd-thr-1.0.32.1]# /byrd/server/pure-ftpd-thr-1.0.32.1/sbin/service start
[root@hz pure-ftpd-thr-1.0.32.1]# /byrd/server/pure-ftpd-thr-1.0.32.1/sbin/service stop
荒野乱斗国际版 (BrawlStars)最新版本v56.274
下载一波超人内置修改器菜单版 安卓版v1.0.2
下载敢达决战官方正版 安卓版v6.7.9
下载敢达决战 安卓版v6.7.9
下载继承了一座戏园子无限声望铜钱版 内置菜单最新版v1.7
继承了一座戏园子折相思版是游戏的破解版本,在该版本中为玩家提
山河半世橙光清软金手指版 无限鲜花v3.24
山河半世是一款超级好玩的橙光恋爱游戏,在游戏中玩家们需要扮演
蓬莱手游折相思版 安卓版v1.0.0
蓬莱免广告版是游戏的修改版本,在该版本中为玩家去除了广告,玩
当红影后橙光游戏破解版2025 最新版v1.0
当红影后橙光破解版是一款超级好玩的娱乐圈题材的橙光游戏,在这
忽然成了万人迷清软完结版 无限鲜花版v12.15
忽然成了万人迷破解版是一款非常好玩的男性向橙光游戏,在有一天