systemctl start firewalld
firewall-cmd --zone=public --add-port=6379/tcp --permanent
其中zone表示作用域,参数permanent表示永久生效
firewall-cmd --reload