1.1. Installation from sources

1.1.1. Pre-installation

1.1.1.1. Install develop tools

These tools are required in order to install Sanet from sources:

  • Pythohn 2.7
  • Python 2.7 Develop packages
  • Python setuptools
  • Python PIP
  • Subversion (SVN)

1.1.1.1.1. Debian 9

apt-get install python python-dev python-setuptools python-pip subversion

1.1.2. Main dependences

1.1.2.1. Postgres

Database manager PostgreSQL 9.2 (o above) is required.

To create and configure Sanet’s database read: Database configuration (PostgreSQL).

1.1.2.1.1. Debian 9

apt-get install postgresql
apt-get install python-psycopg2

1.1.2.2. Redis Server

Redis’s deamon and Redis python modules are the most important core software of Sanet3 and must be active and running.

For details about Redis’s configuration read: Configure Redis Server.

1.1.2.2.1. Debian 9

apt-get install redis-server
apt-get install python-redis

1.1.2.3. Apache 2.4

Sanet 3 web interfaces requires Apache2 and mod-wsgi.

1.1.2.3.1. Debian 9

Install:

apt-get install apache2
apt-get install libapache2-mod-wsgi

Enable all modules:

a2enmod ssl
a2enmod wsgi

1.1.3. Download sources

Download from the source and unpack them in the directory:

/usr/local/src/sanet3-ose

1.1.4. Installation procedure

1.1.4.1. sanet-libsnmp

1.1.4.1.1. Requirements

1.1.4.1.1.1. Netsnmp tools

Net-snmp’s shared libraries and python module are required.

1.1.4.1.1.1.1. Debian 9
apt-get install python-libsnmp

1.1.4.1.2. Install

cd /usr/local/src/sanet3-ose/sanet-libsnmp
python setup.py build
python setup.py install

1.1.4.2. sanet-common

1.1.4.2.1. Requirements

LDAP and SASL develop libraries are required in order to install dependences successfully.

apt-get install libldap2-dev
apt-get install libsasl2-dev

1.1.4.2.2. Install

cd /usr/local/src/sanet3-ose/sanet-common
python setup.py build
python setup.py install

1.1.4.3. sanet-poller

1.1.4.3.1. Requirements

1.1.4.3.1.1. pycurl

Pycurl package is required for some network monitoring functions.

1.1.4.3.1.1.1. Debian 9
apt-get install libssl-dev
apt-get install libcurl4-openssl-dev

1.1.4.3.2. Install

cd /usr/local/src/sanet3-ose/sanet-poller
python setup.py build
python setup.py install

1.1.4.4. entables

1.1.4.4.1. Install

cd /usr/local/src/sanet3-ose/entables
python setup.py build
python setup.py install

1.1.4.5. Sanet 3 Server

1.1.4.5.1. Requirements

1.1.4.5.1.1. RRDTools modules

RRDTool python packages are required. Binary shared libraries are required in order to install

1.1.4.5.1.1.1. Debian 9
apt-get install librrd-dev
1.1.4.5.1.2. Python Image library

Python PIL library is required with JPEG (libjpeg) and PNG (zlib) support.

1.1.4.5.1.2.1. Debian 9
apt-get install libjpeg-dev zlib1g-dev
1.1.4.5.1.3. Cairo and SVG modules
1.1.4.5.1.3.1. Debian 9
apt-get install python-cairo
apt-get install python-rsvg

1.1.4.5.2. Install and setup directories

cd /usr/local/src/sanet3-ose/sanet

make installdep

make install
make setup

1.1.4.6. Initialize your installation

Execute setup command:

sanet-manage sanetdata

This command will:

  • Setup database
  • Create first superuser
  • Create first tenant.

1.1.5. Run Sanet3

cd /usr/share/sanet

./scripts/server/sanet3.sh start

1.1.5.1. Setup WEB interface with Apache 2.4

1.1.5.1.1. Configure your virtual host

The following file contains a basic configuration for Apache 2.4

/usr/share/sanet/share/apache2/2.4/simple.conf

You can include this file directly inside your virtual host configuration.

For example:

<VirtualHost _default_:443>
        ...
        ...
        Include /usr/share/sanet/share/apache2/2.4/simple.conf
        ...
        ...
</VirtualHost>
1.1.5.1.1.1. Under Debian 9:

Edit the file:

/etc/apache2/site-available/default-ssl.conf

with something like this:

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ...
        ...
        ...
        ...
        ...
        ...
        Include /usr/share/sanet/share/apache2/2.4/simple.conf
        ...
        ...
        ...
        ...
        ...
        ...
</VirtualHost>
</IfModule>

Enable your site:

a2ensite default-ssl
apachectl restart