mO SharemO Share

Ubuntu Trusty Tahr LTS (14.04) Setup

On this page:

Introduction

This document will describe the Initial setup of Site Controller on an Ubuntu LTS linux distribution. 

Prerequisites

You will need to know the IP of the system and to have access via ssh.

Required installation files

  • mosquitto installation archive (e.g. mosquitto-1.3.4.tar.gz): mosquitto MQTT broker in the system, version 1.3.4 or above
  • psutil installation archive: psutil libaries, version 2.2.1 or above
  • SiteController installation archive (e.g. SiteController-install-1.1-Jever.tar.gz):  SiteController modules and necessary python libraries 

  File Modified

Text File mosquitto-1.3.4.tar.gz

Jul 19, 2016 by Carsten Fenneker

Text File psutil-2.2.1.tar.gz

Jul 19, 2016 by Carsten Fenneker

SiteController is available through official purchase of a license or directly through azeti for development tests / integration tests. Upload the required files to the ubuntu server, e.g. in /root/download and proceed from there.

Configure the time zone

Timezone configuration

Before you begin the installation, make sure that you have the system with the right time configuration and a timezone configured in your system. Please read the file /etc/timezone to check that it is including your location. This file should contain a pair (Example: Europe/Berlin), that corresponds to the names that you can find in /usr/share/zoneinfo.

Core software installation

Once the system is installed, you will need to do a basic configuration of the system in order to connect to the cloud server. You should have received all the credentials beforehand, contact your provider in case you miss some information.

  1. Install prerequisites for compiling packages

    root@ubuntu:~# apt-get install build-essential libc-ares-dev xsltproc docbook-xsl gcc python-dev libssl-dev
  2. Install mosquitto, create a mosquitto group and user

    root@ubuntu:~/download# tar xzf mosquitto-1.3.4.tar.gz 
    root@ubuntu:~/download# cd mosquitto-1.3.4/
    root@ubuntu:~/download/mosquitto-1.3.4# groupadd mosquitto
    root@ubuntu:~/download/mosquitto-1.3.4# useradd -g mosquitto mosquitto
    root@ubuntu:~/download/mosquitto-1.3.4# make && make install
  3. Create a mosquitto configuration

    root@ubuntu:~/download# mv /etc/mosquitto/mosquitto.conf.example /etc/mosquitto/mosquitto.conf 
  4. Set a log_dest. To do so please edit /etc/mosquitto/mosquitto.conf and change as noted below line 419 (or similar). All logging output will go into /opt/azeti/SiteController/log/mosquitto.log

    ...
    #log_dest stderr
    # sebastian.koch - manually added log destination
    log_dest file /opt/azeti/SiteController/log/mosquitto.log
    ...
  5. Install python-psutil 

    root@ubuntu:~/download# tar xzf psutil-2.2.1.tar.gz 
    root@ubuntu:~/download# cd psutil-2.2.1 
    root@ubuntu:~/download/psutil-2.2.1# python setup.py install
  6. Install SiteController (output was truncated)

    root@ubuntu:~/download# tar xzf SiteController-install-1.1-Jever.tar.gz 
    root@ubuntu:~/download# cd SiteController-install/
    root@ubuntu:~/download/SiteController-install# ./setup.sh 
    OS type is generic Ubuntu
    Creating new site controller startup configuration ...
    Checking for previous installation of SiteController ...
    No previous installation found. Creating folder ...
    Installing python libraries ...
    Checking for presence of setuptools ... Not present
    Installing setuptools ...
    
    ...
    
    Updating autostart script ...
    Sorry, no autostart script available for your system.
    Adapting configuration to your system ...
    Please provide a unique serial name for your SiteController!
    Allowed characters are upper and lower case ASCII [a-zA-Z],
    digits [0-9], dashes - and underlines _.
    Your entry: > Ubuntu-Test-sebastian
    Serial name set to Ubuntu-Test-sebastian
    Thank you.
    Changing serial id of SiteController from "" to "Ubuntu-Test-sebastian".
  7. TODO: MOSQUITTO_FOLDER must be /usr/local