centos7 yum安装nginx
1.安装源
yum install epel-release
2.安装 (-y 的意思是自动yes)
yum install nginx -y
3.查找安装到哪里了
whereis nginx
一般都是在 /etc/nginx下面
4.常用命令
检查配置文件是否正确 nginx -t
启动 systemctl start nginx
查看状态 systemctl status nginx
设置开机启动 systemctl enable nginx
重启服务 systemctl reload nginx
停止 systemctl stop nginx