切换到/lib/systemd/system/目录,创建nginx.service文件
vim nginx.service
[unit]
description=nginx
after=network.target
[service]
type=forking
execstart=/usr/local/nginx/sbin/nginx
execreload=/usr/local/nginx/sbin/nginx reload
execstop=/usr/local/nginx/sbin/nginx quit
privatetmp=true
[install]
wantedby=multi-user.target
退出并保存文件,执行systemctl enable nginx.service使nginx开机启动
systemctl start nginx.service 启动nginx
systemctl stop nginx.service 结束nginx
syst服务器托管网emctl restart nginx.service 重启nginx
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
相关推荐: 网易面经:深剖TCP协议的流量控制和拥塞控制,你懂了吗?
TCP(Transmission Control Protocol,传输控制协议)是一种面向连接的、可靠的、基于字节流的传输层通信协议,由IETF的RFC 793定义。TCP提供全双工通信、数据可靠传输和拥塞控制等功能,适用于因特网等应用场景。TCP位于OSI…