1.1. Installation from sources¶
Contenuti
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.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.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.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.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