VSFTPD 源码安装升级

/usr/local/sbin/vsd -v
cp /usr/local/sbin/vsd /usr/sbin/vsd
制作启动脚本
vim /etc/xinetd.d/vsd
disable = yes
vim  /etc/init.d/vsd
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: vsd
# Required-Start: $local_fs $network $named $remote_fs $syslog
# Required-Stop: $local_fs $network $named $remote_fs $syslog
# Short-Description: Very Secure  Daemon
# Description: vsd is a Very Secure  daemon. It was written completely from
# scratch
### END INIT INFO
# vsd This shell script takes care of starting and stopping
# standalone vsd.
#
# chkconfig: - 60 50
# description: Vsd is a  daemon, which is the program \
# that answers incoming  service requests.
# processname: vsd
# config: /etc/vsd/vsd.conf
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
RETVAL=0
prog="vsd"
start() {
        # Start daemons.
        if [ -d /etc ] ; then
                for i in `ls /etc/vsd/vsd.conf`; do
                        site=`basename $i .conf`
                        echo -n $"Starting $prog for $site: "
                        /usr/local/sbin/vsd $i &
                        RETVAL=$?
                        [ $RETVAL -eq 0 ] && {
                           touch /var/lock/subsys/$prog
                           success $"$prog $site"
                        }
                        echo
                done
        else
                RETVAL=1
        fi
        return $RETVAL
}
stop() {
        # Stop daemons.
        echo -n $"Shutting down $prog: "
        killproc $prog
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
        return $RETVAL
}
# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        stop
        start
        RETVAL=$?
        ;;
  condrestart)
        if [ -f /var/lock/subsys/$prog ]; then
            stop
            start
            RETVAL=$?
        fi
        ;;
  status)
        status $prog
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|condrestart|status}"
        exit 1
esac
exit $RETVAL
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
授权755
chmod  755  /etc/init.d/vsd
chkconfig vsd on
验证
service vsd restart
vsd -v
--禁止本地用户访问操作系统
usermod -s /sbin/nologin user
上一篇:Python import错误


下一篇:数据治理之元数据管理的利器——Atlas入门宝典