欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

linux 编译安装pureFTP

程序员文章站 2022-05-18 15:13:46
安装openssl支持 wget -c https://www.openssl.org/source/openssl.org/source/openssl-1.1.0c.tar.gz tar -zxvf openssl-1.1.0c.tar.gz cd openssl-1.1.0c ./connfi ......

安装openssl支持

  wget -c https://www.openssl.org/source/openssl.org/source/openssl-1.1.0c.tar.gz

   tar -zxvf openssl-1.1.0c.tar.gz

    cd openssl-1.1.0c

    ./connfig --prefix=/usr/local/openssl && make && make install

安装pureftp

    #下载pureftp,解压,既然进入该目录

    wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.22.tar.gz

    tar -zxvf pureftpd-1.0.22.tar.gz

    ./configure

    --prefix=/usr/local/pureftpd

    --without-inetd \ #不支持超级服务器

    --with-altlog \ #支持选择日志格式(类似apache)

    --with-puredb \ #支持虚拟用户 (ftp登录用户而非系统用户)

    --with-throttling \ #支持带宽控制

    --with-tls=/usr/local/openssl #启用ssl/tls 支持

    #

    ./configure ---prefix=/usr/local/pureftpd --without-inet --with-altlog --with-puredb --with-throttling --with-tls=/usr/local/openssl

    make && make install #编译并且安装

 

    复制配置文件

    cd configuration-file #进入目录

    mkdir -p /usr/local/pureftpd/etc/  #创建配置文件目录

    cp pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf #把配置文件复制到软件安装目录的配置文件目录下

    cp pure-config.pl /usr/local/pueftpd/sbin/pure-config.pl #复制启动程序

    chmod 755 /usr/local/pureftpd/sbin/pure-config.pl #修改启动程序的权限

    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

    anoymouscancreatedirs  no

    maxload  4

    anyiwarez  yes

    umask  133:022

    minuid  100

    allowuserfxp  no

    prohibitdotfileswrite  no

    prohibitdotfilesread  no

    autorename  no

    anonymouscantupload  no

    pidfile  /usr/local/pureftpd/var/run/pure-ftpd.pid

    maxdiskusage  99

    customerproof  yes

    启动

    /usr/local/pureftpd/sbin/purefig.pl

    /usr/local/pureftpd/etc/pure-ftpd.conf

    添加账号

    useradd test

    chown -r test:test /var/www/html/  #改变拥有着

    /usr/local/pureftpd/bin/pure-pw useradd ftpd_user1 -utest -d /var/www/html/

    常用操作

    /usr/local/pureftpd/bin/pure-pw mkdb

    /usr/local/pureftpd/bin/pure-pw list

    /usr/local/pureftpd/bin/pure-pw userdel [用户]