Server part of a project related to the Internet of medical things
To start Mosquitto:
sudo systemctl start mosquitto
To enable Mosquitto:
sudo systemctl enable mosquitto
To install and add jwt-auth plugin:
- Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Clone:
git clone git@github.com:wiomoc/mosquitto-jwt-auth.git
- Build:
cargo build --release
- Move plugin to /etc/mosquitto/
- Set enviroment variable
JWT_KEY
- Uncomment strokes in mosquitto.conf
- Create virtual environment
virtualenv .env
source .env/bin/activate
pip3 install -r requirements.txt
deactivate
- Create virtual host config in /etc/nginx/sites-available/ and create symbolic link
sudo ln -s /etc/nginx/sites-available/iomt /etc/nginx/sites-enabled
- Create /etc/systemd/system/iomt.service and start service
sudo systemctl start iomt
sudo systemctl enable iomt
- Start nginx
sudo systemctl start nginx
sudo systemctl enable nginx