防火墙
关闭防火墙
firewalld
bash
systemctl stop firewalld
bash
systemctl disable firewalld
bash
systemctl status firewalld
ufw
bash
ufw disable
bash
ufw status
iptables
bash
systemctl stop iptables
bash
systemctl disable iptables
bash
iptables -L
关闭SELinux
确认是否开启了SELinux
bash
sestatus
bash
[root@172-233-81-223 api-dify-ai]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 33
[root@172-233-81-223 api-dify-ai]#
关闭SELinux或者修改SELinux策略
bash
setenforce 0
getenforce
bash
vi /etc/selinux/config
SELINUX=disabled