nagios与centreon通过yum安装

nagios core的安装配置请移步
http://luozhaoyu.iteye.com/blog/2017262
nagios安装最麻烦的就是各种软件包了这里记一下:
引用
yum install httpd php gcc glibc glibc-common gd gd-devel


nagios的可视化界面工具 centreon的软件依赖:
其中最最麻烦的就是rrdtool for perl了!
用cpan找不到perl rrdtool
而且官方yum也找不到它
最后终于找到一个比较猛地源:
引用
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1


接下来就开始yum了

引用
yum install perl php php-mbstring php-pear php-gd php-mysql php-mysql php-soap php-snmp php-ldap mysql mysql-server php-xml perl-rrdtool ndoutils
yum install php-pear-DB php-pear-Date php-pear-Auth-SASL php-pear-Net-Socket php-pear-MDB2

引用

pear install -o DB DB_DataObject DB_DataObject_FormBuilder Validate MDB2 Date HTML_Common HTML_QuickForm HTML_QuickForm_advmultiselect HTML_Table Archive_Tar Auth_SASL Console_Getopt Net_Socket Net_Traceroute Net_Ping XML_RPC SOAP
pear install -o Net_SMTP Log


注:
HTML_Common2
HTML_QuickForm2
是最新版本,以前的版本已经deprecated

centreon网页配置
如果碰到permission denied的话,试着把selinux关了

centreon安装失败后的卸载
# rm -rf /usr/local/centreon

# rm -rf /etc/centreon

# rm -rf /etc/httpd/conf.d/centreon.conf

# rm -rf /var/lib/centreon

# ./install -i

另外一个卸载脚本
echo 'find / -name centreon -type d | grep -v mysql | grep -v samba | xargs rm -rf...'
findall centreon -type d | grep -v mysql | grep -v samba | xargs rm -rf
echo 'locate centreon | grep -v mysql | grep -v samba | xargs rm -rf...'
locate centreon | grep -v mysql | grep -v samba | xargs rm -rf
updatedb
echo "locate centreon's result:"
locate centreon



Nagios的配置
nagios yum安装完后进行的配置有
  • 防火墙放行
  • 关闭selinux
  • useradd nagios
  • 设置页面访问账户htpasswd -c /etc/nagios/htpasswd.users nagiosadmin

进入localhost/nagios即可查看安装后结果

你可能感兴趣的:(nagios,centreon)