Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Администрирование *NIX систем > Stopping and Starting ProFTPD


Автор: Akella 9.12.2007, 19:27
Из руководства по серверу proftpd
не могу найти, как же всё-таки запустить сервер :(
Цитата

Starting proftpd
init.d scripts vs command-line invocation standalone vs inetd

  /usr/local/sbin/proftpd [options]

where /usr/local/sbin is determined by configure and [options] are described below (or in proftpd(8)):

 -h, --help
     Display proftpd usage
 -n, --nodaemon
     Disable background daemon mode and send all output to stderr)
 -q, --quiet
     Don't send output to stderr when running with -n or --nodaemon
 -d [level], --debug
     Set debugging level (0-9, 9 = most debugging)
 -D [definition], --define
     Set arbitrary IfDefine definition
 -c [config-file], --config
     Specify alternate configuration file
 -p [0|1], --persistent
     Enable/disable default persistent passwd support
 -l, --list
     List all compiled-in modules
 -t, --configtest
     Test the syntax of the specified config
 -v, --version
     Print version number and exit
 -vv, --version-status
     Print extended version information and exit

Автор: Imple 9.12.2007, 19:30
Смотреть надо не на сам бинарный файл демона, а на скрипт управления им, который должен быть в /etc/init.d. Если такогового не  имеется, то proftpd запускается крайне просто, вызовом:
Код

# proftpd

Автор: Akella 9.12.2007, 19:35
а как проверить, что он запущен?

Автор: Imple 9.12.2007, 19:51
Код

ps ax | grep proftpd


На будущее - ps это программа для отображения выполняемых процессов, grep - программа для фильтрации вывода. Настоятельно советую ознакомиться с ними, так как они необходимы для администрирования ОС GNU/Linux.

Автор: nerezus 12.12.2007, 06:57
А все-таки лучше делать это средствами дистрибутива имхо ;)

Автор: angel_ 28.12.2007, 22:53
Была такая замута, я сделал так создал фалй в /etc/init.d/ и через него все рулили файл вот такой
Код

#!/bin/bash
#
# Init file for proftpd server daemon
#
# chkconfig: 2345 55 25
# description: Ftp server daemon
#
# processname: proftpd
# config: /usr/local/etc/proftpd.conf
# pidfile: /usr/local/var/run/proftpd.pid

#
#
# |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
# --------------------                              --------------------
#
# the path to your PID file
PIDFILE=/usr/local/var/run/proftpd.pid
#
# the path to your httpd binary, including options if necessary
FTPPD=/usr/local/bin/proftpd
#
# a command that outputs a formatted text version of the HTML at the
# url given on the command line.  Designed for lynx, however other
# programs may work.
#
# the URL to your server's mod_status status page.  If you do not
# have one, then status and fullstatus will not work.

# --------------------                              --------------------
# ||||||||||||||||||||   END CONFIGURATION SECTION  ||||||||||||||||||||


. /etc/rc.d/init.d/functions

RETVAL=0
prog="proftpd"

# Some functions to make the below more readable
FTPD=/usr/local/sbin/proftpd
PIDFILE="/usr/local/var/run/proftpd.pid"

start()
{
        # Create keys if necessary

        echo -n $"Starting $prog:"
        daemon $FTPD
        RETVAL=$?
        [ "$RETVAL" = 0 ] && touch /var/lock/subsys/proftpd
        echo
}

stop()
{
        echo -n $"Stopping $prog:"
        killproc $FTPD -TERM
        RETVAL=$?
        [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/proftpd
        echo
}

reload()
{
        echo -n $"Reloading $prog:"
        killproc $FTPD -HUP
        RETVAL=$?
        echo
}

case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                stop
                start
                ;;
        reload)
                reload
                ;;
        condrestart)
                if [ -f /var/lock/subsys/proftpd ] ; then

                        if [ "$RETVAL" = 0 ] ; then
                                stop
                                # avoid race
                                sleep 3
                                start
                        fi
                fi
                ;;
        status)
                status $FTPD
                RETVAL=$?
                ;;
        *)
                echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
                RETVAL=1
esac
exit $RETVAL


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)