问题:
sudo service nginx start
启动失败
解决:
# 查看 SELinux 的状态
$ /usr/sbin/sestatus
SELinux status: disabled
# 将SELINUX=enforcing 修改为 SELINUX=disabled
$ sudo vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
# 重启
reboot
参考:https://blog.csdn.net/onlysunnyboy/article/details/75270533
最后
以上就是冷静电话最近收集整理的关于nginx 使用 service nginx start 启动失败的全部内容,更多相关nginx内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复