Nginx is a high-performance Web and reverse proxy server with many excellent features: Nginx is a good alternative to Apache server in the case of high-connection concurrency: nginx is one of the software platforms that bosses often choose to do virtual host business in the United States. It can support responses of up to 50,000 concurrent connections. Thanks to Nginx for choosing epollandkqueue as the development model. Nagios is an open-source free network monitoring tool that can effectively monitor Windo
NginxIt is a high-performance Web and reverse proxy server with many excellent features: Nginx is a good alternative to Apache server in the case of high connection concurrency: nginx is one of the software platforms that bosses often choose to do virtual host business in the United States. It supports responses with up to 50,000 concurrent connections. Thanks to Nginx for choosing epoll and kqueue as the development model.
NagiosIt is an open-source free network monitoring tool that can effectively monitor the status of Windows, Linux and Unix hosts, network settings such as vswitches and routers, and printers. If the system or service status is abnormal, an email or text message alert will be sent immediately to the website O & M personnel. After the status is restored, a normal email or text message notification will be sent.
1. Install nagios
# Wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.2.tar.gz
# Tar zxvf nagios-3.2.2.tar.gz
# Cd nagios-3.2.2
# Useradd-m-s/bin/bash nagios
# Groupadd nagios
# Usermod-G nagios
# Groupadd nagcmd
# Usermod-a-G nagcmd nagios
# Usermod-a-G nagcmd www
#./Configure -- prefix =/usr/local/nagios -- with-command-group = nagcmd
# Make
# Make all
# Make install
# Make install-init # generate the init Startup Script
# Make install-config # install the sample configuration file
# Make install-commandmode # Set the corresponding directory permissions
2. Install the nagiox plug-in
# Wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz
# Tar zxvf nagios-plugins-1.4.15.tar.gz
# Cd nagios-plugins-1.4.15
#./Configure -- with-nagios-user = nagios -- with-nagios-group = nagios -- prefix =/usr/local/nagios
# Make
# Make install
3. nrpe Installation
# Apt-get install libssl-dev
# Wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.13/nrpe-2.13.tar.gz
# Tar zxvf nrpe-2.12.tar.gz
# Cd nrpe-2.12
#./Configure
# Make all
# Cp src/check_nrpe/usr/local/nagios/libexec/
4. install and configure Nginx
# Sudo apt-get install nginx php5-fpm libssl-dev fcgiwrap apache2
# Htpasswd-c-m/usr/local/nagios/etc/nagiosAdmin.net nagiosadmin
# Start the service
#/Etc/init. d/php5-fpm start
#/Etc/init. d/fcgiwrap start # The default is socket mode. The socket file is in/var/run/fcgiwrap. socket
#/Etc/init. d/nagios start
#/Etc/init. d/nginx start
Complete nagios WEB configuration
- Server {
- Listen 80;
- Server_name 1.1.1.2;
- Root/usr/local/nagios/share;
- Index index.html index.htm index. php default.html default.htm default. php;
- Location ~ . * \. Php? $ {
- Fastcgi_pass 127.0.0.1: 9000;
- Fastcgi_index index. php;
- Include fastcgi_params;
- Fastcgi_param SCRIPT_FILENAME/usr/local/nagios/share $ fastcgi_script_name;
- Auth_basic "nagios admin ";
- Auth_basic_user_file/usr/local/nagios/etc/nagiosAdmin.net;
- }
- Location ~ . * \. Cgi $ {
- Root/usr/local/nagios/sbin;
- Rewrite ^/nagios/cgi-bin/(. *) \. cgi/$ 1.cgi break;
- Fastcgi_pass unix:/var/run/fcgiwrap. socket;
- Fastcgi_index index. cgi;
- Fastcgi_param SCRIPT_FILENAME/usr/local/nagios/sbin $ fastcgi_script_name;
- Include fastcgi_params;
- Auth_basic "nagios admin ";
- Auth_basic_user_file/usr/local/nagios/etc/nagiosAdmin.net;
- }
- Location/nagios {
- Alias/usr/local/nagios/share;
- Auth_basic "nagios admin ";
- Auth_basic_user_file/usr/local/nagios/etc/nagiosAdmin.net;
- }
- Location ~ . * \. Pl $ {
- Fastcgi_pass unix:/var/run/fcgiwrap. socket;
- Fastcgi_index index. pl;
- Fastcgi_param SCRIPT_FILENAME/usr/local/nagios/sbin $ fastcgi_script_name;
- Include fastcgi_params;
- }
- }