jacky4955 发表于 2019-1-17 07:15:05

安装nagios 图形添加监控主机和服务的软件nconf

  1,安装如下软件包
  root@server~#yum install php-mysql mysql perl mysql-server perl-DBI perl-DBD-MySQL httpd

  2,检查/etc/php.ini下面三项的设置状态是否如下:
  short_open_tag = On
register_globals = Off
magic_quotes_gpc = Off
  3,启动apache,mysql
  # /etc/init.d/httpd start
# /etc/init.d/mysqld start
  4,解压文件到apache目录
  # tar -zxf nconf-1.2.6-0.tgz -C /var/www/html/
  5,创建nconf数据库及用户
  
root@localhost /var/www/html/nconf#mysql –uroot –p


[*]mysql> create database nconf;
[*]mysql> grant all privileges on nconf.* to nconf@localhost identified by '1q2w3e';
[*]mysql> flush privileges;                                                      



[*]# cd /var/www/html/nconf/
[*]
[*]# mysql -unconf -p nconf< INSTALL/create_database.sql
[*]Enter password:

  6,修改相关目录权限


[*]# chown -R apache.apache config/ temp/ static_cfg/ output/

  7.如果selinux 打开了,需要设置下安全上下文:


[*]chcon -R -t httpd_sys_content_t /var/www/html/nconf/
[*]
[*]chcon -t httpd_sys_script_exec_t /var/www/html/nconf/bin/nagios

  7,浏览器输入ip/conf进行安装,安装画面如下
http://itchen.blog.运维网.com/attachment/201004/3/343363_1270338806qpQN.png http://itchen.blog.运维网.com/attachment/201004/3/343363_12703388078WTY.png http://itchen.blog.运维网.com/attachment/201004/3/343363_1270338808TmDC.png http://itchen.blog.运维网.com/attachment/201004/3/343363_1270338809cUtD.png http://itchen.blog.运维网.com/attachment/201004/3/343363_1270338810i5Z4.png http://itchen.blog.运维网.com/attachment/201004/3/343363_12703388114nbS.png http://itchen.blog.运维网.com/attachment/201004/3/343363_1270338812B3mY.png
http://itchen.blog.运维网.com/attachment/201004/3/343363_1270338812YVH9.png
  # rm -rf INSTALL* UPDATE*
  # ln -s /usr/bin/nagios bin/nagios
  # chown -R apache.apachebin
http://itchen.blog.运维网.com/attachment/201004/3/343363_127033881375LW.png
http://itchen.blog.运维网.com/attachment/201004/3/343363_1270338814qB7r.png
http://itchen.blog.运维网.com/attachment/201004/3/343363_1270338816vexO.png



页: [1]
查看完整版本: 安装nagios 图形添加监控主机和服务的软件nconf