【Nginx详解】nginx之启动、重启、停止

centos下 nginx 安装 启动 重启 停止

腾讯云linux服务器下默认是没有安装 nginx

nginx 安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[root@VM_0_8_centos ~]# yum install -y nginx
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel | 5.4 kB 00:00:00
extras | 3.4 kB 00:00:00
os | 3.6 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/2): epel/7/x86_64/updateinfo | 1.0 MB 00:00:00
(2/2): epel/7/x86_64/primary_db | 6.8 MB 00:00:01
Resolving Dependencies
...
Dependency Updated:
freetype.x86_64 0:2.8-12.el7_6.1

Complete!

nginx 启动

1
2
[root@VM_0_8_centos ~]# service nginx start
Redirecting to /bin/systemctl start nginx.service

nginx 重启

1
2
[root@VM_0_8_centos www]# service nginx restart
Redirecting to /bin/systemctl restart nginx.service

nginx 停止

1
2
[root@VM_0_8_centos www]# service nginx stop
Redirecting to /bin/systemctl stop nginx.service

坚持原创技术分享,您的支持将鼓励我继续创作!