This section describes the installation process of SIB servers.
Before starting this tutorial you will need a server with Ubuntu installed. It is recommended to start with a clean Ubuntu 18.04 LTS or Ubuntu 16.04 LTS installation.
Enable SSH on the server
$ sudo apt-get update $ sudo apt-get install openssh-server
Install curl
sudo apt-get install curl
Install NodeJS and Node Package Manager (npm)
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - $ sudo apt-get install -y nodejs
To get access to the SIB components we need to tell npm where to find the SIB npm repository. This is done in a .npmrc file.
In your home directory, create a file called .npmrc with the following contents:
registry=http://npm.remotehost.se:4873/ package-lock=false
Install the NodeJS process manager.
$ sudo npm install pm2 -g
Install Mosquitto and the mqtt client library.
$ sudo apt-get install mosquitto $ sudo npm install mqtt -g
You can make sure that it works by opening two consoles. In the first one, subscribe to an mqtt topic by typing:
$ mqtt_sub -t test/# -v
In the other console, publish a message by typing:
$ mqtt_pub -t test/mqtt/installation itworks
Install MongoDB
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 $ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list $ sudo apt-get update $ sudo apt-get install -y mongodb-org
Install GIT
$ sudo apt-get install git-core