########################################################################
Installation from sources
########################################################################
.. contents:: Contenuti
:depth: 2
==========================================================================================
Pre-installation
==========================================================================================
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)
Debian 9
~~~~~~~~~~~
::
apt-get install python python-dev python-setuptools python-pip subversion
==========================================================================================
Main dependences
==========================================================================================
.. _install-postgres:
Postgres
--------------------------------------------
Database manager PostgreSQL 9.2 (o above) is required.
To create and configure Sanet's database read: :ref:`configuration-postgres`.
Debian 9
~~~~~~~~~~~
::
apt-get install postgresql
apt-get install python-psycopg2
.. _install-redis:
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: :ref:`configuration-redis`.
Debian 9
~~~~~~~~~~~~
::
apt-get install redis-server
apt-get install python-redis
.. _install-apache2.4:
Apache 2.4
--------------------
Sanet 3 web interfaces requires Apache2 and mod-wsgi.
Debian 9
~~~~~~~~~~~~~~
Install:
::
apt-get install apache2
apt-get install libapache2-mod-wsgi
Enable all modules:
::
a2enmod ssl
a2enmod wsgi
==========================================================================================
Download sources
==========================================================================================
Download from the source and unpack them in the directory:
::
/usr/local/src/sanet3-ose
..
::
cd /usr/local/src/
svn checkout https://develtrac.labs.it/svn/sanet3-ose/trunk sanet3-ose
==========================================================================================
Installation procedure
==========================================================================================
.. _install-sanet-libsnmp:
sanet-libsnmp
----------------------------------------------
Requirements
~~~~~~~~~~~~
Netsnmp tools
+++++++++++++
Net-snmp's shared libraries and python module are required.
Debian 9
""""""""""
::
apt-get install python-libsnmp
.. importat: It's strongly recommended to install command line tools too:
::
apt-get install snmp
Install
~~~~~~~~~~~~
::
cd /usr/local/src/sanet3-ose/sanet-libsnmp
python setup.py build
python setup.py install
.. _install-sanet-common:
sanet-common
----------------------------------------------
Requirements
~~~~~~~~~~~~
LDAP and SASL develop libraries are required in order to install dependences successfully.
Debian 9
""""""""""
::
apt-get install libldap2-dev
apt-get install libsasl2-dev
Install
~~~~~~~~~~~~~
::
cd /usr/local/src/sanet3-ose/sanet-common
python setup.py build
python setup.py install
.. _install-sanet-poller:
sanet-poller
-------------------------------------------------
Requirements
~~~~~~~~~~~~
pycurl
+++++++++++++
Pycurl package is required for some network monitoring functions.
Debian 9
""""""""""
::
apt-get install libssl-dev
apt-get install libcurl4-openssl-dev
Install
~~~~~~~~~~~~~~
::
cd /usr/local/src/sanet3-ose/sanet-poller
python setup.py build
python setup.py install
.. _install-sanet-entables:
entables
--------------------------------------------------
Install
~~~~~~~~~~~~
::
cd /usr/local/src/sanet3-ose/entables
python setup.py build
python setup.py install
Sanet 3 Server
------------------------------------------------------------------------
Requirements
~~~~~~~~~~~~
RRDTools modules
++++++++++++++++++++
RRDTool python packages are required. Binary shared libraries are required in order to install
Debian 9
""""""""""
::
apt-get install librrd-dev
Python Image library
+++++++++++++++++++++
Python PIL library is required with JPEG (libjpeg) and PNG (zlib) support.
Debian 9
""""""""""
::
apt-get install libjpeg-dev zlib1g-dev
Cairo and SVG modules
+++++++++++++++++++++
Debian 9
""""""""""
::
apt-get install python-cairo
apt-get install python-rsvg
Install and setup directories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
cd /usr/local/src/sanet3-ose/sanet
make installdep
make install
make setup
Initialize your installation
--------------------------------
Execute setup command:
::
sanet-manage sanetdata
This command will:
* Setup database
* Create first superuser
* Create first *tenant*.
===========================================================================
Run Sanet3
===========================================================================
::
cd /usr/share/sanet
./scripts/server/sanet3.sh start
Setup WEB interface with Apache 2.4
------------------------------------------------------------------------
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:
::
...
...
Include /usr/share/sanet/share/apache2/2.4/simple.conf
...
...
Under Debian 9:
+++++++++++++++++
Edit the file:
::
/etc/apache2/site-available/default-ssl.conf
with something like this:
::
ServerAdmin webmaster@localhost
DocumentRoot /var/www
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
...
...
...
...
...
...
Include /usr/share/sanet/share/apache2/2.4/simple.conf
...
...
...
...
...
...
Enable your site:
::
a2ensite default-ssl
apachectl restart