日期: 2013-09-24
分类: ['linux-admin']
Install nagios in Gentoo/CentOS
Gentoo
# emerge nagios
Option: recompile apache for php support
add use flag "apache2" to /etc/portage/make.conf
# emerge --ask --changed-use --deep @world
Copy following content to /etc/apache2/vhosts.d/
ScriptAlias /nagios/cgi-bin "/usr/lib64/nagios/cgi-bin"
SSLRequireSSL
1 2 3 4 |
|
Order deny,allow
Deny from all
Allow from 127.0.0.1
1 2 3 4 |
|
Alias /nagios "/usr/share/nagios/htdocs"
SSLRequireSSL
1 2 3 4 |
|
Order deny,allow
Deny from all
Allow from 127.0.0.1
1 2 3 4 |
|
Create password for nagiosadmin
# htpasswd2 -c /etc/nagios/auth.users nagiosadmin
Add NAGIOS to apache config
/etc/conf.d/apache
APACHE2_OPTS="... -D NAGIOS -D PHP5"
Add user nagios to apache group
# usermod -a -G nagios apache
Start service
# rc-service nagios restart
rc-service apache2 restart
CentOS
# yum install "nagios*"
htpasswd -c /etc/nagios/passwd admin
chkconfig nagios on
chkconfig httpd on
service nagios start
service httpd start
Add routers/hosts, add service, add hooks
Intergrate with oVirt
using Foreman
Install
USE
Intergrate with oVirt
TBD