selinux 开启状态下phpmyAdmin管理非本机mysql

@JAMMLY 2020年04月10日

摘要需要开启httpd_can_network_connect选项 If you want to allow HTTPD scripts and modules to connect to the network using TCP, you must turn on the httpd_can_network_connect boolean.

需要开启httpd_can_network_connect选项

If you want to allow HTTPD scripts and modules to connect to the network using TCP, you must turn on the httpd_can_network_connect boolean.

setsebool -P httpd_can_network_connect 1

查看当前httpd各项目的开关状态。

getsebool -a | grep -i httpd

查看进程httpd的selinux属性

ps -eZ | grep httpd

查看home目录的selinux属性

ls -dZ /home

修改目录以及子目录的selinux属性

chcon -R -t httpd_user_content_t /usr/share/phpMyAdmin

详细参考

http://linux.die.net/man/8/httpd_selinux

郑重声明:本站部分内容来源网络,如有侵权请联系本站删除处理!