linux 시작 php - fpm 기본 9000 포트 사용 하지 않 음 Permission denied
본론 으로 들 어가 면 선배 의 블 로그 에 따라 한 걸음 한 걸음 yum 이 nginx 와 phop - fpm 를 마 친 후 프로젝트 에 사용 되 는 fastcgi 포트 를 기본 값 이 아 닌 90001 으로 바 꾸 려 고 할 때 이상 한 일이 벌 어 졌 다.
[root@localhost ~]# service php-fpm start Starting php-fpm: [18-Nov-2015 22:41:44] ERROR: unable to bind listening socket for address '127.0.0.1:9001': Permission denied (13) [18-Nov-2015 22:41:44] ERROR: FPM initialization failed [FAILED] 루트 사용자 인 데 9001 포트 가 점용 되 지 않 았 는데 권한 이 없 을 리 가 있 겠 습 니까?아무리 생각해 도 이해 할 수 없다
그 이 유 는 Centos 커 널 에서 SELinux 를 사용 하기 때 문 입 니 다.
[root@localhost ~]# cat /etc/sysconfig/selinux # 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=enforcing #SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted SELINUX = enforcing 을 SELINUX = disabled 로 바 꾸 고 시스템 을 다시 시작 하면 됩 니 다.
원문:https://blog.csdn.net/yesuhuangsi/article/details/49914231