centos7 端口段的查询

在apache中绑定非http标准端口时,一直出现如下的错误提示:
[root@localhost ~]# /etc/init.d/httpd start
Starting httpd: (13)Permission denied: make_sock: could not bind to address 0.0.0.0:888
no listening sockets available, shutting down
Unable to open logs
[FAILED]
解决方案:
增加selinux中http的端口
semanage port -l|grep http #查看SELinux下http相关端口
semanage port -a -t http_port_t -p tcp 888 #增加这个非标准端口即可
[root@localhost ~]# /etc/init.d/httpd restart 或者 service httpd start
Stopping httpd: [  OK  ]
Starting httpd: [  OK  ]


分享到: 微信 更多