出现:nginx: [emerg] getpwnam(“nginx”) failed
原因:缺少一个系统用户
解决:
useradd -s /bin/nologin -M nginx
前因:我用yum install nginx -y安装nginx 修改了端口80 服务无法起来了。
原因: centos 有一个安全机制selinux 会影响到,没有权限
解决:修改配置文件就行了
临时关闭
setenforce 0
永久关闭
[root@ops ~]# cat /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=permissive
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
#SELINUXTYPE=targeted
尚在学习中不间断更新