vim /usr/lib/systemd/system/nginx.service粘贴如下内容[Unit]Description=nginx - high performance web serverDocumentation=http://nginx.org/en/docs/After=network.target remote-fs.target nss-lookup.target[Service]Type=forking#PIDFile=/data/program/nginx/1.10.1/logs/nginx.pidExecStartPre=/data/program/nginx/1.10.1/sbin/nginx -t -c /data/program/nginx/1.10.1/conf/nginx.
开机自启动nginx这里使用的是编写shell脚本的方式来处理vi /etc/init.d/nginx (输入下面的代码)#!/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# pi
发布时间:
2016-03-30 |
类别:
系统相关 | 阅读:2401 | 评论:1 |
标签:
nginx