Today finally have time to think oneself took a set of LNMP development environment, as a result of the previous development environment are the company's existing, the use of the time to change the configuration on the OK, feel very relaxed, but their own hands-on from the installation of virtual machines to the last step to build lnmp, unexpectedly difficult, must be down-to-earth, absolutely can not eyes above the top.
Back to the point, in accordance with the predecessor's blog, step-by-step Yum finished nginx and PHP-FPM, want to use the FASTCGI port for the project instead of the default 90001, the strange things appear
[root@localhost ~]# Service php-fpm start
starting php-fpm: [18-nov-2015 22:41:44] error:unable to bind listening Soc Ket for address ' 127.0.0.1:9001 ': Permission denied (a)
[18-nov-2015 22:41:44] ERROR:FPM
initialization failed [FAILED]
Obviously is the root user, obviously 9001 port is not occupied, how does not have the authority. Baffled
The reason is that SELinux is enabled in the CentOS kernel
[Root@localhost ~]# Cat/etc/sysconfig/selinux # This file controls to the state of SELinux on the
system.
# selinux= can take one of these three values:
# Enforcing-selinux The security policy is enforced.
# Permissive-selinux Prints warnings instead of enforcing.
# Disabled-no SELinux policy is loaded.
Selinux=enforcing
#SELINUX =disabled
# selinuxtype= can take one of these two values:
# targeted- Targeted processes are protected,
# Mls-multi level security protection.
Change the selinux=enforcing to selinux=disabled and reboot the system.
What is SELinux. When to enable SELinux and when not.