nginx,开机启动
后端开发-php教程
j2me 游戏 源码,vscode怎么添加调试变量,ubuntu 14主题,tomcat热加载教程,sqlite储存图片,PS网页设计总结,云服务器ecs绑定域名,jedate插件下载,前端思考框架,乐高慢爬虫,php tidy,seo入门教程视频,springboot事物面试,企业网站制作免费下载,图片在网页上下移动,体育公司简介模板,web 后台管理模板,css页面滚动到顶部,tp cms内容管理系统,用户界面模块程序lzw
[root@localhost ~]#vi /etc/init.d/nginx #新建文件
手机3d捕鱼源码,vscode增加缩进,rvboards ubuntu,ssl链接tomcat,sqlite 编码修改,如何绑定域名和服务器,wp博客美化插件推荐,前端2020开发框架,影视 爬虫,php连接量,东莞seo优化顾问公司,水墨风格 网站,网页聊天样式,fla杂志翻书模板,wordpress页面tab,橙色管理系统,app论坛程序lzw
#!/bin/bash# nginx Startup script for the Nginx HTTP Server# it is v.0.0.2 version.# 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/run/nginx.pid# config: /usr/local/nginx/conf/nginx.conf#nginx程序路径nginxd=/usr/sbin/nginx#nginx配置文件路径nginx_c/nginx/nginx.conf#nginx pid文件的路径,可以在nginx的配置文件中找到nginx_pid=/var/run/nginx/nginx.pidRETVAL=0prog="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 1fi 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" instart) start ;;stop) stop ;;reload) reload ;;restart) stop start ;;status) status $prog RETVAL=$? ;;*) echo $"Usage: $prog {start|stop|restart|reload|status|help}" exit 1esacexit $RETVAL
原生js获取网页源码,Ubuntu硬盘显示不全,tomcat加载war包出错,亿田爬虫,php电商平台分析,狂人seolzw
[root@localhost ~]#chmod +x /etc/init.d/nginx #加执行权限[root@localhost ~]#chkconfig --add nginx #将nginx做成服务[root@localhost ~]# chkconfig --list |grep nginxnginx 0:off 1:off 2:off 3:off 4:off 5:off 6:off[root@localhost ~]# chkconfig nginx on #将nginx做成开机启动[root@localhost ~]# chkconfig --list |grep nginxnginx 0:off 1:off 2:on 3:on 4:on 5:on 6:off
以上就介绍了将nginx做成服务并开机启动,包括了nginx,开机启动方面的内容,希望对PHP教学有兴趣的朋友有所帮助。