系统环境
1
2
|
[root@nagios_server ~]
# uname -a
Linux nagios_server 2.6.32-504.30.3.el6.x86_64
#1 SMP Wed Jul 15 10:13:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
|
安装基础环境
1
|
[root@nagios_server ~]
# yum -y install httpd gcc glibc glibc-common gd gd-devel php php-mysql mysql mysql-devel mysql-server ntp
|
添加nagios运行的用户名,用户组,把http运行用户apache添加到nagios组
1
2
3
|
[root@nagios_server ~]
# groupadd nagios
[root@nagios_server ~]
# useradd -g nagios nagios
[root@nagios_server ~]
# usermod -a -G nagios apache
|
下载nagios
1
2
3
4
5
6
7
8
9
10
11
12
|
[root@nagios_server src]
# wget
[root@localhost src]
# tar -zxvf nagios-3.3.1.tar.gz
[root@localhost src]
# cd nagios
[root@localhost nagios]
# ./configure --prefix=/usr/local/nagios --sysconfdir=/etc/nagios --enable-event-broker
[root@localhost nagios]
# make all
[root@localhost nagios]
# make install
[root@localhost nagios]
# make install-init
[root@localhost nagios]
# make install-commandmode
[root@localhost nagios]
# make install-config
[root@localhost nagios]
# make install-webconf
[root@localhost nagios]
# chkconfig --add nagios
[root@localhost nagios]
# chkconfig --level 35 nagios on
|
本文转自 yawei555 51CTO博客,原文链接:http://blog.51cto.com/huwei555/1680639,如需转载请自行联系原作者