Nagios是一款开源的免费网络监视工具,下面在CentOS7.4下安装Nagios XI 5.4.11:
1.下载Nagios XI 5.4.11:
https://assets.nagios.com/downloads/nagiosxi/5/xi-5.4.11.tar.gz
2.解压:
tar xf xi-5.4.11.tar.gz
cd nagiosxi
3.安装:
注意安装的时候最好是刚刚装好minimal的CentOS系统,或者是没有GUI的图形界面系统,但没有安装其他的软件包,可能造成包的安装冲突失败. 保证80端口没有被占用,Nagios要用80端口给web访问。
./fullinstall
等半个小时左右,安装完成显示:
RESETTING PERMS
/bin/chown: 无法访问"/usr/local/nagiosxi/nom/checkpoints/nagiosxi": 没有那个文件或目录 URL: http://localhost/nagiosxi/includes/components/ccm/ CMDLINE /usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=n@gweb' -O nagiosql.login--2017-11-20 18:43:06-- http://localhost/nagiosxi/includes/components/ccm/ 正在解析主机 localhost (localhost)... ::1, 127.0.0.1 正在连接 localhost (localhost)|::1|:80... 已连接。 已发出 HTTP 请求,正在等待回应... 200 OK 长度:未指定 [text/html] 正在保存至: “nagiosql.login”0K .......... .......... ...... 1.41M=0.02s
2017-11-20 18:43:07 (1.41 MB/s) - “nagiosql.login” 已保存 [27218]
LOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/ CMDLINE: /usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=apply&type=writeConfig' -O nagiosql.export.monitoring --2017-11-20 18:43:07-- http://localhost/nagiosxi/includes/components/ccm/ 正在解析主机 localhost (localhost)... ::1, 127.0.0.1 正在连接 localhost (localhost)|::1|:80... 已连接。 已发出 HTTP 请求,正在等待回应... 200 OK 长度:未指定 [text/html] 正在保存至: “nagiosql.export.monitoring”0K .......... .......... . 1.32M=0.02s
2017-11-20 18:43:08 (1.32 MB/s) - “nagiosql.export.monitoring” 已保存 [21956]
WRITE CONFIGS SUCCESSFUL!
OUTPUT: Nagios Core 4.2.4 Copyright (c) 2009-present Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 12-07-2016 License: GPLWebsite: https://www.nagios.org
Reading configuration data... Read main config file okay... Read object config files okay...Running pre-flight check on configuration data...
Checking objects...
Checked 12 services. Checked 1 hosts. Checked 1 host groups. Checked 0 service groups. Checked 2 contacts. Checked 2 contact groups. Checked 124 commands. Checked 8 time periods. Checked 0 host escalations. Checked 0 service escalations. Checking for circular paths... Checked 1 hosts Checked 0 service dependencies Checked 0 host dependencies Checked 8 timeperiods Checking global event handlers... Checking obsessive compulsive processor commands... Checking misc settings...Total Warnings: 0
Total Errors: 0Things look okay - No serious problems were detected during the pre-flight check
RET: 0 Login appears okay Cookies appear okay import appear okay export appear okayNagiosQL data imported OK.
RESULT=0 Running './F-startdaemons'... Redirecting to /bin/systemctl restart httpd.service Restarting ndo2db (via systemctl): [ 确定 ] Restarting nagios (via systemctl): [ 确定 ] rm: cannot remove '/usr/local/nagiosxi/var/subsys/npcd.pid': No such file or directory NPCD was not running. NPCD started. Redirecting to /bin/systemctl restart ntpd.service Redirecting to /bin/systemctl restart crond.service Daemons started OK RESULT=0 Running './Z-webroot'... RESULT=0Nagios XI Installation Complete!
--------------------------------4.查看:
上面的是第二次安装,第一次安装的话会给出访问的URL,如下:
http://192.168.101.30/nagiosxi/
但nagiosxi支持中文,虽然翻译有点烂。而且需要License的,试用版将60天过期.。