2016-05-06 75 views
0

我想在我的Ubuntu 14.04 LTSMosquitto安装在我的Ubuntu 14.04

sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa 
sudo apt-get update 
sudo apt-get install mosquitto-clients 

安装Mosquitto,但我有一个错误安装测试:

[email protected]:~$ mosquitto_sub -t '$SYS/#' -v 
Error: Connection refused 

查验来自外部主机是好的:

ping 199.162.221.117 
PING 199.162.221.117 (199.162.221.117): 56 data bytes 
64 bytes from 199.162.221.117: icmp_seq=0 ttl=55 time=102.234 ms 

但不

ping 199.162.221.117:1883 
ping: cannot resolve 199.162.221.117:1883: Unknown host 

[email protected]:~$ sudo start mosquitto 
[sudo] password for devuser: 
start: Unknown job: mosquitto 

[email protected]:~$ sudo /etc/init.d/mosquitto start 
sudo: /etc/init.d/mosquitto: command not found 
+1

尝试只使用蚊子,如https://jsenthilnathanlinux.wordpress.com/2015/03/18/how-to-install-mosquitto-mqtt-on-ubuntu/中所述,并看看这也是:https://lukeisadog.wordpress.com/2014/02/27/setting-up-mqtt-on-ubuntu-round-1/ – PseudoAj

回答

0

你只安装了mosquitto命令行客户端(mosquitto_sub & mosquitto_pub)而不是实际的经纪人

$ sudo apt-get install mosquitto 

这应该安装真正的经纪人,然后你将能够st艺术与你列出的最后一个命令