User Tools

Site Tools


sib:installation

Installation

This section describes the installation process of SIB servers.

Prerequisites

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.

Installation process

SSH

Enable SSH on the server

$ sudo apt-get update
$ sudo apt-get install openssh-server

Curl

Install curl

sudo apt-get install curl

NodeJS

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

pm2

Install the NodeJS process manager.

$ sudo npm install pm2 -g

Mosquitto and mqtt client library

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

MongoDB

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

GIT

Install GIT

$ sudo apt-get install git-core
sib/installation.txt · Last modified: 2019/08/27 11:29 by ozzy