Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
44 views

Mosquitto Ec2 Ubuntu Setup

The document describes the output from running various commands on an Ubuntu 22.04.2 LTS system. It shows system information, updating packages, installing the mosquitto MQTT broker and clients, and configuring authentication for the broker.

Uploaded by

ranjan biswas
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Mosquitto Ec2 Ubuntu Setup

The document describes the output from running various commands on an Ubuntu 22.04.2 LTS system. It shows system information, updating packages, installing the mosquitto MQTT broker and clients, and configuring authentication for the broker.

Uploaded by

ranjan biswas
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.

0-1031-aws x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

System information as of Sat Apr 8 06:58:53 UTC 2023

System load: 0.29443359375 Processes: 100


Usage of /: 20.2% of 7.57GB Users logged in: 0
Memory usage: 21% IPv4 address for eth0: 172.31.86.184
Swap usage: 0%

Expanded Security Maintenance for Applications is not enabled.

0 updates can be applied immediately.

Enable ESM Apps to receive additional future security updates.


See https://ubuntu.com/esm or run: sudo pro status

The list of available updates is more than a week old.


To check for new updates run: sudo apt update

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by


applicable law.

To run a command as administrator (user "root"), use "sudo <command>".


See "man sudo_root" for details.

ubuntu@ip-172-31-86-184:~$ sudo apt-get install update


Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package update
ubuntu@ip-172-31-86-184:~$ sudo apt-get update
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease [119
kB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease [108
kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
[14.1 MB]
Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe Translation-en
[5652 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f
Metadata [286 kB]
Get:8 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/multiverse amd64
Packages [217 kB]
Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/multiverse Translation-
en [112 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f
Metadata [8372 B]
Get:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64
Packages [990 kB]
Get:12 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/main
Translation-en [210 kB]
Get:13 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-
f Metadata [13.9 kB]
Get:14 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/restricted
amd64 Packages [744 kB]
Get:15 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/restricted
Translation-en [115 kB]
Get:16 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/restricted
amd64 c-n-f Metadata [576 B]
Get:17 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/universe amd64
Packages [899 kB]
Get:18 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/universe
Translation-en [180 kB]
Get:19 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/universe amd64
c-n-f Metadata [18.6 kB]
Get:20 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/multiverse
amd64 Packages [24.1 kB]
Get:21 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/multiverse
Translation-en [6312 B]
Get:22 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/multiverse
amd64 c-n-f Metadata [444 B]
Get:23 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports/main amd64
Packages [40.6 kB]
Get:24 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports/main
Translation-en [9800 B]
Get:25 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-
n-f Metadata [388 B]
Get:26 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports/restricted
amd64 c-n-f Metadata [116 B]
Get:27 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports/universe
amd64 Packages [20.3 kB]
Get:28 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports/universe
Translation-en [14.4 kB]
Get:29 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports/universe
amd64 c-n-f Metadata [480 B]
Get:30 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports/multiverse
amd64 c-n-f Metadata [116 B]
Get:31 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [728
kB]
Get:32 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [147
kB]
Get:33 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata
[9020 B]
Get:34 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages
[701 kB]
Get:35 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en
[109 kB]
Get:36 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f
Metadata [576 B]
Get:37 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
[716 kB]
Get:38 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en
[118 kB]
Get:39 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f
Metadata [14.2 kB]
Get:40 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages
[19.4 kB]
Get:41 http://security.ubuntu.com/ubuntu jammy-security/multiverse Translation-en
[4068 B]
Get:42 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f
Metadata [228 B]
Fetched 26.6 MB in 5s (5569 kB/s)
Reading package lists... Done
ubuntu@ip-172-31-86-184:~$ sudo apt-get install mosquitto mosquitto-clients
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libcjson1 libdlt2 libev4 libmosquitto1 libwebsockets16
The following NEW packages will be installed:
libcjson1 libdlt2 libev4 libmosquitto1 libwebsockets16 mosquitto mosquitto-
clients
0 upgraded, 7 newly installed, 0 to remove and 12 not upgraded.
Need to get 648 kB of archives.
After this operation, 1967 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 libcjson1
amd64 1.7.15-1 [15.5 kB]
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 libdlt2
amd64 2.18.6-2 [52.5 kB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64
libmosquitto1 amd64 2.0.11-1ubuntu1 [51.6 kB]
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 libev4
amd64 1:4.33-1 [29.4 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64
libwebsockets16 amd64 4.0.20-2ubuntu1 [188 kB]
Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64 mosquitto
amd64 2.0.11-1ubuntu1 [239 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/universe amd64
mosquitto-clients amd64 2.0.11-1ubuntu1 [72.6 kB]
Fetched 648 kB in 0s (3814 kB/s)
Selecting previously unselected package libcjson1:amd64.
(Reading database ... 63657 files and directories currently installed.)
Preparing to unpack .../0-libcjson1_1.7.15-1_amd64.deb ...
Unpacking libcjson1:amd64 (1.7.15-1) ...
Selecting previously unselected package libdlt2:amd64.
Preparing to unpack .../1-libdlt2_2.18.6-2_amd64.deb ...
Unpacking libdlt2:amd64 (2.18.6-2) ...
Selecting previously unselected package libmosquitto1:amd64.
Preparing to unpack .../2-libmosquitto1_2.0.11-1ubuntu1_amd64.deb ...
Unpacking libmosquitto1:amd64 (2.0.11-1ubuntu1) ...
Selecting previously unselected package libev4:amd64.
Preparing to unpack .../3-libev4_1%3a4.33-1_amd64.deb ...
Unpacking libev4:amd64 (1:4.33-1) ...
Selecting previously unselected package libwebsockets16:amd64.
Preparing to unpack .../4-libwebsockets16_4.0.20-2ubuntu1_amd64.deb ...
Unpacking libwebsockets16:amd64 (4.0.20-2ubuntu1) ...
Selecting previously unselected package mosquitto.
Preparing to unpack .../5-mosquitto_2.0.11-1ubuntu1_amd64.deb ...
Unpacking mosquitto (2.0.11-1ubuntu1) ...
Selecting previously unselected package mosquitto-clients.
Preparing to unpack .../6-mosquitto-clients_2.0.11-1ubuntu1_amd64.deb ...
Unpacking mosquitto-clients (2.0.11-1ubuntu1) ...
Setting up libmosquitto1:amd64 (2.0.11-1ubuntu1) ...
Setting up libev4:amd64 (1:4.33-1) ...
Setting up libcjson1:amd64 (1.7.15-1) ...
Setting up mosquitto-clients (2.0.11-1ubuntu1) ...
Setting up libdlt2:amd64 (2.18.6-2) ...
Setting up libwebsockets16:amd64 (4.0.20-2ubuntu1) ...
Setting up mosquitto (2.0.11-1ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mosquitto.service →
/lib/systemd/system/mosquitto.service.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Scanning processes...

Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.


ubuntu@ip-172-31-86-184:~$ ls
ubuntu@ip-172-31-86-184:~$ cd /etc/mo
modprobe.d/ modules-load.d/ mosquitto/
ubuntu@ip-172-31-86-184:~$ cd /etc/mo
modprobe.d/ modules-load.d/ mosquitto/
ubuntu@ip-172-31-86-184:~$ cd /etc/mo
modprobe.d/ modules-load.d/ mosquitto/
ubuntu@ip-172-31-86-184:~$ cd /etc/mosquitto/
ubuntu@ip-172-31-86-184:/etc/mosquitto$ sudo nano default.conf
ubuntu@ip-172-31-86-184:/etc/mosquitto$ sudo mosquitto_passwd -c
/etc/mosquitto/passwd
Error: -c argument given but password file or username missing.
ubuntu@ip-172-31-86-184:/etc/mosquitto$ sudo mosquitto_passwd -c
/etc/mosquitto/passwd digiline
Password:
Reenter password:
ubuntu@ip-172-31-86-184:/etc/mosquitto$ sudo systemctl restart
Too few arguments.
ubuntu@ip-172-31-86-184:/etc/mosquitto$ sudo systemctl restart mosquitto.service
ubuntu@ip-172-31-86-184:/etc/mosquitto$

You might also like