Opsview Core - Centos Installation Opsview Documentation
Opsview Core - Centos Installation Opsview Documentation
For supported CentOS Linux releases, see our official platforms list
Please ensure perl 5.8.8-15.el5_2.1 or newer is installed to resolve a performance problem
Planning
See our design notes for further information on planning for separate database servers, disk partitioning and security.
Preparation
Prerequisites
See the installation prerequisites information to setup users, groups and MySQL.
SELinux
Opsview is not currently compatible with Security-Enhanced Linux extensions, this must be disabled.
RPMForge repositories
Set up RPMForge [http://rpmrepo.org/RPMforge] to install any necessary dependencies by downloading and installing the
RPMForge release package.
First, ensure that you are working as the root user. If not, enter the following into the command line:
sudo su - root
{enter root password}
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.<OS>.rf.<ARCH>.rpm
rpm -Uhv rpmforge-release-0.3.6-1.<OS>.rf.<ARCH>.rpm
http://docs.opsview.com/doku.php?id=opsview-core:centos-installation Página 1 de 5
opsview-core:centos-installation - Opsview Documentation 23/09/15 11:03
i386
x86_64
If the site specified in the above wget is not available, there is a list of alternative sites to obtain the package on the
RPMForge web site [https://rpmrepo.org/RPMforge/Mirrors].
Opsview repositories
Then, use your favourite editor to create the file /etc/yum.repos.d/opsview.repo containing the following lines:
[opsview]
name = Opsview
baseurl = http://downloads.opsview.com/opsview-core/latest/yum/centos/<OS>/$basearch
enabled = 1
protect = 0
gpgcheck = 0
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.
Note: if rrdtool is > 1.3, then you will also need to install
dejavu-lgc-fonts.
1. Ensure the MySQL root password has been set to a known value:
/etc/init.d/mysqld start
http://docs.opsview.com/doku.php?id=opsview-core:centos-installation Página 2 de 5
opsview-core:centos-installation - Opsview Documentation 23/09/15 11:03
See the 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):
su - nagios
echo "test -f /usr/local/nagios/bin/profile && . /usr/local/nagios/bin/profile" >> ~/.bash_profile
3. The rest of the steps should be performed as the nagios user. Log out and back in again to ensure the profile is
setup:
exit
su - nagios
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 set to changeme by default)
Note: Do not use any funny shell characters in the password, such as $ or !.
5. Set up the Opsview mysql database users with the necessary permissions
/usr/local/nagios/bin/db_opsview db_install
/usr/local/nagios/bin/db_runtime db_install
/usr/local/nagios/bin/rc.opsview gen_config
/etc/init.d/opsview-web start
iptables maybe running which may disable this port. Configure iptables to allow incoming requests to port 3000 for the
duration of this test
For Opsview versions before 20131125, you should secure your instance of Opsview Web, by changing the authtkt
secret to be unique to this instance. In /usr/local/nagios/etc/opsview.conf, add the following and change the
secret value to be a unique string:
http://docs.opsview.com/doku.php?id=opsview-core:centos-installation Página 3 de 5
opsview-core:centos-installation - Opsview Documentation 23/09/15 11:03
$authtkt_shared_secret = "shared-secret-please-change";
Restart Opsview Web for this value to take effect: /etc/init.d/opsview-web restart.
cd /etc/httpd/conf
vi httpd.conf
<VirtualHost *>
Include /usr/local/opsview-web/etc/apache_proxy.conf
</VirtualHost>
For previous versions, copy in the example Apache configuration file and edit to suite your needs:
cd /etc/httpd/conf.d
cp /usr/local/nagios/installer/apache_proxy.conf opsview.conf
vi opsview.conf
Edit the Apache configuration file so that the same shared secret is used:
TKTAuthSecret "shared-secret-please-change"
3. Amend the apache web server user group membership to include nagcmd group
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
/etc/init.d/httpd restart
You can now access Opsview at your server url, for example: http://opsview.example.com/ [http://opsview.example.com/]
http://docs.opsview.com/doku.php?id=opsview-core:centos-installation Página 4 de 5
opsview-core:centos-installation - Opsview Documentation 23/09/15 11:03
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 'Administrator'
link in the top right of the page.
Troubleshooting
Automatic dependencies
Yum should automatically work out all dependencies when installing Opsview, but in the event that installing the
opsview package does not also bring in opsview-base, opsview-perl, etc then follow these steps
Running yum deplist opsview should now show the correct dependencies and allow opsview to be installed correctly.
http://docs.opsview.com/doku.php?id=opsview-core:centos-installation Página 5 de 5