CentOS通过yum安装Nginx

直接通过命令安装

yum -y install nginx

启动 nginx 服务

➜  ~ service nginx start
Starting nginx:                                             [  OK  ]

停止 nginx 服务

➜  ~ service nginx stop 
Stopping nginx:                                            [  OK  ]

重启 nginx 服务

➜  ~ service nginx restart
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]

Nginx默认目录

输入命令:

whereis nginx

nginx.conf

/etc/nginx/conf.d/default.conf

你可能感兴趣的:(CentOS通过yum安装Nginx)