centos6.5 nginx开机启动
/etc/init.d/下添加nginxd文件,内容如下:
#!/bin/bash
#
#chkconfig: -
#description: Nginx is a World Wide Web server.
#processname: nginx nginx=/usr/local/nginx/nginx
conf=/usr/local/nginx/nginx.conf case $ in
start)
echo -n "Starting Nginx"
$nginx -c $conf
echo " done"
;; stop)
echo -n "Stopping Nginx"
killall - nginx
echo " done"
;; test)
$nginx -t -c $conf
;; reload)
echo -n "Reloading Nginx"
ps auxww | grep nginx | grep master | awk '{print $2}' | xargs kill -HUP
echo " done"
;; restart)
$ stop
$ start
;; show)
ps -aux|grep nginx
;; *)
echo -n "Usage: $0 {start|restart|reload|stop|test|show}"
;; esac
添加执行权限
chmod +x /etc/init.d/nginxd
添加到服务
chkconfig --add nginxd
设置开机启动
chkconfig nginxd on
centos6.5 nginx开机启动的更多相关文章
- centos6.5 mysql开机启动
可参考:centos6.5 nginx开机启动 /etc/init.d/下添加mysqld文件,内容如下: #!/bin/sh # Copyright Abandoned TCX DataKonsul ...
- centos6.5 tomcat开机启动
可参考:centos6.5 nginx开机启动 /etc/init.d/下添加tomcatd文件,内容如下: #!/bin/sh # # chkconfig: - # # Licensed to th ...
- CentOS下nginx+php的配置及nginx开机启动配置
关闭防火墙 (不然外链接是访问不了 apache) service iptables stop 关闭安全系统 SELinux( 不然报403 访问页面错误 ) 1.Nginx安装主要在于配置文件的修改 ...
- Centos7 Nginx开机启动
1.简易安装nginx: ./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf ...
- nginx开机启动
centos 7以上是用Systemd进行系统初始化的 Systemd服务文件以.service结尾,比如现在要建立nginx为开机启动,如果用yum install命令安装的,yum命令会自动创建n ...
- centos7.2 下 nginx 开机启动
1.在系统服务目录里创建nginx.service文件 1 vi /lib/systemd/system/nginx.service 内容如下 1 2 3 4 5 6 7 8 9 10 11 12 1 ...
- Centos7 Nginx 开机启动
Centos 系统服务脚本目录: 用户(user) 用户登录后才能运行的程序,存在用户(user) /usr/lib/systemd/ 系统(system) 如需要开机没有登陆情况下就能运行的程序,存 ...
- [转]centos7.2 下 nginx 开机启动
1.在系统服务目录里创建nginx.service文件 vi /lib/systemd/system/nginx.service 内容如下 [Unit] Description=nginx After ...
- Linux上如何设置nginx开机启动
连接上linux后输入以下命令--vim /etc/init.d/nginx 然后在这个空文件写入下面内容: 保存好后,修改下该文件权限--chmod 777 /etc/init.d/nginx 然后 ...
随机推荐
- Apache CXF实现WebService入门教程(附完整源码)
Apache CXF实现WebService非常简单实用,只需要几步就可以实现一个简单的web service. 首先我们需要新建一个maven项目,在pom中添加依赖和jetty作为测试的web s ...
- [Js/Jquery]table行转列
摘要 在使用ews调用exhange的收件箱的并在h5页面显示邮件详情的时候,因为返回的每封邮件的内容都是htmlbody,没有textbody.每封邮件又没什么规律,用正则表达式来匹配内容并不合适, ...
- PPTP(Point to Point Tunneling Protocol),即点对点隧道协议。
PPTP PPTP(Point to Point Tunneling Protocol),即点对点隧道协议.该协议是在PPP协议的基础上开发的一种新的增强型安全协议,支持多协议虚拟专用网(VPN),可 ...
- fedora14 安装中文输入法
We trust you have received the usual lecture (n. 演讲 讲课 讲座; 教训 训斥 告诫) from the local SystemAdministra ...
- php 遍历目录下的所以文件和文件夹
<?php/** * 遍历文件夹和文件列 * @author lizhiming * @date 2016/06/30 */define('DS', DIRECTORY_SEPARATOR); ...
- Latex 数学符号表
- Ruby注意事项
在Ruby中只有false和nil是'假', 其余都是真(0也是真)
- SGU 495. Kids and Prizes
水概率....SGU里难得的水题.... 495. Kids and Prizes Time limit per test: 0.5 second(s)Memory limit: 262144 kil ...
- SEO 百度后台主动推送链接
实践步骤,先用爬虫程序将本网站的所有连接爬取出来,再用python文件处理程序把爬虫来的东东整理成一行一个链接的文本格式.再用postman接口测试工具,使用post方式,将所有的链接post过去,这 ...
- Redis学习笔记五:独立功能之事务
Redis 事务提供了一种将多个命令请求打包,然后一次性.按顺序地执行多个命令的机制,并且在事务执行期间,服务器不会中断,会将事务中的所以命令都执行完毕才去处理其他客户端的命令请求. 事务的实现 事务 ...