mysql服务相关命令
启动mysql服务
systemctl start mysqld.service
停止mysql服务
systemctl stop mysqld.service
重启mysql服务
systemctl restart mysqld.service
查看mysql服务当前状态
systemctl status mysqld.service
设置mysql服务开机自启动
systemctl enable mysqld.service
停止mysql服务开机自启动
systemctl disable mysqld.service
firewall防火墙相关命令
查看防火墙状态
firewall-cmd --state
或
systemctl status firewalld.service
启动firewall
systemctl start firewalld.service
停止firewall
systemctl stop firewalld.service
firewall重启
systemctl restart firewalld.service
firewall开机启动
systemctl enable firewalld.service
禁止firewall开机启动
systemctl disable firewalld.service
iptables命令开放端口相关命令
systemctl start iptables 启动
systemctl status iptables 查看运行状态
systemctl restart iptables.service 重启
systemctl stop iptables.service 停止
systemctl enable iptables.service 设置开机启动
systemctl disable iptables.service 禁止开机启动