1.编辑网络配置文件cd /etc/sysconfig/network-scriptsvi ifcfg-ens332.修改ONBOOT的值为yes3.wq保存退出4.reboot重启
1.yum install epel-release2.yum search mosquitto3.yum install mosquitto mosquitto-devel按【Y】4.service mosquitto start 启动mosquitto服务 报错Redirecting to /bin/systemctl start mosquitto.service/bin/systemctl start mosquitto.service 这么启动6.mosquitto_sub -t test1 创建一个主题 7.另外独立开启会话 mosquitto_pub -t test1 -m joyokim8.最终效果出来了
笔记：开启防火墙systemctl start firewalld 关闭防火墙systemctl stop firewalld 禁用防火墙服务systemctl make firewalld添加规则：开放80端口firewall-cmd --permanent --add-port=80/tcp开放443端口firewall-cmd --permanent --add-port=443/tcp开放22端口firewall-cmd --permanent --add-port=22/tcp开放21端口firewall-cmd --permanent --add-port=21/tcp开放23560端口firewall-cmd --permanent --add-port=23560/tcp开放8080端口firewall-cmd --permanent --add-port=8080/tcp【旧防火墙机制】安装iptablesyum -y install iptables-services开启iptablessystemctl enable iptables