那只能重载啊!
重新加载会告诉服务重新加载其配置文件,但保持相同的进程运行。重新启动会告诉它完全关闭,然后重新启动。
- 一些支持该reload命令的服务可以重新加载其配置,而不必完全关闭并重新启动。
- Postfix和Apache一样。如果你需要对活动服务器进行配置更改而不会导致停机几秒钟,这非常有用。
系统:RHEL 7
RHEL 7系统中是使用systemctl命令来管理服务的。
RHEL 6系统 RHEL 7系统
service 服务名称 start systemctl start 启动服务
service 服务名称 restart systemctl restart 重启服务
service 服务名称 stop systemctl stop 关闭服务
service 服务名称 reload systemctl status 重新加载服务
service 服务名称 status systemctl enable 查看服务状态
如nginx:服务 + 命令。
- 启动 :
start nginx
或者:
nginx.exe
- 停止 :
nginx.exe -s stop (快速停止,可能损失数据)
或
nginx.exe -s quit (完全停止,不损失数据)
- 重载 (更新配置文件后需要重载使得生效):
nginx.exe -s reload