一、安装前的准备
1.下载到核心源码:
2.下载插件包:
http://nagios-plugins.org/download/nagios-plugins-2.0.tar.gz
3. nagios服务器端软件和客户端插件
4.安装PHP
5. 安装apache
-------------------------------------------------------------------------------------------------------------
二、开始安装
1.源码安装前需要先确定 已经安装 apache,gcc,GD库和开发库
[root@bairui212 Packages] yum install -y gcc glibc glibc-common gd gd-devel xinetd openssl-devel
[root@bairui212 Packages]# rpm -qa gcc glibc glibc-common gd gd-devel xinetd openssl-devel
mount -o loop /dev/cdrom /mnt 挂载磁盘
glibc-2.12-1.47.el6.x86_64
gcc-4.4.6-3.el6.x86_64
gd-2.0.35-10.el6.x86_64
openssl-devel-1.0.0-20.el6.x86_64
xinetd-2.3.14-33.el6.x86_64
glibc-common-2.12-1.47.el6.x86_64
需要的包已经有了
------------------------------------------------------------------------------------------------------------
2. 配置YUM
yum
cd /etc/yum.repos.d 有的是这个文件 rhel-debuginfo.repo
[root@localhost yum.repos.d]# vi rhel5.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
cd /etc/yum.repos.d 有的是这个文件 rhel-debuginfo.repo
[root@localhost yum.repos.d]# vi rhel5.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
--------------------------------------------------------------------------------------------------------
3 进行selinux设置,或者关闭selinux
查看SELinux状态:
(1)/usr/s