Centos7安装

1.网卡名改为enth0

A:  vim /etc/sysconfig/grub

B:  第三行添加“net.ifnames=0 biosdevname=0”

C: 执行指令:grub2-mkconfig -o /boot/grub2/grub.cfg

2.修改自动获取IP

A:更改 etc/sysconfig/network-scripts/ifcfg-eth0 ,将ONBOOT="no" 改为 ONBOOT="yes"

B:保存后:service network restart

C:查看IP:ifconfig

mosquitto搭建

1.安装g++

通常情况下在centos下安装软件就用yum.

关键是,使用yum你的知道安装包的名字是什么。如果直接键入yum install g++,

会告诉你没有这个包。所以你应该使用gcc-c++,这才是这个包的名字。

2.修改config.mk文件

WITH_TLS:=no

WITH_TLS_PSK:=no

WITH_SRV:=no

3.编译mosquitto

make

4 安装mosquitto

make install

5 添加用户

adduser mosquitto

6 修改共享库libmosquitto.so.1

root权限下

#cat /etc/ld.so.conf

      include ld.so.conf.d/*.conf

  # echo "/usr/local/lib" >> /etc/ld.so.conf

  # ldconfig

7 启动mosquitto

mosquitto -c /etc/mosquitto/mosquitto.conf -d”或 mosquitto -v

辅助指令

1.结束mosquitto进程

pkill  mosquitto

2.centos7默认使用的是firewall作为防火墙,不是iptables

Systemctl start firewalld.service   启动firewall

Systemctl stop firewalld.service   停止firewall

Systemctl disable firewalld.service 禁止firewall开机启动

最新文章

  1. linux后台查看共享内存和消息队列的命令
  2. plsql导入excel时报错:ORA-01036: 非法变量名/编号
  3. mvc项目架构分享系列之架构搭建之Infrastructure
  4. 64位python安装MySQL-python 1.2.5
  5. RedHat安装VMwareTools出现解压压缩包时无法打开文件的现象
  6. 设计模式 命令-Command
  7. [POJ 1155] TELE
  8. etTimeout与setInterval方法的区别
  9. unity3d Realistic eye shading 真实的眼睛渲染
  10. openssl 安装
  11. 解决windows7搜索不了txt文本内容的问题
  12. C#中 如何执行带GO的sql 语句
  13. Intent的Component,Action和Category属性详解-android学习之旅(五十)
  14. Gym - 101606G Gentlebots
  15. 弹窗查看内容时 内容滚动区域设置为body区
  16. 小甲鱼Python第七讲课后习题
  17. php调用c#的dll(转)
  18. Intellij IDEA 编译等级与源代码等级不一致问题
  19. 安装vue后报错 bash: vue: command not found
  20. 切片和append操作

热门文章

  1. JavaEE三层架构与MVC
  2. TTFB 时间过长
  3. java1.8 lambda进行并行运算
  4. Python实现协程
  5. 2018-2019-2 20165234 《网络对抗技术》 Exp6 信息搜集与漏洞扫描
  6. PHP中定义常量的区别,define() 与 const
  7. CDH 安装的博客地址记录
  8. Android插件化(五):OpenAtlasの四大组件的Hack
  9. JDK&JRE
  10. It’s worth noting值得注意的是