运行命令:
systemctl start nginx
报错:
Job for nginx.service failed because the control process exited with
error code. See "systemctl stat
1、端口占用(教程过多,不再赘述)
2、SElinux
semanage port -m -t http_port_t -p tcp 5003
运行上述代码后,查看端口是否添加成功
sudo semanage port -l | grep http_port_t
如果你不确定是selinux的问题,可以先将其关闭后启动nginx,但只是暂时的,重启后恢复
setenforce 0