How To Install OpsView On Centos VirtualBox

21. June 2013 08:15 by Administrator in Centos, OpsView  //  Tags:   //   Comments (0)

As part of my "noob" Centos series this time I'm installing OpsView onto Centos 6.4 using VirtualBox and a Windows 7 host.

Prerequisites

How To Install OpsView

  1. Logon on to a new session (AS ROOT)
  2. Install rpmforge
    [root@localhost ~]# rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-1.el6.rf.x86_64.rpm
    Retrieving http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-1.el6.rf.x86_64.rpm
    Preparing... ########################################### [100%]
     package rpmforge-release-0.5.2-1.el6.rf.x86_64 is already installed
    [root@localhost ~]#
    
  3. Execute the following to create a new file
    [dan@localhost ~]$ nano /etc/yum.repos.d/opsview.repo
    
  4. Paste the following replacing [USERNAME] (don't use your email address) & [PASSWORD] with your OpsView account
    [opsview]
    name = Opsview 
    baseurl = https://[USERNAME]:[PASSWORD]@downloads.opsview.com/opsview-commercial/latest/yum/centos/6/$basearch
    enabled = 1
    protect = 0
    gpgcheck = 0
    

    TIP: In nano to save hit F2

  5. Install OpsView
    [root@localhost ~]# yum install opsview
    
  6. Start MySQL, tell it to autostart and change the root password:
    [root@localhost ~]# /etc/init.d/mysqld start
    Initializing MySQL database: Installing MySQL system tables...
    OK
    Filling help tables...
    OK
    
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
    
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
    
    Alternatively you can run:
    /usr/bin/mysql_secure_installation
    
    which will also give you the option of removing the test
    databases and anonymous user created by default. This is
    strongly recommended for production servers.
    
    See the manual for more instructions.
    
    You can start the MySQL daemon with:
    cd /usr ; /usr/bin/mysqld_safe &
    
    You can test the MySQL daemon with mysql-test-run.pl
    cd /usr/mysql-test ; perl mysql-test-run.pl
    
    Please report any problems with the /usr/bin/mysqlbug script!
    
     [ OK ]
    Starting mysqld: [ OK ]
    [root@localhost ~]# chkconfig --level 345 mysqld on
    [root@localhost ~]# mysqladmin -u root password password
    [root@localhost ~]#
    
  7. Ensure the environment is setup correctly
    [root@localhost ~]# su - nagios
    [nagios@localhost ~]$ echo "test -f /usr/local/nagios/bin/profile && . /usr/local/nagios/bin/profile" >> ~/.bash_profile
    
  8. Logon as the nagios user form now on and change the passwords:
    su - nagios
    vi /usr/local/nagios/etc/opsview.conf # change passwords in this file
    
  9. Load CPAN modules:
    [root@localhost bin]# sudo yum -y install perl-CPAN
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile
     * base: centos.hyve.com
     * extras: centos.hyve.com
     * rpmforge: archive.cs.uu.nl
     * updates: centosh2.centos.org
    Setting up Install Process
    
  10. Install CPAN (when prompted to auto configure type yes)
    sudo perl -MCPAN -e ‘install HTML::Template’
    
  11. Configure CPAN and download any further missing dependencies
    [root@localhost]# perl -MCPAN -e shell
    cpan shell -- CPAN exploration and modules installation (v1.76)
    ReadLine support enabled
    cpan> install Net::SNMP
    
    cpan> install Digest::SHA
    cpan> install URI::Escape
    cpan> install Bundle::LWP
    cpan> install MIME::Base64
    cpan> install Crypt:SSLeay
    cpan> install XML::NamespaceSupport
    cpan> install XML::SAX
  12. Install "Perl Time HiRes"
    [root@localhost bin]# yum install perl-Time-HiRes
    
  13. Install OpsView Databases:
    [root@localhost bin]# cd /usr/local/nagios/bin
    
    [root@localhost bin]# ./db_opsview db_install
    [root@localhost bin]# ./db_runtime db_install
    [root@localhost bin]# ./db_odw db_install
    [root@localhost bin]# ./db_dashboard db_install
    
  14. Generate an OpsView config file:
    [root@localhost]cd /usr/local/nagios/bin/
    [root@localhost]./rc.opsview gen_config
    
  15. Start the OpsView:
    [root@localhost bin]# /etc/init.d/opsview-web start
    Starting opsview-web:
    [root@localhost bin]# /etc/init.d/opsview-web start
    Starting opsview-web:
    INFO - Starting Opsview Web 4.3.2.12522
    done
    
  16. Disable SELinux (Security Enhanced Linux) by editing selinux and setting SELINUX=disabled
    [root@localhost ~]# vi /etc/sysconfig/selinux
    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    #enforcing - SELinux security policy is enforced.
    #permissive - SELinux prints warnings instead of enforcing.
    #disabled - SELinux is fully disabled.
    SELINUX=disabled # CHANGE!
    # SELINUXTYPE= type of policy in use. Possible values are:
    #targeted - Only targeted network daemons are protected.
    #strict - Full SELinux protection.
    SELINUXTYPE=targeted
    
  17. Disable the firewall
    [root@localhost bin]# /etc/rc.d/init.d/iptables stop
    iptables: Flushing firewall rules: [ OK ]
    iptables: Setting chains to policy ACCEPT: filter [ OK ]
    iptables: Unloading modules: [ OK ]
    You have new mail in /var/spool/mail/root
    [root@localhost bin]# chkconfig iptables off
    [root@localhost bin]# chkconfig ip6tables off
    [root@localhost bin]#
    
  18. You should now be able to navigate to http://IPADDRESS:3000
  19. d

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading