Virtual server monitor:Installation/Mandriva 2006

From Revolution Linux OpenSource projects

Jump to: navigation, search

This method might work with other RPM-based distributions, but is untested (you might need to install from the source instead).

Backend

On the vserver host(s), do :

1- Add the following urpmi source :

urpmi.addmedia revolutionlinux http://downloads.revolutionlinux.com/OpenRevolution/RPMS/Mandriva/2006/i586/ with hdlist.cz

2- Install the backend :

urpmi vsmon-backend

3- Edit /etc/vsmon/backend/settings.py and change ALLOWED_IP_LIST to allow only the hosts/vservers that should connect to the backend.

4- Start the backend :

/etc/init.d/vsmon-backend start

Frontend

It is recommended to install the frontend in a separate vserver.

1- Add the following urpmi source (the same as the backend) :

urpmi.addmedia revolutionlinux http://downloads.revolutionlinux.com/OpenRevolution/RPMS/Mandriva/2006/i586/ with hdlist.cz

2- Install the frontend :

urpmi vsmon-frontend

3- Install MySQL and it's python bindings (MySQL-python). Django also support PostgreSQL but Mandriva does not ship with the required python bindings (psycopg).

urpmi MySQL MySQL-python
mysql_install_db 
/etc/init.d/mysqld start 
mysql_secure_installation

4- Create a database.

mysql -p
(enter password)
mysql> CREATE DATABASE vsmon;
mysql> exit

5- Edit /usr/lib/python2.4/site-packages/vsmon/frontend/settings.py

DATABASE_ENGINE = 'mysql' 
DATABASE_NAME = 'vsmon'   
DATABASE_USER = 'root'    
DATABASE_PASSWORD = '(password)'
DATABASE_HOST =      
DATABASE_PORT =      

And, toward the end of the file :

ENABLE_MULTI_THREADED_REQUESTS = False

(Multithread support with mod_python only works with Python 2.4.2 and superior, and Mandriva 2006 comes with Python 2.4.1.)

6- Initialise the database :

cd /usr/lib/python2.4/site-packages/vsmon/frontend
python manage.py syncdb

7- Create an admin user as requested.

8- Install Apache (or any other web server supported by Django)

urpmi apache-mpm-prefork apache-mod_python

8- Start apache :

/etc/init.d/httpd start

9- vsmon should be available at http://hostname/ (where hostname is the name of the vserver vsmon was installed in).

10- Click on Manage host list to add the hosts the backend is installed on.

Nagios plugin

urpmi vsmon-nagios-plugin

See Virtual server monitor:Nagios plugin for more details.

Personal tools