----------------------------------------------------------------------------------
- Installation et configuration de Centreon sur FreeBSD
-----------------------------------------------------------------------------------
------------ Auteur : Rémi LAURENT
-----------------------------------
------------ Mail : cloud@madpowah.org
-------------------------------
------------ Date : 26/05/2008
----------------------------------
-----------------------------------------------------------------------------------
Aujourd'hui je me suis amusé a tester Nagios puis Centreon.
L'installation de Nagios s'est passé niquel depuis les ports.
J'ai juste eu a reconfigurer les sample de /usr/local/etc/nagios en .cfg
et a modifier Apache en mettant dans le httpd.conf
<Directory /usr/local/www/nagios>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>
<Directory /usr/local/www/nagios/cgi-bin>
AllowOverride AuthConfig
Options ExecCGI
</Directory>
ScriptAlias /nagios/cgi-bin/ /usr/local/www/nagios/cgi-bin/
Alias /nagios/ /usr/local/www/nagios/
On crée ensuite le .htaccess et le .htpasswd dans
/usr/local/www/nagios/cgi-bin/ et ca roule../install.shLa commence la série de questions de Centreon ou j'ai du donner quelques coup de find et whereis pour voir ou étaient mes fichiers. Voila l'install :
###############################################################################
# Centreon (www.centreon.com)
#
# Thanks for using Centreon
#
#
#
# v 1.4.2.6
#
#
#
# infos@oreon-project.org
#
#
#
# Make sure you have installed and configured
#
# sudo - sed
#
# php - apache - rrdtool - mysql
#
#
#
#
#
###############################################################################
# The Team Centreon
#
###############################################################################
WARNING : Setup will delete all previous informations in your Centreon
DATABASE.
Are you sure to continue ?
[y/n], default to [n]:y
Where is installed Nagios ?
default to [/usr/local/nagios]:/usr/local/www/nagios
Where is your nagios etc directory ?
default to [/usr/local/www/nagios/etc]:/usr/local/etc/nagios
Path /usr/local/etc/nagios OK
Where is your nagios var directory ?
default to [/usr/local/www/nagios/var]:/var/spool/nagios
Path /var/spool/nagios OK
Where is your nagios plugins (libexec) directory ?
default to [/usr/local/www/nagios/libexec]:/usr/local/libexec/nagios
Path /usr/local/libexec/nagios OK
Where is your nagios bin directory?
default to [/usr/local/www/nagios/bin]:/usr/local/bin
Path /usr/local/bin OK
Where is your nagios image directory ?
default to
[/usr/local/www/nagios/share/images]:/usr/local/www/nagios/images
Path /usr/local/www/nagios/images OK
Where do I install centreon ?
default to [/usr/local/centreon]:
Directory /usr/local/centreon does not exits. CRITICAL
Do you want me to create this directory [/usr/local/centreon]?[Y/n]y
Path /usr/local/centreon OK
Where is sudo configuration file?
default to [/etc/sudoers]:/usr/local/etc/sudoers
File /usr/local/etc/sudoers OK
Where is installed RRD perl modules [RRDs.pm] ?
Just put directory, not full path.
default to
[/usr/local/rrdtool/lib/perl]:/usr/local/lib/perl5/site_perl/5.8.8/mach/
File /usr/local/lib/perl5/site_perl/5.8.8/mach/ OK
Where is rrdtool binary ?
default to [/usr/bin/rrdtool]:/usr/local/bin/rrdtool
/usr/local/bin/rrdtool OK
Where is mail binary ?
default to [/usr/bin/mail]:/usr/bin/mail
/usr/bin/mail OK
Where is PEAR Path ?
default to [/usr/share/pear]:/usr/local/share/pear/
PEAR Path /usr/local/share/pear OK
------------------------------------------------------------------------
User Management
------------------------------------------------------------------------
Finding Apache group :
Finding Apache user :
Finding Nagios group : nagios
Finding nagios group 'nagios' in /etc/group YES
Finding Nagios user : nagios
Finding nagios user 'nagios' in /etc/passwd YES
------------------------------------------------------------------------
Other Stuff
------------------------------------------------------------------------
TrueType directory created OK
TrueType verdana installed OK
Finding PEAR Path : /usr/local/share/pear OK
PEAR Font directory created OK
PEAR Font installed OK
------------------------------------------------------------------------
Configure Apache server
------------------------------------------------------------------------
Create '/oreon.conf' OK
Configuring Apache OK
Couldn't add to nagios group WARNING
Unable to restart apache server WARNING
------------------------------------------------------------------------
Start Centreon Installation
------------------------------------------------------------------------
Centreon Directory already exists PASSED
Copy 'filesGeneration' OK
Copy 'filesUpload' OK
Copy 'GPL_LIB' OK
Copy 'log' OK
Copy 'www' OK
Copy 'cron' OK
Copy 'ODS' OK
Copy 'ODS_SRC_ETC' OK
Copy 'doc' OK
------------------------------------------------------------------------
Start Plugins Centreon Installation
------------------------------------------------------------------------
/usr/local/libexec/nagios already exists PASSED
Preparing Oreon Plugins...
-> centreon.conf OK
-> centreon.pm OK
-> check_centreon_MS_multiple_services OK
-> check_centreon_dummy OK
-> check_centreon_nt OK
-> check_centreon_ping OK
-> check_centreon_snmp_IF_adminstatus OK
-> check_centreon_snmp_TcpConn OK
-> check_centreon_snmp_cpu OK
-> check_centreon_snmp_loadaverage OK
-> check_centreon_snmp_multiple_process OK
-> check_centreon_snmp_packetErrors OK
-> check_centreon_snmp_packetLost OK
-> check_centreon_snmp_process OK
-> check_centreon_snmp_process_detailed OK
-> check_centreon_snmp_remote_storage OK
-> check_centreon_snmp_traffic OK
-> check_centreon_snmp_uptime OK
-> check_centreon_snmp_value OK
-> check_meta_service OK
-> check_snmp_cpfw.pl OK
-> check_snmp_load.pl OK
-> check_snmp_mem.pl OK
-> check_snmp_process.pl OK
-> check_snmp_processus_loaded.pl OK
-> check_snmp_script_result.pl OK
-> check_snmp_storage.pl OK
-> check_snmp_win.pl OK
-> process-service-perfdata OK
-> submit_host_check_result OK
-> submit_service_check_result OK
Do you want to install Centreon Plugins ?
[y/n], default to [y]:y
Installing Centreon Plugins on '/usr/local/libexec/nagios' OK
chown: root.nagios: Invalid argument
------------------------------------------------------------------------
Start Traps Handler Installation
------------------------------------------------------------------------
Preparing Oreon Plugins...
-> fill_trapDB
-> genSnmpttConfFile
-> trapHandler
Do you want to install Centreon Traps Plugins ?
[y/n], default to [y]:
Installing Centreon Traps Plugins on
/usr/local/libexec/nagios/traps created OK
Where is your SNMP configuration file?
default to [/etc/snmp/]:/etc
Moving snmptrapd.conf to /etc OK
/etccentreon_traps created OK
Moving snmptt.ini to /etccentreon_traps/ OK
Moving snmp.conf to /etc OK
chown: .nagios: Invalid argument
Moving snmptt to /usr/sbin/ OK
Moving snmpttconvertmib to /usr/sbin/ OK
/usr/local/libexec/nagios/traps/' OK
Finding Centreon Plugins configuration file 'centreon.conf'OK
You already seem to have installed the plugins Centreon.
Do you want overwrite this file ? You must regenerate this one from
Centreon interface.
[y/n], default to [n]:n
/usr/local/centreon/filesGeneration/nagiosCFG already existPASSED
/usr/local/centreon/filesUpload/nagiosCFG already exists PASSED
------------------------------------------------------------------------
Start ODS Installation
------------------------------------------------------------------------
Checking ODS data folder :
Creating Centreon Directory '/var/lib/ods' OK
Checking ODS database folder :
Creating Centreon Directory '/var/lib/ods/database/' OK
Checking ODS log folder :
Creating Centreon Directory '/var/log/ods/' OK
Replace ODS Macro OK
Install ODS Binary OK
Set ODS properties OK
functions: line 583: /etc/init.d/ods: No such file or directory
chmod: /etc/init.d/ods: No such file or directory
------------------------------------------------------------------------
Replace Macro In ODS cron script
------------------------------------------------------------------------
in /usr/local/centreon/cron/inventory_update.php OK
in /usr/local/centreon/cron/reporting/ArchiveLogInDB.php OK
in /usr/local/centreon/cron/parsing_status.pl OK
in /usr/local/centreon/cron/parsing_log.pl OK
------------------------------------------------------------------------
Start Centreon Cron Configuration
------------------------------------------------------------------------
Specify user do you use for Centreon cron
Default to [nagios]
crontab: no crontab for nagios
You old crontab is backup on /tmp/crontab_nagios.55tnky file
------------------------------------------------------------------------
Configure Sudo
------------------------------------------------------------------------
Sorry, we doesn't found nagios init script PASSED
Which is your nagios init script ?
default is [/etc/init.d/nagios2]:/usr/local/etc/rc.d/nagios
Configuring Sudo OK
------------------------------------------------------------------------
Centreon Post Install
------------------------------------------------------------------------
Finding mail binary : /usr/bin/mail OK
Finding rrdtool binary : /usr/local/bin/rrdtool OK
Create /usr/local/centreon/www/install/installoreon.conf.phOK
Create /etc/oreon.conf OK
Configuring Oreon post-install OK
###############################################################################
# Go to the URL : http://your-server/oreon/
#
# or http://your-server/centreon/ to finish the setup
#
#
#
# Report bugs at bugs@oreon-project.org
#
#
#
# Thanks for using Centreon.
#
# -----------------------
#
# Contact : infos@oreon-project.org
#
# http://www.centreon.com
#
###############################################################################
Voila l'installation est maintenant terminée.
Alias /centreon/ /usr/local/centreon/www/
<Directory /usr/local/centreon/www/>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>
chown -R www:nagios /usr/local/etc/nagios/ chown -R www:nagios /usr/local/libexec/nagios chmod -R 775 /usr/local/libexec/nagios chmod -R 775 /usr/local/etc/nagios/ chmod -R 775 /usr/local/centreon/ODS/ chown -R www:www /usr/local/centreon/ODS chown -R www:www /usr/local/centreon/www chmod -R 775 /usr/local/centreon/www
pear install -o -f --alldeps DB DB_DataObject DB_DataObject_FormBuilder MDB2 Date Numbers_Roman Numbers_Words HTML_Common HTML_QuickForm HTML_QuickForm_advmultiselect HTML_Table Auth_SASL HTTP Image_Canvas Image_Color Image_Graph Image_GraphViz Mail Mail_Mime Net_SMTP Net_Socket Net_Traceroute Net_Ping Validate XML_RPC SOAP