Ubuntu下icinga安装步骤:
http://sourceforge.net/projects/icinga-cn/files/icinga-cn/icinga-cn-1.11/icinga-cn-1.11.5.tar.gz/download
http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
$ sudo useradd icinga
$ sudo apt-get install libdbi-dev
$ sudo apt-get install apache2
$ tar zxfv icinga-cn-1.11.5.tar.gz
$ cd icinga-cn-1.11.5
$ ./configure --prefix=/usr/local/icinga
$ make all
$ sudo make install
$ sudo make install-init
$ sudo make install-commandmode
$ sudo make install-idoutils
$ sudo make install-config
$ sudo make install-webconf
$ sudo make install-webconf-auth
$ cd
$ tar zxfv nagios-plugins-2.0.3.tar.gz
$ cd nagios-plugins-2.0.3
$ ./configure --prefix=/usr/local/icinga
$ make
$ sudo make install
检查配置是否有误
$ sudo /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
启动icinga:
$ sudo service icinga start
开机启动icinga:
$ sudo vi /etc/rc.local (在exit 0前一行)
sudo service icinga start
:wq
icinga主要文件:/usr/local/icinga/etc/icinga.cfg及/objects下文件
修改httpd的配置文件/etc/apache2/site-available/default (在中间添加)
ScriptAlias /icinga/cgi-bin "/usr/local/icinga/sbin"
<Directory "/usr/local/icinga/sbin">
AuthType Basic
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Icinga Access"
AuthUserFile /usr/local/icinga/etc/htpasswd.users
Require valid-user
</Directory>
:wq
$ sudo ln -s /usr/local/icinga/share /var/www/icinga
$ sudo htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
输入密码(如:123456)
后面修改密码命令:
$ sudo htpasswd /usr/local/icinga/etc/htpasswd.users icingaadmin
重启apache2:
$ sudo service apache2 restart
访问:http://ip/icinga (输入用户名icinga及密码)
本文转自linux博客51CTO博客,原文链接http://blog.51cto.com/yangzhiming/1536493如需转载请自行联系原作者
yangzhimingg