Nginx系統(tǒng)啟動(dòng)的相關(guān)服務(wù)命令
作者:佚名 
  Nginx系統(tǒng)啟動(dòng)在使用的時(shí)候有很多命令需要我們掌握。下面我們就來看看Nginx系統(tǒng)啟動(dòng)的相關(guān)命令。希望大家有所收獲。
 Nginx系統(tǒng)啟動(dòng)的時(shí)候需要進(jìn)行相關(guān)的文件整理,下面我們就來詳細(xì)的看看有關(guān)的命令。這樣才能更好的進(jìn)行有關(guān)的命令使用,希望大家能更好的掌握相關(guān)知識(shí),進(jìn)行相關(guān)Nginx系統(tǒng)啟動(dòng)的使用。
- #!/bin/bash
 - # nginx Startup script for the Nginx HTTP Server
 - # this script create it by jackbillow at 2007.10.15.
 - # it is v.0.0.2 version.
 - # if you find any errors on this scripts,please contact jackbillow.
 - # and send mail to jackbillow at gmail dot com.
 - # chkconfig: - 85 15
 - # description: Nginx is a high-performance web and proxy server.
 - # It has a lot of features, but it's not for everyone.
 - # processname: nginx
 - # pidfile: /var/nginx/nginx.pid
 - # config: /usr/local/nginx/conf/nginx.conf
 - nginxd=/usr/sbin/nginx
 - nginx_config=/etc/nginx/nginx.conf
 - nginx_pid=/var/nginx/nginx.pid
 - RETVAL=0
 - prog="nginx"
 - # Source function library.
 - . /etc/rc.d/init.d/functions
 - # Source networking configuration.
 - . /etc/sysconfig/network
 - # Check that networking is up.
 - [ ${NETWORKING} = "no" ] && exit 0
 - [ -x $nginxd ] || exit 0
 - # Start nginx daemons functions.
 - start() {
 - if [ -e $nginx_pid ];then
 - echo "nginx already running...."
 - exit 1
 - fi
 - echo -n $"Starting $prog: "
 - daemon $nginxd -c ${nginx_config}
 - RETVAL=$?
 - echo
 - [ $RETVAL = 0 ] && touch /var/lock/subsys/nginx
 - return $RETVAL
 - }
 - # Stop nginx daemons functions.
 - stop() {
 - echo -n $"Stopping $prog: "
 - killproc $nginxd
 - RETVAL=$?
 - echo
 - [ $RETVAL = 0 ] && rm -f /var/lock/subsys/nginx /var/run/nginx.pid
 - }
 - # reload nginx service functions.
 - reload() {
 - echo -n $"Reloading $prog: "
 - #kill -HUP `cat ${nginx_pid}`
 - killproc $nginxd -HUP
 - RETVAL=$?
 - echo
 - }
 - # See how we were called.
 - case "$1" in
 - start)
 - start
 - ;;
 - stop)
 - stop
 - ;;
 - reload)
 - reload
 - ;;
 - restart)
 - stop
 - start
 - ;;
 - status)
 - status $prog
 - RETVAL=$?
 - ;;
 - *)
 - echo $"Usage: $prog {start|stop|restart|reload|status|help}"
 - exit 1
 - esac
 - exit $RETVAL
 
以上就是對(duì)Nginx系統(tǒng)啟動(dòng)的相關(guān)介紹。
【編輯推薦】
責(zé)任編輯:張浩 
                    來源:
                    博客園
 














 
 
 
 
 
 
 