Doraemon

小叮当    2012 - 2023
Doraemon

Choose mode

  • dark
  • auto
  • light
首页
Category
  • 前端开发
  • 后端
  • 数据库
  • 运维
Tag
TimeLine
关于
  • 关于我
Contact
  • GitHub
author-avatar

小叮当

39

Article

25

Tag

首页
Category
  • 前端开发
  • 后端
  • 数据库
  • 运维
Tag
TimeLine
关于
  • 关于我
Contact
  • GitHub

nginx-linux 关闭/重启/启动的操作方法

小叮当    2012 - 2023

nginx-linux 关闭/重启/启动的操作方法


小叮当 2020-08-09 NginxLinux运维

# 1、关闭

service nginx stop
1
systemctl stop nginx
1

# 2、启动

service nginx start
1
systemctl start nginx
1

# 3、重启

service nginx reload
1
systemctl restart nginx
1

# 4、随系统启动自动运行

systemctl enable nginx
1

# 5、禁止随系统启动自动运行

systemctl disable nginx
1

# 6、查看 nginx 是否启动

ps -ef | grep ngin
1

ps -ef:列出进程列表 grep:过滤

知识点扩展

首先利用配置文件启动 nginx。 命令:

nginx -c /usr/local/nginx/conf/nginx.conf 重启服务: service nginx restart

  1. 快速停止或关闭 Nginx:nginx -s stop

  2. 正常停止或关闭 Nginx:nginx -s quit

  3. 配置文件修改重装载命令:nginx -s reload

  • 1、关闭
  • 2、启动
  • 3、重启
  • 4、随系统启动自动运行
  • 5、禁止随系统启动自动运行
  • 6、查看 nginx 是否启动