Publish time 2012-9-26 01:20:12

[2012.09.25] How to Intall ProFTPD on Ubuntu 12.04 LTS

First, because of something warning is happened in ubuntu 12.04, we don't use the apt-get to install proftpd and try to complier the source code to install the proftpd and openssl.

Second, we refer the below introduction step by step to finish the installing the proftpd.
1. Go to the openssl offical website and download the last version openssl, then complier and install openssl.
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
tar xzvf openssl-1.0.1c.tar.gz
cd openssl-1.0.1c
./config && make && sudo make install
2.Go to the proftpd offical website and download the last version proftpd, then complier and install openssl.
wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.4b.tar.gz
tar xzvf proftpd-1.3.4b.tar.gz
cd proftpd-1.3.4b
./configure && make && sudo make install
3.The proftpd is installing at /usr/local/sbin and the script proftpd.conf is locating at /usr/local/etc/proftpd.conf, then we need fix the proftpd.conf adding some other new parameters (setp B) and add /etc/init.d/proftpd script to let proftpd autostart when the server reboot.
#!/bin/sh
# Begin /etc/init.d/proftpd

check_status()
{
  if [ $? = 0 ]
  then
    echo "OK"
  else
    echo "FAILED"
  fi
}

case "$1" in
  start)
    echo -n "Starting Pro FTP daemon..."
    start-stop-daemon -S -q -o -x /usr/local/sbin/proftpd
    check_status
    ;;

  stop)
    echo -n "Stopping Pro FTP daemon..."
    start-stop-daemon -K -q -o -x /usr/local/sbin/proftpd
    check_status
    ;;

  restart)
    echo -n "Stopping Pro FTP daemon..."
    start-stop-daemon -K -q -o -x /usr/local/sbin/proftpd
    check_status

    sleep 1

    echo -n "Starting Pro FTP daemon..."
    start-stop-daemon -S -q -o -x /usr/local/sbin/proftpd
    check_status
    ;;

  *)
    echo "Usage: $0 {start|stop|restart}"
    ;;

esac

# End /etc/init.d/proftpd
Change the promission  and restart the proftpd, then ftp server is actived.
chmod 755 /etc/init.d/proftpd

--REFERENCE--
http://archive.linuxfromscratch.org/lfs-museum/2.3.1/LFS-BOOK-2.3.1-HTML/x1882.html

Pages: [1]
View full version: [2012.09.25] How to Intall ProFTPD on Ubuntu 12.04 LTS