Sunday 22 December 2013

HOW TO INSTALL OPSVIEW ON CENTOS 5.5



HOW TO INSTALL OPSVIEW 3.0 on CENTOS 5.5




1.  INSTALLATION:

1.  Register for an account and make a note of the username and password as these may be required later in the process.
2. Establish a terminal session to your Centos server, do not log in as root at this moment.
3. Download anRPMforge” package applicable to your distribution from the link here. Once downloaded, install via “rpm -ivh rpmfor….rpm”. Create repo file: “nano /etc/yum.repos.d/opsview.repo” and add the following:

[opsview]
name = Opsview
enabled = 1
protect = 0
gpgcheck = 0
Where REPOSITORY_KEY is the key emailed to you,  and <OS> is either 5 or 6 depending on your distribution. For reference, an example key is: 5bbd5667b498d81af9c2311d871858b26fe0024b
Use command to install opsview
yum install opsview
Or
Download the Below RPM from opsview repository & install 
http://www.opsview.com/technology/downloads/   (download rpm from this link after register on the site and download required rpm)
User below command to install rpm
rpm –ivh  lua-rrdtool-1.4.3-1.el5.rf.i386.rpm
 lua-rrdtool-1.4.3-1.el5.rf.i386.rpm
 mod_auth_tkt_opsview-2.0.5rc3-1.i386.rpm
 opsview-3.20130903.0.13498-1.ct5.i386.rpm
opsview-agent-4.4.1.345-1.ct5.i386.rpm
 opsview-base-4.4.1.345-1.ct5.i386.rpm
opsview-compatibility-check-3.20130903.0.13498-1.ct5.noarch.rpm
 opsview-core-3.20130903.0.13498-1.ct5.i386.rpm
 opsview-perl-4.4.0.792-1.ct5.i386.rpm
 opsview-slave-3.20130903.0.13498-1.ct5.i386.rpm
 opsview-web-3.20130903.0.13498-1.ct5.i386.rpm
 perl-5.8.8-40.el5_9.i386.rpm
 perl-rrdtool-1.4.4-1.el5.rf.i386.rpm
 rrdtool-1.2.29-1.el5.rf.ppc.rpm
 rrdtool-1.4.7-1.el5.rf.i386.rpm

4. Install thee mysql server
yum Install mysql*
5. Next, start MySQL and set the root password via
 “/etc/init.d/mysqld start” and “mysqladmin -u root -p password opsview”.
6. To start MySQL at boot, run the command “chkconfig --level 345 mysqld on
7. Now, we will drop into the user “nagios” and set the user environment correctly:
su – nagios

test -f /usr/local/nagios/bin/profile && . /usr/local/nagios/bin/profile

exit
8. Next we need to edit the opsview.conf file, “vi/usr/local/nagios/etc/opsview.conf”. In my opsview.conf for example, I changed all thechangeme” values to “opsview”, as that was what I set my MySQL root password to.
# This file overrides variables from opsview.defaults
# This file will not be overwritten on upgrades
#
$dbuser = “root”
$dbpasswd = "opsview";    
$runtime_dbpassword = “root”
$runtime_dbpasswd = "opsview";

1;
:wq (Save & exit)

9.    change mysql root password
       Mysql –u root
mysql > show databases;   (check database which are install)
mysql> user mysql;
mysql> UPDATE user SET Password=PASSWORD('opsview') WHERE User='root';
10. Generate the grants to my sql user.
mysql> GRANT ALL ON *.* TO 'root'@'localhost' ;
11. Install the required databases
/usr/local/nagios/bin/db_opsview db_install
/usr/local/nagios/bin/db_runtime db_install
12. Generate all the necessary configuration files:
/usr/local/nagios/bin/rc.opsview gen_config

OR
/etc/init.d/opsview gen_config

You can now start up the web application server:

/etc/init.d/opsview-web start

The Opsview server is now listening on port 3000, i.e. http://localhost:3000/
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
cd /etc/httpd/conf
vi httpd.conf
Ensure the line "LoadModule proxy_http_module modules/mod_proxy_http.so" is uncommented
2. 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
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
usermod -G nagcmd apache
Check to ensure the apache user is correct for your web software.
If you use a centralized 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 http://localhost/
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 unauthorized access to Opsview - this can be done from 'Administrator' link in the top right of the page.
4. Troubleshooting
If you try to connect to:http://your.server/you may be greeted with a 503 server temporarily unavailable error. Go to the command line and enter:
setsebool -P httpd_can_network_connect=1

No comments:

Post a Comment

What is RAID ?

  What is RAID?   RAID Levels - How the drives are organized   How to determine your RAID level  RAID 0 - Disk Striping   RAID 1 - Disk Mirr...

most viewed