selinux 阻塞了端口 8332。现在我想解锁它。但是我必须使用什么端口类型来进行 rpc 连接?这是我收到的消息:
SELinux is preventing /usr/sbin/php-fpm from name_connect access on the tcp_socket port 8332.
***** Plugin connect_ports (85.9 confidence) suggests *********************
If you want to allow /usr/sbin/php-fpm to connect to network port 8332
Then you need to modify the port type.
Do
# semanage port -a -t PORT_TYPE -p tcp 8332
waarin PORT_TYPE een van de volgende is: dns_port_t, dnssec_port_t, http_port_t, kerberos_port_t, ocsp_port_t.
答案1
经过一番搜索我终于找到了答案。只需运行这个命令:
sudo setsebool -P httpd_can_network_connect 1