Welcome to docs.opsview.com

Differences

This shows you the differences between two versions of the page.

opsview4.6:scientific-installation [2014/09/09 12:19] (current)
Line 1: Line 1:
 +====== Installation Guide - RHEL Packages ======
 +<note>
 +This is an unsupported platform
 +</note>
 +
 +For supported Red Hat Enterprise Linux releases please refer to [[opsview4.6:platforms|platforms]].
 +
 +Please ensure perl 5.8.8-15.el5_2.1 or newer is installed to resolve a performance problem.
 +
 +===== Planning =====
 +
 +Planning your system should take into account how many hosts you plan on monitoring - large  numbers of hosts being monitored may best be served by using a distributed system - see our [[opsview4.6:designing-system|design notes]] for further information.
 +
 +==== Partitioning ====
 +
 +=== Opsview system ===
 +
 +One large / partition is fine, but we recommend a partitioning schema of at least /, /boot and /var
 +  * / - Sufficient space for Operating System and upgrades
 +  * /boot - Recommend separate boot partition of 256MB
 +  * /usr/local - Opsview software is installed here. Recommend > 10GB
 +
 +=== Database system ===
 +
 +The databases can either be stored on the master server or on a [[opsview4.6:dbs-on-diff-server|separate server]].  In either case,
 +  * /var - Opsview database and backups are stored here. Recommend > 100GB if using the [[opsview4.6:odw|data warehouse]] (50GB otherwise)
 +
 +==== Security settings ===
 +
 +Opsview is not currently compatible with Security-Enhanced Linux extensions, this must be disabled.  
 +
 +Opsview servers should be located in a secure area of your network.
 +
 +==== OS and dependency Installation ====
 +
 +When using yum repositories opsview pulls in all necessary dependencies - for this reason a minimal OS installation is sufficient, including any extra software you require to aid your own administration.
 +
 +There is also a dependency on the Java JDK (rather than the SDK). The rpm must be ''java'' - if you are using ''jdk'' from the java website, you should rebuild the package by following the instructions [[http://wiki.centos.org/HowTos/JavaOnCentOS#head-b5f4c1697244089114e60d127de69c2e1239ceb4|here]]. Java is required for the PDF reports that Opsview can produce.
 +
 +The following is also recommended from http://www.openfusion.com.au/labs/mod_auth_tkt/ to allow for use of the [[opsview4.6:webauthentication|single-sign]] on functionality
 +
 +  * mod_auth_tkt
 +
 +===== Preparation =====
 +
 +{{page>opsview:yum#yum_configuration}}
 +
 +{{page>opsview:yum#rhel_specific_notes}}
 +
 +===== Installation =====
 +
 +Once the repositories have been updated to include the Opsview yum repository, the latest release of Opsview can be installed by running the following command as root.
 +
 +  yum install opsview
 +
 +The Opsview agent (for use on clients that are to be monitored) is contained in the 'opsview-agent' package which is also provided in the same repositories.
 +
 +==== After the installation is complete ====
 +
 +After the Opsview packages have been installed, it is necessary to configure Opsview and its databases.
 +
 +1. Ensure the MySQL root password has been set to a known value:
 +
 +<code>
 +mysqladmin -u root password {password}
 +</code>
 +
 +If you get an error like:
 +<code>
 +error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
 +</code>
 +Then mysql has not been started. Start it with ''/etc/init.d/mysqld start'' and ensure it is set to start at boot time with ''chkconfig --level 345 mysqld on''.
 +
 +See the [[opsview4.6:prereqs#mysql|Mysql setup]] page for more general mysql settings.
 +
 +2. Ensure the nagios user's environment is set up correctly. Opsview will try to set the correct profile, but check that the following line is in the profile script, depending on your shell (e.g. ''.profile'' for bourne or korn shell, ''.bash_profile'' or ''.bashrc'' for bash shell):
 +
 +<code>
 +test -f /usr/local/nagios/bin/profile && . /usr/local/nagios/bin/profile
 +</code>
 +
 +3. The rest of the steps should be performed as the ''nagios'' user
 +<code>
 +su - nagios
 +</code>
 +
 +4. Edit the opsview configuration file and amend the password as you see fit to secure the system (those passwords that should be changed as they are set to **changeme** by default)
 +<code>
 +vi /usr/local/nagios/etc/opsview.conf   # change passwords in this file
 +</code>
 +
 +5. Set up the Opsview mysql database users with the necessary permissions
 +<code>
 +/usr/local/nagios/bin/db_mysql -u root -p{mysql root password}
 +</code>
 +
 +6. Install the required databases
 +<code>
 +/usr/local/nagios/bin/db_opsview db_install
 +/usr/local/nagios/bin/db_runtime db_install
 +/usr/local/nagios/bin/db_odw db_install
 +/usr/local/nagios/bin/db_reports db_install
 +</code>
 +
 +7. Generate all the necessary configuration files for Opsview and NagiosĀ® Core to run
 +<code>
 +/usr/local/nagios/bin/rc.opsview gen_config
 +</code>
 +
 +8. You can now start up the web application server:
 +<code>
 +/etc/init.d/opsview-web start
 +</code>
 +
 +The Opsview server is now listening on port 3000, i.e. http://your.server:3000/
 +
 +===== Optional Further Configuration =====
 +
 +==== Using Apache as a proxy server ====
 +
 +The performance of Opsview will be significantly improved by using Apache at the front end.  All the following commands should be run as ''root''.
 +
 +1. Edit the apache configuration files and enable proxy_html
 +<code>
 +cd /etc/httpd/conf
 +vi httpd.conf
 +# Ensure the line "LoadModule proxy_http_module modules/mod_proxy_http.so" is uncommented
 +</code>
 +
 +2. Copy in the example Apache configuration file and edit to suite your needs
 +<code>
 +cd /etc/httpd/conf.d
 +cp /usr/local/nagios/installer/apache_proxy.conf opsview.conf
 +vi opsview.conf
 +</code>
 +
 +You may need to comment out the DocumentRoot variable in /etc/httpd/conf/httpd.conf.
 +
 +3. Amend the apache web server user group membership to include ''nagcmd'' group
 +<code>
 +usermod -G nagcmd apache
 +</code>
 +Check to ensure the ''apache'' user is correct for your web software.
 +
 +If you use a centralised user management system, you may need to amend ''/etc/group'' manually. To test that the permissions are set correctly, run ''id apache'' and look for the ''nagcmd'' group.
 +
 +4. Restart Apache
 +<code>
 +/etc/init.d/httpd restart
 +</code>
 +
 +You can now access Opsview at http://your.server/
 +
 +==== Enabling SNMP Traps ====
 +
 +In order to get Opsview to process SNMP Traps, you will need to configure your system to pass received SNMP traps into Opsview.  The following guide shows how to do this:
 +
 +[[opsview4.6:snmptrapsetup|SNMP Trap Processing Setup]]
 +
 +
 +===== Upgrading Opsview =====
 +
 +If the yum repositories have been used, opsview can be upgraded by following command as root:
 +
 +  yum update
 +
 +[[backups|Backups]] should be taken before upgrading Opsview.
 +
 +====== Logging in ======
 +
 +Once Opsview has been installed, a single administrative user will have been created. The credentials for this user are:
 +
 +  username: admin
 +  password: initial
 +
 +You should change this password to prevent unauthorised access to Opsview - this can be done from the 'Contacts' menu under 'Configuration' in the left navigation bar.
Navigation
Print/export
Toolbox