没有合适的资源?快使用搜索试试~ 我知道了~
#!/bin/bash nginxd=/usr/local/nginx/sbin/nginx nginx_config=/usr/local/nginx/conf/nginx.conf nginx_pid=/usr/local/nginx/logs/nginx.pid RETVAL=0 prog=$(basename $nginxd) . /etc/rc.d/init.d/functions . /etc/sysconfig/network
资源推荐
资源详情
资源评论
/****
./configure \
--prefix=/usr/local/nginx \
--pid-path=/usr/local/nginx/logs/nginx.pid \
--lock-path=/var/lock/subsys/nginx \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/temp/nginx/client \
--http-proxy-temp-path=/var/temp/nginx/proxy \
--http-fastcgi-temp-path=/var/temp/nginx/fastcgi \
--http-uwsgi-temp-path=/var/temp/nginx/uwsgi \
--http-scgi-temp-path=/var/temp/nginx/scgi
***/
[root@web1 ~]# ss -anputl |grep nginx |column -t
tcp LISTEN 0 128 *:80 *:* users:(("nginx",pid=4338,fd=6),("nginx",pid=4334,fd=6))
[root@web1 ~]#
[root@web1 ~]# cat /usr/local/nginx/logs/nginx.pid
4334
[root@web1 ~]# ls /var/lock/subsys/
network rhnsd rhsmcertd
[root@web1 ~]# tail -2 /etc/rc.local
touch /var/lock/subsys/local
[root@web1 ~]# tail -n 2 /etc/rc.d/rc.local
touch /var/lock/subsys/local
[root@web1 ~]# ll /etc/rc.d/rc.local
-rw-r--r--. 1 root root 473 6月 27 2017 /etc/rc.d/rc.local
[root@web1 ~]# ll /etc/rc.local
lrwxrwxrwx. 1 root root 13 1月 30 2018 /etc/rc.local -> rc.d/rc.local
[root@web1 ~]# chmod +x /etc/rc.d/rc.local
[root@web1 ~]# ll /etc/rc.d/rc.local
-rwxr-xr-x. 1 root root 473 6月 27 2017 /etc/rc.d/rc.local
[root@web1 ~]#
[root@web1 ~]# vim /etc/init.d/nginx
[root@web1 ~]# cat /etc/init.d/nginx
#!/bin/bash
nginxd=/usr/local/nginx/sbin/nginx
nginx_config=/usr/local/nginx/conf/nginx.conf
nginx_pid=/usr/local/nginx/logs/nginx.pid
RETVAL=0
prog=$(basename $nginxd)
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network
[ "${NETWORKING}" = "no" ] && exit 0
[ -x $nginxd ] || exit 0
start(){
if [ -f $nginx_pid ];then
echo "nginx is already running...";
exit 1
fi
echo -n $"Starting $prog:"
daemon $nginxd -c ${nginx_config}
剩余6页未读,继续阅读
资源评论
Hayeshi
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功