Chinaunix首页 | 论坛 | 博客
  • 博客访问: 811737
  • 博文数量: 188
  • 博客积分: 4433
  • 博客等级: 上校
  • 技术积分: 1905
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-14 07:14
个人简介

linux

文章分类

全部博文(188)

文章存档

2016年(6)

2015年(22)

2014年(18)

2013年(5)

2012年(125)

2011年(10)

2010年(2)

分类: LINUX

2012-02-10 14:48:01

opsview是个基于nagios开源的分布式监控软件。以下是以前装的时候写的一个安装文档。略显粗糙。Install Opsview SOP
Description: This document describes how to install Opsview in nagios servers
 
Process:   
I. Disable SELinux
a) Edit /etc/selinux/config and restart system:
# 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
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
# SELINUXTYPE=targeted
b) Reboot the server

II. install jdk 1.6(This can be skipped)
a) Pre-install (This may be skipped)
it will be assumed that the contents of ~/.rpmmacros includes:
%_topdir /home//rpmbuild
%_tmppath %{_topdir}/tmp
Remember to create the ~/rpmbuild/ tree if it has not been created yet, but be aware that your directory is not required to be named "rpmbuild" as in this example (consult your ~/.rpmmacros to know):
$ mkdir -p ~/rpmbuild/{SOURCES,SRPMS,SPECS,RPMS,tmp,BUILD}
Before building, the build environment needs to be complete. Some needed packages are:
# yum install -y rpm-build gcc gcc-c++ redhat-rpm-config
b) Install SUN  jdk 1.6
 # yum install jpackage-utils
 # bash jdk-6.rpm.bin
 # vi /etc/profile
#set java environment
JAVA_HOME=/usr/java/jdk1.6.0_29
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
 #source /etc/profile
 #java -version
 
 

II. Install Prerequisites
a) Add nagios user and group
In sdc nagios has been added into ldap
So we only need to create group nagcmd
#groupadd –g 8000 nagios
# groupadd -g 8100 nagcmd
#useradd –g nagios –G nagcmd –u 8000 nagios
b) Install lampp
  Cd /opt
  tar -zxvf /root/user/opsview/xampp-linux-1.7.7.tar.gz
c) Add innodb in mysql
vi /opt/lampp/etc/my.cnf
innodb_file_per_table=1
innodb_flush_log_at_trx_commit=2
innodb_buffer_pool_size=1G
#/opt/lampp/lampp restart
III install opsview

http://docs.opsview.com/doku.php?id=developer:developmentserver
PRE:goto
And download files of related OS and create local repository
a) Tar –zxvf opsview_3.13.tar.gz
b) createrepo -g /root/user/opsview/opsview/repodata/repomd.xml /root/user/opsview/opsview/ (maybe need yum install createrepo first)
c) vi /etc/yum.repos.d/opsview.repo
[opsview]
name=Opsview
baseurl=file:///root/user/opsview/opsview
gpgcheck=0
d) install below packages(can skip)
alsa-lib
apr
apr-util
chkfontpath
gd
giflib
gpg-pubkey
gpg-pubkey-e8562897
httpd
java
jpackage-utils
libfontenc
libFS
libmcrypt
libtool-ltdl
libXfont
libXpm
libXtst
lm_sensors
mrtg
mysql
mysql-server
net-snmp
net-snmp-libs
net-snmp-perl
net-snmp-utils
opsview-base
opsview-core
opsview-perl
opsview-reports
opsview-web
perl-DBD-MySQL
perl-DBI
perl-IO-Socket-INET6
perl-Socket6
pkgconfig
postgresql-libs
rpmforge-release
ruby
ruby-libs
ttmkfdir
xorg-x11-fonts-Type1
xorg-x11-font-utils
xorg-x11-xfs
Then install below rpms
      perl-rrdtool (located in the rrdtool directory)
      rrdtool
      tslib
      directfb
e) yum install opsview
f) set mysql password
/opt/lampp/bin/mysqladmin -u root password welcome1
g) change opsview password
vi /usr/local/nagios/etc/opsview.conf
change “changeme” to welcome1
h) set up opsview mysql database permission
ln -s /opt/lampp/var/mysql/mysql.sock /var/lib/mysql/mysql.sock (if use lampp)
/usr/local/nagios/bin/db_mysql -u root –p welcome1
i) install db
/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(not found) only in enterprise edition
j) generate config files
su - nagios
/usr/local/nagios/bin/rc.opsview gen_config
k) start service
/etc/init.d/opsview-web start
You can visit now.
  
IV install apache proxy
a) cd /etc/httpd/conf
vi httpd.conf
Ensure the line "LoadModule proxy_http_module modules/mod_proxy_http.so" is uncommented
b) 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.
c) usermod -G nagcmd apache
d) service httpd start
V install agent
a) cp rpm package
cp -r //abc/root/user/opsview-agent //def/root/user
b) run the install script
install.sh
 
阅读(1717) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~