Created
March 10, 2016 19:42
-
-
Save mizanRahman/9e6b666407da4edd34fc to your computer and use it in GitHub Desktop.
nagios installation script ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install wget build-essential apache2 php5-gd libgd2-xpm libgd2-xpm-dev libapache2-modphp5 | |
| cd /tmp | |
| wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.4.tar.gz | |
| wget http://nagios-plugins.org/download/nagios-plugins-2.0.tar.gz | |
| ### you should be logged in as root premission user for following commands | |
| useradd nagios | |
| groupadd nagcmd | |
| usermod -a -G nagcmd nagios | |
| tar zxvf nagios-4.0.4.tar.gz | |
| tar zxvf nagios-plugins-2.0.tar.gz | |
| cd nagios-4.0.4 | |
| ./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-mail=/usr/bin/sendmail | |
| make all | |
| make install | |
| make install-init | |
| make install-config | |
| make install-commandmode | |
| make install-webconf | |
| cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/ | |
| chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers | |
| /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg | |
| /etc/init.d/nagios start | |
| htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin | |
| cd /tmp/nagios-plugins-2.0 | |
| ./configure --with-nagios-user=nagios --with-nagios-group=nagios | |
| make | |
| make install | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment