本文参考部分引用了:http://www.cnblogs.com/meteoric_cry/archive/2011/01/27/1945882.html 这里使用的是编写shell脚本的方式来处理,使用vi编辑器编写一个nginx文件存放于/etc/init.d/目录中。 vi /etc/init.d/nginx (输入下面的代码) #!/bin/sh # # nginx – this script starts and stops the nginx daemon # # chkconfig: – 85 15 # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ # proxy and IMAP/POP3 proxy server # processname: nginx # config: /usr/local/nginx/nginx.conf # config: /usr/local/nginx/nginx # pidfile: /usr/local/nginx/logs/nginx.pid nginx=”/usr/local/nginx/nginx” sysconfig=”/etc/sysconfig/$prog” lockfile=”/var/lock/subsys/nginx” pidfile=”/usr/local/nginx/logs/${prog}.pid” NGINX_CONF_FILE=”/usr/local/nginx/nginx.conf” prog=$(basename $nginx) # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ “$NETW......Read More>