首页 > 代码库 > centos6.5安装nagios

centos6.5安装nagios

  1. 安装依赖包
    yum install httpd php gcc glibc glibc-common gd gd-devel

     

  2. 创建账号信息
    useradd -s /sbin/nologin nagiospasswd nagiosgroupadd nagcmdusermod -a -G nagcmd nagiosusermod -a -G nagcmd apache

     

  3. 编译软件
    ./configure --with-command-group=nagcmdmake allmake installmake install-initmake install-configmake install-commandmode
    make install-webconf
    htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
  4. 编译安装插件
    ./configure --with-nagios-user=nagios --with-nagios-group=nagiosmakemake install

     chown -R nagios.nagcmd /usr/local/nagios

  5. 设置开机启动
    chkconfig --add nagioschkconfig --add httpdchkconfig nagios onchkconfig httpd onservice httpd startservice nagios start
    http://localhost/nagios/

centos6.5安装nagios