Section 24.2. Compiling and Installing


24.2. Compiling and Installing

If your distribution does not come with ProFTPD, you can either compile and install it from the source tarball or use a package appropriate for your distribution. RPM-based distributions can install the RPM from http://proftpd.org. Debian users can enter apt-get install proftpd.

24.2.1. RPM Install

Unless there is a specific binary RPM for your distribution, download the source RPM and build it: rpmbuild --rebuild proftpd-1.2.10-1.src.rpm. This will produce two installable RPMs: proftpd-1.2.10-1.i586.rpm, which contains the actual software, and proftpd-inetd-1.2.10-1.i586.rpm, which contains the support files for running ProFTPD from xinetd. The proftpd-inetd RPM is optional, and we will not cover it in this book. Install the main RPM after the build completes:

 # rpm -ivh /usr/src/packages/RPMS/i586/proftpd-1.2.10-1.i586.rpm

The RPMs seem to be tailored for Red Hat, so if you use SUSE, you need to do a few adjustments. The rc script installs to /etc/rc.d/init.d/proftpd, which isn't the right location on SUSE; also, the script itself will not work. Instead, use the following replacement script and copy it to /etc/rc.d/proftpd:

 #!/bin/sh # # Startup script for ProFTPD # # chkconfig: 345 85 15 # description: ProFTPD is an enhanced FTP server with \ #         a focus toward simplicity, security, and ease of configuration. \ #         It features a very Apache-like configuration syntax, \ #         and a highly customizable server infrastructure, \ #         including support for multiple 'virtual' FTP servers, \ #         anonymous FTP, and permission-based directory visibility. # processname: proftpd # config: /etc/proftpd.conf PROFTPD=/usr/sbin/proftpd PATH="$PATH:/usr/sbin" if [ -f /etc/sysconfig/proftpd ]; then       . /etc/sysconfig/proftpd fi . /etc/rc.status rc_reset # See how we were called. case "$1" in   start)     echo -n "Starting proftpd: "     startproc $PROFTPD $OPTIONS     rc_status -v     ;;   stop)     echo -n "Shutting down proftpd: "     killproc -TERM $PROFTPD     rc_status -v     ;;   try-restart)     $0 status     if test $? = 0; then       $0 restart     else       rc_reset  # Not running is not a failure.     fi     # Remember status and be quiet     rc_status     ;;   status)     checkproc $PROFTPD     rc_status -v     ;;   restart)     $0 stop     $0 start     rc_status     ;;   reload)     echo -n "Re-reading proftpd config: "     killproc -HUP $PROFTPD     rc_status -v     ;;   suspend)     hash ftpshut>/dev/null 2>&1     if [ $? = 0 ]; then       if [ $# -gt 1 ]; then         shift         echo -n "Suspending with '$*' "         ftpshut $*       else         echo -n "Suspending NOW "         ftpshut now "Maintanance in progress"       fi     else       echo -n "No way to suspend "     fi     echo     ;;   resume)     if [ -f /etc/shutmsg ]; then       echo -n "Allowing sessions again "       rm -f /etc/shutmsg     else       echo -n "Was not suspended "     fi     echo     ;;   *)     echo -n "Usage: $0 {start|stop|restart|try-restart|status|reload|resume"     hash ftpshut     if [ $? = 1 ]; then       echo '}'     else       echo '|suspend}'       echo 'suspend accepts additional arguments which are passed to ftpshut(8)'     fi     exit 1 esac rc_exit

Of course, this could be fixed in a later version.

24.2.2. Compiling from Source

Download the tarball, unpack, configure, and build:

 $ tar xfj proftpd-1.2.10.tar.bz2 $ cd proftpd-1.2.10 $ ./configure --prefix=/usr/local/packages/proftpd $ make

Then, as root, run make install. This will install everything to /usr/local/ packages/proftpd/.



Running Linux
Running Linux
ISBN: 0596007604
EAN: 2147483647
Year: 2004
Pages: 220

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net