1024programmer Nginx Gentoo system installation and configuration nagios+nginx

Gentoo system installation and configuration nagios+nginx

#Basic support gcc glibc glibc-common gd gd-devel
useradd -m nagios #Add a user named nagios to run nagios
passwd nagios #Set password
groupadd nagcmd #Add nagcmd user group to submit external control commands through web pages
usermod -a -G nagcmd nagios #Add nagios user to nagcmd group
usermod -a -G nagcmd nginx #Add nginx user to nagcmd group
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz
wget http://nagios.manubulon.com/nagios-snmp-plugins.1.1.1.tgz
tar zxvf nagios-3.2.0.tar.gz
tar zxvf nagios-plugins-1.4.13.tar.gz
tar zxvf nagios-snmp-plugins.1.1.1.tgz
cd nagios-3.2.0
./configure –with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
At this time, nagios itself has basically been installed
vi /usr/local/nagios/etc/objects/contacts.cfg #Modify the email address in the nagiosadmin line to your email address to send the alarm email to your email
#make install-webconf #Install nagios web interface
#htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
#Set the account password for HTTP authentication when logging in to the web interface
#Because I use nginx, so the above three lines are not executed, manually change the nginx configuration by myself
cd ..
cd nagios-plugins-1.4.13
./configure –with-nagios-user=nagios –with-nagios-group=nagios
make
make install
cd ..
cd nagios_plugins
#Install the components used by perl
perl -MCPAN -e shell
cpan> install Net::SNMP
./install.sh #Enter all the way
#nagios complete installation
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg #Check whether the configuration of nagios is correct
/etc/init.d/nagios start
/etc/init.d/nginx start
Nagios needs to use cgi-bin. For the cgi-bin configuration on nginx, please refer to nginx configuration cgi-bin to run perl

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/gentoo-system-installation-and-configuration-nagiosnginx/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索