nginx-(/etc/init.d/nginx)启动脚本
#!/bin/bash
#nx Startup script for the Nginx HTTP Server # it is v.0.0. version. # chkconfig: - # 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/run/nginx.pid # config: /usr/local/nginx/conf/nginx.conf nginxd=/usr/local/nginx/sbin/nginx nginx_config=/usr/local/nginx/conf/nginx.conf nginx_pid=/var/run/nginx.pid RETVAL= 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 [ -x $nginxd ] || exit # Start nginx daemons functions. start() { if [ -e $nginx_pid ];then echo "nginx already running...." exit fi echo -n $"Starting $prog: " daemon $nginxd -c ${nginx_config} RETVAL=$? echo [ $RETVAL = ] && touch /var/lock/subsys/nginx return $RETVAL } # Stop nginx daemons functions. stop() { echo -n $"Stopping $prog: " killproc $nginxd RETVAL=$? echo [ $RETVAL = ] && 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 esac exit $RETVAL
nginx-(/etc/init.d/nginx)启动脚本的更多相关文章
- nginx的编译安装以及启动脚本编写
Nginx的编译安装和启动脚本的编写 Nginxd的功能强大,可以实现代理.负载均衡等企业常用的功能.下面介绍一下nginx的编译安装方法: 1. 下载 官方下载地址:http://nginx.org ...
- 除了/etc/init.d/加启动脚本 或者在/etc/rc.local中加启动命令,还可以通过crontab来完成服务器重启后自动启动服务的操作
@reboot /bin/sh /opt/soft/percona/bin/mysqld_safe --defaults-file=/mnt/perconadata/my.cnf --basedir= ...
- Nginx的启动脚本
vi /etc/init.d/nginx #!/bin/sh # nginx Startup script for nginx # chkconfig: - 85 15 # proces ...
- Nginx使用(配置开机启动)
环境: 系统:CentOS 6.5 Final 安装目录:/usr/local/nginx Nginx开机自启: ①编写shell实现控制 vi /etc/init.d/nginx 添加内容: #!/ ...
- lnmp启动脚本
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH # Ch ...
- Linux centosVMware Nginx安装、 默认虚拟主机、Nginx用户认证、Nginx域名重定向
一. Nginx安装 cd /usr/local/src wget http://nginx.org/download/nginx-1.12.1.tar.gz 版本在http://nginx.org/ ...
- Linux Runlevel 启动 脚本
Linux 操作系统自从开始启动至启动完毕需要经历几个不同的阶段,这几个阶段就叫做 Runlevel,同样,当Linux操作系统关闭时也要经历另外几个不同的 Runlevel,下面详细介绍一下 Run ...
- nginx init 官方启动脚本
#!/bin/sh # # nginx - this script starts and stops the nginx daemon # # chkconfig: - 85 15 # descrip ...
- linux nginx 启动脚本
linux nginx 启动脚本 [root@webtest76 ~]# vi /etc/init.d/nginx #!/bin/bash # nginx Startup script for the ...
随机推荐
- TCP/IP协议三次握手与四次握手流程解析
原文链接地址:http://www.2cto.com/net/201310/251896.html TCP/IP协议三次握手与四次握手流程解析 TCP/IP协议的详细信息参看<TCP/IP协议详 ...
- monkey工具使用中遇到的问题之二:尝试了各种方法通过adb都无法找到设备
测试环境: 1.用的是adt-bundle-windows-x86_64-20140702里面的adb 2.用的是手机模拟器(夜神) 问题描述: 已搭建好adb的环境,输入adb,可以看到以下相关信息 ...
- js获取网页中宽高度集合
document.body.clientWidth ==> BODY对象宽度 document.body.clientHeight ==> BODY对象高度 document.docume ...
- LeetCode 206 Reverse a singly linked list.
Reverse a singly linked list. Hint: A linked list can be reversed either iteratively or recursively. ...
- addEventListener详解
为什么需要addEventListener? 先来看一个片段: html代码 <div id="box">追梦子</div> 用on的代码 window.o ...
- 如何用 SQL Tuning Advisor (STA) 优化SQL语句
在Oracle10g之前,优化SQL是个比较费力的技术活,不停的分析执行计划,加hint,分析统计信息等等.在10g中,Oracle推出了自己的SQL优化辅助工具: SQL优化器(SQL Tuning ...
- WorkFlowHelper
/* # Microshaoft /r:System.Xaml.dll /r:System.Activities.dll /r:System.Activities.DurableInstancing. ...
- 手持移动扫描终端 PDA移动开单系统-批发零售管理
条码数据采集器通过扫描商品条码移动开单,实现便携式办公,伴随式销售,是我公司的一款最新便携式开单配套产品,采集器能通过WIFI无线局域网.GPRS互联网直接与主机连接,让公司业务人员能随时随地了解公司 ...
- silverlight使用小计(先做记录后续整理)
1.Grid: a.通过获取指定行的高度和指定列的宽度来获取指定单元格的宽高 b.几种宽高默认值: 宽高(Width/Heigth):1* 最大宽高(MaxWidth/MaxHeigth):正无穷大 ...
- ElasticSearch问题记录
1.Young GC导致集群master重新选举,一台server fail [2016-12-10 07:38:24,546][WARN ][transport ] [BFRD_1] Receive ...