zoukankan      html  css  js  c++  java
  • 搭建FTP服务器

    #搭建FTP服务器

    1.关闭防火墙
    service iptables stop

    2.关闭SELinux
    setenforce 0

    3.安装所需依赖以及编译工具
    yum install -y gcc openssl-devel perl

    4.下载pure-ftpd
    curl -O http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.41.tar

    5.解压
    tar -zxvf pure-ftpd-1.0.41.tar

    6.进行配置
    ./configure --prefix=/usr/local/pureftpd --without-inetd --with-altlog --with-puredb --with-throttling --with-tls

    7.编译和安装
    make && make install

    8.修改配置文件
    mkdir /usr/local/pureftpd/etc
    cd ./configuration-file/
    cp pure-ftpd.conf /usr/local/pureftpd/etc/
    修改: /usr/local/pureftpd/etc/pure-ftpd.conf 修改如下
    PureDB /usr/local/pureftpd/etc/pureftpd.pdb
    PIDFile /var/run/pure-ftpd.pid

    9.控制文件
    cp pure-config.pl /usr/local/pureftpd/sbin/
    chmod 755 pure-config.pl

    10.启动服务
    cd /usr/local/pureftpd
    ./sbin/pure-config.pl ./etc/pure-ftpd.conf
    检查: netstat -tunpl

    11.添加管理用户
    useradd test
    mkdir -p /var/www/html/
    chown -R test:test /var/www/html/
    ./bin/pure-pw useradd ftp_user1 -u test -d /var/www/html
    ftp_user1: ftp登录用户名
    -u: 指定系统中存在的用户
    -d: 指定访问的目录

    12.创建虚拟的用户数据库
    ./bin/pure-pw mkdb

    13.通过ftp链接工具(FileZilla)测试

  • 相关阅读:
    python list添加元素的几种方法
    Python ---- list和dict遍历
    python 之 collections
    python list 中元素的统计与排序
    pandas dataframe 读取 xlsx 文件
    Python 缓存机制与 functools.lru_cache(zz)
    pip 使用
    python 中的异常处理
    python 时间日期处理
    python read txt file
  • 原文地址:https://www.cnblogs.com/weizaiyes/p/9165555.html
Copyright © 2011-2022 走看看