Friday, May 13, 2016

Nagios Configuration| Install Nagios on ubuntu

   



    1  ifconfig
    2  ping 8.8.8.8
    3  ping www.google.lk
    4  nano  /etc/resolv.conf
    5  ping www.google.lk
    6  apt-get update
    7  passwd nagios
    8  groupadd nagcmd
    9  ll
   10  pwd
   11  ll
   12  usermod -a -G nagcmd nagios
   13  usermod -a -G nagcmd www-data
   14  cd ~~
   15  ll
   16  wget http://downloads.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.6/nagios-4.0.6.tar.gz
   17  tar -xzvf nagios-4.0.6.tar.gz
   18  ll
   19  wget https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
   20  tar -xzvf nagios-plugins-1.5.tar.gz
   21  ll
   22  apt-get install libgd2-xpm-dev apache2 php5 build-essential
   23  aptitude install leafpad
   24  aptitude install chromium-browser
   25  aptitude install sysutils mailx lsb-release postfix mailutils
   26  echo "test message" | mailx -s 'test subject' aravinth@debugisp.net
   27  apache2-mpm-prefo
   28  aptitude install apache2-mpm-prefork
   29  aptitude install php5 php5-mysql php-pear php5-ldap php5-snmp php5-gd php-gettext
   30  aptitude install mysql-server libmysqlclient15-dev
   31  aptitude install libconfig-inifiles-perl libcrypt-des-perl libdigest-hmac-perl torrus-common libgd-gd2-perl
   32  snmp snmpd libnet-snmp-perl libsnmp-perl
   33  aptitude install snmp snmpd libnet-snmp-perl libsnmp-perl
   34  aptitude install libgd2-xpm libgd2-xpm-dev libpng12-dev
   35  aptitude install phpMyAdmin
   36  cd ~/nagios-4.0.6
   37  ./configure --with-command-group=nagcmd
   38  make all
   39  uptime
   40  make install
   41  make install-init
   42  make install-commandmode
   43  make install-webconf
   44  apt-get install libnet-snmp-perl libperl5.14 libpq5 libradius1 libsensors4 libsnmp-base libsnmp15 libtalloc2 libtdb1 libwbclient0 samba-common samba-common-bin smbclient snmp whois libmysqlclient15-dev libssl-dev
   45  ./configure --with-nagios-user=nagios --with-nagios-group=nagios
   46  make
   47  make install
   48  cd ~~
   49  cd~~
   50  cd ~~
   51  cd ..
   52  ll
   53  wget http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.14/nrpe-2.14.tar.gz
   54  cd nrpe-2.14
   55  tar -xzvf nrpe-2.14.tar.gz
   56  cd nrpe-2.14
   57  ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu
   58  ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib
   59  apt-file search libssl | grep libssl-dev
   60  apt-get install apt-file
   61  apt-file search libssl | grep libssl-dev
   62  'apt-file update
   63  apt-file search libssl | grep libssl-dev
   64  sudo apt-get install libssl-dev
   65  dpkg -L libssl-dev
   66  ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/arm-linux-gnueabihf
   67  cd src/
   68  ll
   69  cd ..
   70  ll
   71  ./configure --with-nagios-user=nagios --with-nagios-group=nagios
   72  make
   73  cp src/check_nrpe /usr/local/nagios/libexec/
   74  htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
   75  ll
   76  cd
   77  ll
   78  vim ~/.bash_aliases
   79  cat ~/.bash_aliases
   80  vim ~/.bash_aliases
   81  nano ~/.bash_aliases
   82  cat /.bash_aliases
   83  cat ~~/.bash_aliases
   84  nano ~/.bash_aliases
   85  nverify
   86  exit
   87  init 6
   88  ll
   89  apt-get install libcgi-pm-perl librrds-perl libgd-gd2-perl
   90  cd ~~
   91  cd ~
   92  wget http://downloads.sourceforge.net/project/nagiosgraph/nagiosgraph/1.4.4/nagiosgraph-1.4.4.tar.gz
   93  nano /etc/host
   94  nano /etc/resolv.conf
   95  wget http://downloads.sourceforge.net/project/nagiosgraph/nagiosgraph/1.4.4/nagiosgraph-1.4.4.tar.gz
   96  tar -xzvf nagiosgraph-1.4.4.tar.gz
   97  cd nagiosgraph-1.4.4
   98  ./install.pl --check-prereq
   99  ./install.pl --layout standalone --prefix /usr/local/nagiosgraph
  100  service apache2 restart
  101  service nagios restart
  102  nverify
  103  vim /usr/local/nagios/share/ssi/common-header.ssi
  104  cd /usr/local/nagios
  105  ls
  106  cd etc/
  107  ls
  108  cd objects/
  109  ls
  110  nano localhost.cfg
  111  nverify
  112  ervice nagios restart
  113  service nagios restart
  114  mv /usr/local/nagios/share/images/notes.gif /usr/local/nagios/share/images/notes.bak.gi
  115  cp /usr/local/nagios/share/images/action.gif /usr/local/nagios/share/images/notes.gif
  116  cd
  117  ll
  118  apt-get install mrtg
  119  cp ~/nagios-4.0.6/sample-config/mrtg.cfg /usr/local/nagios/etc/
  120  mkdir /usr/local/nagios/share/stats
  121  nano /usr/local/nagios/etc/mrtg.cfg
  122  env LANG=C mrtg /usr/local/nagios/etc/mrtg.cfg
  123  indexmaker /usr/local/nagios/etc/mrtg.cfg --output=/usr/local/nagios/share/stats/index.html
  124  nano /etc/cron.d/nagiostats
  125  nano /usr/local/nagios/share/side.php
  126  nano /usr/local/nagios/share/index.php
  127  ll
  128  cd /etc/
  129  ll
  130  cd /opt/
  131  ll
  132  cd //
  133  cd
  134  ll
  135  cd /var/
  136  ll
  137  cd lo
  138  cd www/
  139  ll
  140  ls
  141  cd lo
  142  ll
  143  cd ..
  144  ll
  145  cd lo
  146  cd llocal
  147  cd local
  148  ll
  149  whereis nagios
  150  ll
  151  cd ..
  152  ll
  153  cd srv/
  154  ll
  155  cd /usr/
  156  ll
  157  cd local/
  158  ll
  159  cp nagios nagios.backup
  160  cd nagios
  161  ll
  162  cd ..
  163  sudo cp -R nagios nagios.back
  164  ll
  165  history

2 comments:

  1. Ukraine is one of the most encouraging nations for organizations of any scale searching for able, capable and dedicated designers for different tasks, whose administrations are economical. In the field of IT and programming, devoted programming advancement group Ukraine is right now the most ideal choice. The level of the Ukrainian committed improvement group is the most elevated in Focal and Eastern Europe. We have assembled the main justifications for why you ought to recruit a devoted improvement group in Ukraine and why the nation has serious areas of strength for this market contrasted with different nations in Eastern Europe>> hire a dedicated developer

    ReplyDelete