*** Configuration summary for nagios 4.4.2 2018-08-16 ***:
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagios
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Install ${includedir}: /usr/local/nagios/include/nagios
Lock file: /run/nagios.lock
Check result directory: /usr/local/nagios/var/spool/checkresults
Init directory: /lib/systemd/system
Apache conf.d directory: /etc/apache2/sites-enabled
Mail program: /bin/mail
Host OS: linux-gnu
IOBroker Method: epoll
Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP):
Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.
您现在可以使用以下命令开始编译过程make命令:
sudo make all
编译可能需要一些时间,具体取决于您的系统。构建过程完成后,您将看到以下消息:
*** Compile finished ***
3.创建Nagios用户和组#
以下命令将创建一个新系统nagios用户和组:
sudo make install-groups-users
添加阿帕奇www-data用户到nagios group:
sudo usermod -a -G nagios www-data
4. 安装 Nagios 二进制文件#
执行以下命令安装 Nagios 二进制文件、CGI 和 HTML 文件:
sudo make install
您应该看到以下输出:
*** Main program, CGIs and HTML files installed ***
5. 创建外部命令目录#
Nagios 可以处理来自外部应用程序的命令。创建外部命令目录并通过键入以下内容设置适当的权限:
sudo make install-commandmode
*** External command directory configured ***
6.安装Nagios配置文件#
使用以下命令安装示例 Nagios 配置文件:
sudo make install-config
*** Config files installed ***
Remember, these are *SAMPLE* config files. You'll need to read
the documentation for more information on how to actually define
services, hosts, etc. to fit your particular needs.