Redhat 9.0 RPM with Database suppor

Jamie Bohr Jamie_Bohr at Agilent.com
Tue Nov 25 17:08:19 CET 2003


Sorry to say but I was told the RPM's are not compiled for database
support.  You will have to compile Nagios with DB support.  I am working
on a procedure to do just this.  I recommend the following Redhat RPM
packages be installed before starting, they all may not be required but
Nagios compile clean after installing them:

  autoconf
  gd-devel
  gd-progs
  libgd
  libgd-dev
  libpng
  libpng-devel
  libpng10
  libpng10-devel
  libungif
  libungif-devel
  libungif-progs
  mysql
  mysql-devel
  mysql-server

The steps below are what I did to compile Nagios with MySQL support,
they have not been verified (ran from a fresh install of RH) so I would
take them with a grain-of-salt; the most important thing the is the RPsM
listed above and to run autoconf before continuing.  Hope this helps.


1) This step prepares Nagios to be compiled.  Expand the Nagios download
to /tmp/nagios-1.1 and cd into it.


   autoconf

   ./configure --with-htmurl=/monitor --with-cgiurl=/monitor/cgi-bin        \
       --prefix=/opt/monitorsvr                                                           \
       --with-nagios-user=nagios --with-nagios-grp=nagios                         \
       --with-mysql-inc=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql  \
       --with-mysql-xdata


2) Compile Nagios:

   make all

3) Install Nagios, supporting init script and command file permissions:

   make install; make install-init; make install-commandmode

   3a) If you wish to install SAMPLE configuration files run:

       make install-config

4) Cd'ed to /opt/monitorsvr/etc and copied cgi.cfg-example and
   resource.cfg-sample to cgi-cfg and resource.cfg respectively.
   Edited all DataBase directives to match the MySQL database
information.
   DB Name: nagios    DB user: nagios
   DB Port: 3306      DB host: localhost  DB Password: <password>

5) Created a DB Using phpMyAdmin called nagios.  Created a user named
   nagios and gave full control of the nagios DataBase to user nagios.
   NOTE: This step does not have to be done if a DB user has already
   been established - Sorry I will not cover this.  This user will need
   the following DB permissions to the nagios database: SELECT, INSERT,
   UPDATE, DELETE and CREATE.  CREATE is only needed for the next step
   so it can be revoked afterwords.

6) Run: mysql --user=nagios --password=<password> nagios \
    < /tmp/nagios-1.1/contrib/database/create_mysql


   NOTE: I use the nagios user so I can make sure the appropriate
   DB permission have been set.



On Tue, 2003-11-25 at 02:13, k.l. muthu kumar wrote:

> I have installed nagios in redhat 9 using rpm.
> now i would like to have mysql database support for nagios. can anyone
> tellme how to configure database support in this senario.
> 
> Thanks,
> KLM
> 
> 
> 
> 
> Need a new email address that people can remember
> Check out the new EudoraMail at
> http://www.eudoramail.com
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null

-- 
Jamie Bohr
Agilent Technologies, Inc.
IT | Technical Computing
719-590-2396
Jamie_Bohr at Agilent.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20031125/a68305a7/attachment.html>


More information about the Users mailing list