Centos8 stream system compiles and installs Pure-Ftpd tutorial.

The tutorial for compiling and installing Pure-FTPd on the CentOS 8 Stream system is as follows:

  1. First, make sure your CentOS 8 Stream system has the necessary development tools and dependencies installed. You can install them with:

    sudo dnf groupinstall "Development Tools"
    sudo dnf install libcap-devel openssl-devel
    
  2. Download the source code package of Pure-FTPd. You can visit Pure-FTPd's official website ( Pure-FTPd::Pure-FTPd ) or download it with the following command:

    wget https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.49.tar.gz
    
  3. Unzip the source code package:

    tar -zxvf pure-ftpd-1.0.49.tar.gz
    
  4. Enter the decompressed directory:

    cd pure-ftpd-1.0.49
    
  5. Configure compilation parameters:

    ./configure --prefix=/usr/local/pure-ftpd --with-everything --with-tls
    

    Some commonly used parameters are used here, including the installation path and enabling TLS support. You can add or remove other parameters according to your needs. Make sure your parameters meet your specific requirements.

  6. Compile and install Pure-FTPd:

    make
    sudo make install
    
  7. Create a pure user for Pure-FTPd:

    sudo groupadd -g 2000 ftpgroup
    sudo useradd -u 2000 -s /bin/false -d /usr/local/pure-ftpd -M -c "Pure-FTPd User" -g ftpgroup ftpuser
    
  8. Set the configuration file for Pure-FTPd:

    sudo cp configuration-file/pure-ftpd.conf /usr/local/pure-ftpd/etc/
    sudo chown root:root /usr/local/pure-ftpd/etc/pure-ftpd.conf
    sudo chmod 644 /usr/local/pure-ftpd/etc/pure-ftpd.conf
    

    pure-ftpd.confYou can edit the file for further configuration as needed  .

  9. Start the Pure-FTPd service:

    sudo /usr/local/pure-ftpd/sbin/pure-ftpd
    
  10. (Optional) Configure Pure-FTPd to start automatically at boot.

    Create a startup script:

    sudo vi /etc/systemd/system/pure-ftpd.service
    

    Add the following to the file:

    [Unit]
    Description=Pure-FTPd FTP server
    After=network.target
    
    [Service]
    ExecStart=/usr/local/pure-ftpd/sbin/pure-ftpd
    ExecReload=/bin/kill -HUP $MAINPID
    
    [Install]
    WantedBy=multi-user.target
    

    Save and close the file. Then run the following command to enable Pure-FTPd service:

    sudo systemctl enable pure-ftpd
    

    You can now  sudo systemctl start pure-ftpdstart the Pure-FTPd service with .

The above is in the CentOS 8 Stream system

A basic tutorial on compiling and installing Pure-FTPd. Note that the specific configuration and parameters may vary according to your needs, and you can adjust them according to your own situation. Also, make sure to back up important files and configurations before doing anything.

Guess you like

Origin blog.csdn.net/tiansyun/article/details/131136413