Skip to content

Instantly share code, notes, and snippets.

@alanzhaonys
Last active June 5, 2020 01:16
Show Gist options
  • Save alanzhaonys/42eacaa74725be843449f4c14826ca0c to your computer and use it in GitHub Desktop.
Save alanzhaonys/42eacaa74725be843449f4c14826ca0c to your computer and use it in GitHub Desktop.
Mosquitto in Centos*
# Enable EPEL
yum -y install epel-release
yum install mosquitto
systemctl enable mosquitto
systemctl start mosquitto
# Generate password
mosquitto_passwd -c /etc/mosquitto/passwd sammy
# Allow following lines to /etc/mosquitto/mosquitto.conf
allow_anonymous false
password_file /etc/mosquitto/passwd
# Firewall
firewall-cmd --permanent --add-port=1883/tcp
firewall-cmd --reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment