本帖最后由 nx454352609 于 2016-8-25 22:20 编辑
安装pure-ftpd
1. 下载软件
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.tar.bz2
2. 安装pure-ftpd
[root@localhost src]# tar jxf pure-ftpd-1.0.42.tar.bz2
[root@localhost src]# cd pure-ftpd-1.0.42
[root@localhost pure-ftpd-1.0.42]# ./configure \
--prefix=/usr/local/pureftpd \
--without-inetd \
--with-altlog \
--with-puredb \
--with-throttling \
--with-peruserlimits \
--with-tls
[root@localhost pure-ftpd-1.0.42]# make && make install
配置pure-ftpd
1. 修改配置文件
配置:
[root@localhost pure-ftpd-1.0.42]# cd configuration-file
[root@localhost pure-ftpd-1.0.42]# mkdir -p /usr/local/pureftpd/etc/
[root@localhost configuration-file]# cp pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf
[root@localhost configuration-file]# cp pure-config.pl /usr/local/pureftpd/sbin/pure-config.pl
[root@localhost configuration-file]# chmod 755 /usr/local/pureftpd/sbin/pure-config.pl
配置文件为/usr/local/pureftpd/etc/pure-ftpd.conf,直接拷贝过去即可(建议直接拷贝):
ChrootEveryone yes
BrokenClientsCompatibility no
MaxClientsNumber 50
Daemonize yes
MaxClientsPerIP 8
VerboseLog no
DisplayDotFiles yes
AnonymousOnly no
NoAnonymous no
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
PureDB /usr/local/pureftpd/etc/pureftpd.pdb
LimitRecursion 3136 8
AnonymousCanCreateDirs no
MaxLoad 4
AntiWarez yes
Umask 133:022
MinUID 100
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename no
AnonymousCantUpload no
PIDFile /usr/local/pureftpd/var/run/pure-ftpd.pid
MaxDiskUsage 99
CustomerProof yes
2. 启动pure-ftpd
[root@localhost ~]# /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
3. 建立账号
[root@localhost ~]# mkdir /data/www/
[root@localhost ~]# useradd www
[root@localhost ~]# chown -R www:www /data/www/
[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw useradd ftp_user1 -uwww -d /data/www/
Password:
Enter it again:
建立数据库:
[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw mkdb
列出当前账号:
[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw list
删除账号的命令为:
[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw userdel ftp_user2
测试pure-ftpd
测试工具lftp
[root@localhost ~]# yum install -y lftp
测试:
[root@localhost ~]# touch /data/www/123.txt
[root@localhost ~]# lftp ftp_user1@127.0.0.1
口令:
lftp ftp_user1@127.0.0.1:~> ls
drwxr-xr-x 2 514 www 4096 Jun 12 11:14 .
drwxr-xr-x 2 514 www 4096 Jun 12 11:14 ..
-rw-r--r-- 1 514 www 0 Jun 12 11:14 123.txt
登陆后,使用 ls 命令可以列出当前目录都有什么文件。
关闭pure-ftpd进程
killall pure-ftpd
安装pure-ftpd
1. 下载软件
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.tar.bz2
2. 安装pure-ftpd
[root@localhost src]# tar jxf pure-ftpd-1.0.42.tar.bz2
[root@localhost src]# cd pure-ftpd-1.0.42
[root@localhost pure-ftpd-1.0.42]# ./configure \
--prefix=/usr/local/pureftpd \
--without-inetd \
--with-altlog \
--with-puredb \
--with-throttling \
--with-peruserlimits \
--with-tls
[root@localhost pure-ftpd-1.0.42]# make && make install
配置pure-ftpd
1. 修改配置文件
配置:
[root@localhost pure-ftpd-1.0.42]# cd configuration-file
[root@localhost pure-ftpd-1.0.42]# mkdir -p /usr/local/pureftpd/etc/
[root@localhost configuration-file]# cp pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf
[root@localhost configuration-file]# cp pure-config.pl /usr/local/pureftpd/sbin/pure-config.pl
[root@localhost configuration-file]# chmod 755 /usr/local/pureftpd/sbin/pure-config.pl
配置文件为/usr/local/pureftpd/etc/pure-ftpd.conf,直接拷贝过去即可(建议直接拷贝):
ChrootEveryone yes
BrokenClientsCompatibility no
MaxClientsNumber 50
Daemonize yes
MaxClientsPerIP 8
VerboseLog no
DisplayDotFiles yes
AnonymousOnly no
NoAnonymous no
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
PureDB /usr/local/pureftpd/etc/pureftpd.pdb
LimitRecursion 3136 8
AnonymousCanCreateDirs no
MaxLoad 4
AntiWarez yes
Umask 133:022
MinUID 100
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename no
AnonymousCantUpload no
PIDFile /usr/local/pureftpd/var/run/pure-ftpd.pid
MaxDiskUsage 99
CustomerProof yes
2. 启动pure-ftpd
[root@localhost ~]# /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
3. 建立账号
[root@localhost ~]# mkdir /data/www/
[root@localhost ~]# useradd www
[root@localhost ~]# chown -R www:www /data/www/
[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw useradd ftp_user1 -uwww -d /data/www/
Password:
Enter it again:
建立数据库:
[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw mkdb
列出当前账号:
[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw list
删除账号的命令为:
[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw userdel ftp_user2
测试pure-ftpd
测试工具lftp
[root@localhost ~]# yum install -y lftp
测试:
[root@localhost ~]# touch /data/www/123.txt
[root@localhost ~]# lftp ftp_user1@127.0.0.1
口令:
lftp ftp_user1@127.0.0.1:~> ls
drwxr-xr-x 2 514 www 4096 Jun 12 11:14 .
drwxr-xr-x 2 514 www 4096 Jun 12 11:14 ..
-rw-r--r-- 1 514 www 0 Jun 12 11:14 123.txt
登陆后,使用 ls 命令可以列出当前目录都有什么文件。
关闭pure-ftpd进程
killall pure-ftpd
编辑回复