centos和debian8安装pureftpd

2023年 7月 16日 41.9k 0

1,编译安装

cd /usr/local/src/
wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.tar.bz2
tar xf pure-ftpd-1.0.42.tar.bz2 
cd pure-ftpd-1.0.42
./configure --prefix=/usr/local/pureftpd --without-inetd --with-altlog --with-puredb --with-throttling --with-peruserlimits  --with-tls
yum install openssl
yum install openssl-devel
 ./configure --prefix=/usr/local/pureftpd --without-inetd --with-altlog --with-puredb --with-throttling --with-peruserlimits  --with-tls make && make install

2,配置文件

[root@node pure-ftpd-1.0.42]# cd configuration-file/
[root@node configuration-file]# mkdir -p /usr/local/pureftpd/etc/
[root@node configuration-file]# cp pure-ftpd.conf    /usr/local/pureftpd/etc/pure-ftpd.conf
[root@node configuration-file]# cp pure-config.pl    /usr/local/pureftpd/sbin/pure-config.pl
[root@node configuration-file]#  chmod 755    /usr/local/pureftpd/sbin/pure-config.pl
[root@node configuration-file]# vim /usr/local/pureftpd/etc/pure-ftpd.conf 
[root@node configuration-file]# cd /usr/local/pureftpd/etc/
[root@node etc]# > pure-ftpd.conf 
[root@node etc]# vim 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

4,创建用户

[root@node etc]#useradd mark

5,创建ftp目录

[root@node etc]# mkdir /opt/mark

6,修改映射的系统用户租

[root@node etc]# chown -R mark:mark /opt/mark/
[root@node etc]# /usr/local/pureftpd/bin/pure-pw useradd ftp2 -umark -d /opt/mark/

useradd ftpuser1 添加虚拟账户ftp2 -uftp -d /tmp/ftp/ -u ftp是映射用户,/tmp/ftp是指定ftp目录

[root@node etc]# /usr/local/pureftpd/bin/pure-pw mkdb

列出用户

[root@node etc]# /usr/local/pureftpd/bin/pure-pw list
ftpuser1            /tmp/ftp/./                                                
[root@node etc]# 

删除

[root@node etc]# /usr/local/pureftpd/bin/pure-pw userdel ftpuser1

启动:

[root@node etc]# /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
Running: /usr/local/pureftpd/sbin/pure-ftpd -A -c50 -B -C8 -D -fftp -H -I15 -lpuredb:/usr/local/pureftpd/etc/pureftpd.pdb -L3136:8 -m4 -s -U133:022 -u100 -g/usr/local/pureftpd/var/run/pure-ftpd.pid -k99 -Z
[root@node etc]# 

debian安装

debian 8.2 install pureftp
[root@debian /]# apt-get install pure-ftp-common pure-ftpd
[root@debian /etc/pure-ftpd]# cd /etc/pure-ftpd
[root@debian /etc/pure-ftpd]# cd auth/
[root@debian /etc/pure-ftpd/auth]# ls
65unix    70pam
[root@debian /etc/pure-ftpd/auth]# ln -s ../conf/PureDB 60pdb
[root@debian /etc/pure-ftpd/auth]# cd /etc/pure-ftpd/^C
[root@debian /etc/pure-ftpd/auth]# /etc/init.d/pure-ftpd restart
[ ok ] Restarting pure-ftpd (via systemctl): pure-ftpd.service.
[root@debian /etc/pure-ftpd/auth]# 

添加永和centos一样!pure-ftpd.png

相关文章

服务器端口转发,带你了解服务器端口转发
服务器开放端口,服务器开放端口的步骤
产品推荐:7月受欢迎AI容器镜像来了,有Qwen系列大模型镜像
如何使用 WinGet 下载 Microsoft Store 应用
百度搜索:蓝易云 – 熟悉ubuntu apt-get命令详解
百度搜索:蓝易云 – 域名解析成功但ping不通解决方案

发布评论