纯净Ubuntu系统上Nagios安装使用


一、安装环境

1.系统 Ubuntu-12.04.1-desktop-amd64.iso

2.虚拟机 VMware® Workstation 8.0.4 build-744019

3.远程工具 xshell4

二、安装步骤

1.apt-get install ssh 2.创建nagiios用户和用户组 root@ubuntu:~# useradd -s /sbin/nologin nagios
root@ubuntu:~# mkdir /usr/local/nagios
root@ubuntu:~# chown -R nagios.nagios /usr/local/nagios 3.开启sendmail服务 4.编译安装 nagios
cd /usr/local/src #切换到软件安装目录 #上传所有的安装文件
tar -zxvf nagios-3.2.0.tar.gz
cd nagios-3.2.0/
./configure --prefix=/usr/local/nagios
make all
make install #安装主程序和CGI、HTML文件
make install-init #在/etc/rc.d/init.d目录下创建nagios启动脚本
make install-commandmode #配置目录权限
make install-config #安装示例文件   #设置开机自启动 apt-get install chkconfig $sudo ln -s /usr/lib/insserv/insserv /sbin/insserv
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --list nagios 纯净Ubuntu系统上Nagios安装使用
5.安装nagios插件 tar -xzvf nagios-plugins-1.4.14.tar.gz
cd nagios-plugins-1.4.14/
./configure --prefix=/usr/local/nagios
make
make install
6.安装配置apache tar -xzvf httpd-2.0.63.tar.gz
cd httpd-2.0.63/
./configure --prefix=/usr/local/apache2
make
make install
7.安装php apt-get install libxml2 apt-get install libxml2-dev ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs
apt-get install libxml2-dev
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs
make
make install
  • 1
  • 2
  • 下一页

相关内容