CentOS 7 x64 Setup
Related pages:
Introduction
This document will describe the Initial setup of Site Controller on a CentOS linux distribution.
Prerequisites
You will need to know the IP of the system and to have access via ssh.
Required installation files
- SiteController installation archive (e.g. SiteController-install-1.3-Astra.tar.gz): SiteController modules and necessary python libraries
SiteController is available through official purchase of a license or directly through azeti for development tests / integration tests. Upload the required files to the server, e.g. in /root/download and proceed from there.
Configure the time zone
Core software installation
All the following commands must be done as root. You can add "sudo" to the beginning of all the commands or use "sudo su" in order to be root and continue with the instructions.
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.
Install prerequisites for compiling packages
yum install gmp-devel python-devel
Install Mosquitto
Download the repository config file for your CentOS version from below and copy it to /etc/yum.repos.d/ You’ll now be able to install and keep mosquitto up to date using the normal package management tools.
Install mosquitto "yum install mosquitto" and mosquitto clients "yum install mosquitto-clients"
[root@localhost ~]# cd /etc/yum.repos.d/ [root@localhost yum.repos.d]# wget http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7/home:oojah:mqtt.repo --2017-01-26 14:05:40-- http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7/home:oojah:mqtt.repo Resolving download.opensuse.org (download.opensuse.org)... 195.135.221.134, 2001:67c:2178:8::13 Connecting to download.opensuse.org (download.opensuse.org)|195.135.221.134|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 272 [text/plain] Saving to: ‘home:oojah:mqtt.repo’ 100%[====================================================================================================================================================================>] 272 --.-K/s in 0s 2017-01-26 14:05:40 (20.8 MB/s) - ‘home:oojah:mqtt.repo’ saved [272/272] [root@localhost yum.repos.d]# yum install mosquitto Loaded plugins: fastestmirror ... Installed: mosquitto.x86_64 0:1.4.10-3.1 Dependency Installed: tcp_wrappers.x86_64 0:7.6-77.el7 uuid.x86_64 0:1.6.2-26.el7 Complete! [root@localhost yum.repos.d]# yum install mosquitto-clients Loaded plugins: fastestmirror ... 2/2 Installed: mosquitto-clients.x86_64 0:1.4.10-3.1 Dependency Installed: libmosquitto1.x86_64 0:1.4.10-3.1 Complete!
Copy the mosquitto.conf attached here (mosquitto.conf.centos) to /etc/mosquitto.
[admin@localhost SiteController]$ sudo cp /home/admin/mosquitto.conf /etc/mosquitto/mosquitto.conf
Install SiteController (output was truncated)
[root@localhost SiteController-install]$ ./setup.sh Checking python version ... Python 2.7.5 WARNING: at least Python version 2.7.9 is required for TLS support Hint: you could avoid this question by issuing the setup.sh script with environment variable IGNORE_PYTHON_TLS_ISSUE set to 1: IGNORE_PYTHON_TLS_ISSUE=1 ./setup.sh Press [a] to abort, any other key to continue! Checking mosquitto version ... 1.4.10 (build date 2016-12-05 08:26:01+0000) OS type is generic linux ... Allowed characters are upper and lower case ASCII [a-zA-Z], digits [0-9], dashes - and underlines _. Your entry: > CentOS_Test Thank you. Serial name set to CentOS_Test Changing serial id of SiteController from "" to "CentOS_Test". /opt/azeti/SiteController/config/SiteController.cfg has been modified. Hint: to start the SiteController directly after installation run the setup script with AUTOSTART_SITECONTROLLER set to 1: AUTOSTART_SITECONTROLLER=1 ./setup.sh Please check the configurations in "/opt/azeti/SiteController/config". Adapt them to your needs, then start the controller with the following line (copy the complete line, there are two quotes in it): "/opt/azeti/SiteController/run_SiteController.py" start [root@localhost SiteController-install]$