centos6.2安装配置nagios server
1> 安装软件包yum installhttpd gcc glibc glibc-common phpgdgd-devel libpnglibmng libjpeg zlib -y
yum install openssl openssl-devel -y
2> 配置php环境
vim /etc/httpd/conf/httpd.conf
276 ServerName localhost:80
3> 创建nagios帐号
useraddnagios
groupadd nagcmd
usermod -G nagcmdnagios
usermod -G nagcmdapache
4> 安装nagios-3.4.1
a> 下载软件包,解压编译
wget ftp://192.168.68.254/monitor/nagios/nagios-3.4.1.tar.gz
tar -zxvf nagios-3.4.1.tar.gz
cd nagios
./configure --with-command-group=nagcmd
make all && make install
make install-init && make install-config && make install-commandmode && make install-webconf
b> 创建用户用于Nagios的WEB接口登录,重启httpd使配置生效
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd restart
5> 编译并安装Nagios插件
wget ftp://192.168.68.254/monitor/nagios/nagios-plugins-1.4.16.tar.gz
tar -zxvf nagios-plugins-1.4.16.tar.gz
cd nagios-plugins-1.4.16
./configure --with-nagios-user=nagios --with-nagios-group=nagcmd
make && make install
6> 验证nagios样例配置文件
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
7> 启动nagios服务
service nagios start
service httpd start
学习了,谢谢分享、、、 与时俱进,你我共赴高潮! 修养的艺术,其实就是说谎的艺术。 做爱做的事,交配交的人。 自从我变成了狗屎,就再也没有人踩在我头上了。 内练一口气,外练一口屁。
页:
[1]