分类: 系统运维
2009-08-25 10:29:50
一. Centreon是一款开源的软件,主要用于与nagios搭配,通过页面管理nagios,通过第三方组件实现对网络,操作系统,应用程序的监控。
二.安装Centreon
1. 下载centreon2.0
#wget
2. 解压缩
#tar xzf centreon-2.0.tar.gz
3. 运行安装
#cd centreon-2.0
# ./install.sh -i
..........................
first step: checking prerequisites
###############################################################################
# #
# Centreon () #
# Thanks for using Centreon #
# #
# v 2.0 #
# #
# #
# #
# Make sure you have installed and configured #
# sudo - sed - php - apache - rrdtool - mysql #
# #
###############################################################################
------------------------------------------------------------------------
Checking all needed binaries
------------------------------------------------------------------------
rm OK
cp OK
mv OK
chmod OK
chown OK
echo OK
cat OK
more OK
mkdir OK
find OK
sed OK
Now the Centreon license (GPL2) is shown. If you don't accept it the setup will terminate.
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
Do you accept GPL license ?
[y/n], default to [n]:
> y
4. .......yes
Now some questions regarding the modules to be installed: Centreon web interface, centcore (distributing module), Centreon plugins and Centreon Trap-Handler.
ATTENTION: using Centreon 2.0 beta 1 you cannot install centcore and centreon trap handler even if you respond with "y".
------------------------------------------------------------------------
Please choose what do you want to install
------------------------------------------------------------------------
Do you want to install Centreon Web Front
[y/n], default to [n]:
> y
..y...Centreon Web
Do you want to install Centreon CentCore
[y/n], default to [n]:
> y
..y...centreon centcore..........nagios.
Do you want to install Centreon Nagios Plugins
[y/n], default to [n]:
> y
..y....centreon........nagios..
Do you want to install Centreon Snmp Traps process
[y/n], default to [n]:
> n
...centreon........snmp traps.............
Now the installation of the different modules begins, starting with Centreon Web, the centreon interface.
------------------------------------------------------------------------
Start CentWeb Installation
------------------------------------------------------------------------
Where is your Centreon directory?
default to [/usr/local/centreon]
>
Where should centreon be installed?
Do you want me to create this directory ? [/usr/local/centreon]
[y/n], default to [n]:
> y
..y
Path /usr/local/centreon OK
Here you should specify where to put the centreon journals/logs.
Where is your Centreon log directory
default to [/usr/local/centreon/log/]
>
Do you want me to create this directory ? [/usr/local/centreon/log/]
[y/n], default to [n]:
> y
Path /usr/local/centreon/log/ OK
very important : the location of centreon config file.\\ ATTENTION: changing the path may result in problems...
Where is your Centreon etc directory
default to [/etc/centreon]
>
Do you want me to create this directory ? [/etc/centreon]
[y/n], default to [n]:
> y
Path /etc/centreon OK
Where is your Centreon generation_files directory?
default to [/usr/local/centreon/]
>
Path /usr/local/centreon/ OK
The path to RRDs.pm used by centstorage and centreon plugins.
Where is installed RRD perl modules [RRDs.pm],
..................locate RRDs.pm................
default to [/usr/lib/perl5/RRDs.pm]
>/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/RRDs.pm
Path /usr/lib/perl5 OK
/usr/bin/rrdtool OK
/usr/bin/mail OK
Location of PEAR.php.
PEAR.php...
Where is PEAR [PEAR.php]
default to [/usr/share/php/PEAR.php]
>/usr/share/pear/PEAR.php
Path /usr/share/php OK
Following a number of questions which try to locate different parts of Nagios.
Where is installed Nagios ?
default to [/usr/local/nagios/]
>
Path /usr/local/nagios/ OK
Where is your nagios config file
default to [/usr/local/nagios/etc//nagios.cfg]
>
Path /usr/local/nagios/etc OK
Where is your Nagios var directory ?
default to [/usr/local/nagios/var/]
>
Path /usr/local/nagios/var/ OK
Where is your Nagios plugins (libexec) directory ?
default to [/usr/local/nagios/libexec/]
>
Path /usr/local/nagios/libexec/ OK
Where is your nagios binary ?
default to [/usr/local/nagios/bin/nagios]
>
/usr/local/nagios/bin/nagios OK
Where is your Nagios image directory ?
default to [/usr/local/nagios/share/images/logos/]
>
Path /usr/local/nagios/share/images/logos/ OK
Where is your nagiostats binany ?
default to [/usr/local/nagios/bin/nagiostats]
>
/usr/local/nagios/bin/nagiostats OK
p1_file : /usr/local/nagios/bin/p1.pl OK
/usr/bin/php OK
Finding Apache group : www-data
Finding Apache user : www-data
Finding Nagios user : nagios
Finding nagios user nagios in /etc/passwd OK
Finding Nagios group : nagios
Finding nagios group 'nagios' in /etc/group OK
ATTENTION: the name of user and group of the web server depends from the used distribution!
Now the script asks if you want to use NDO. You better confirm it because otherwise you can't use the benefit of some improvements: AJAX, monitoring performance, etc. (Note: despite deselection you will get messages that NDO access to the database fails).
Do you want use NDO ?
[y/n], default to [n]:
> y
The script asks for the location of the NDO modules. The path is important for a working connection to NDO.
Where is your NDO ndomod binary ?
default to [/usr/sbin/ndomod.o]
> /usr/local/nagios/bin/ndomod-3x.o
/usr/local/nagios/bin/ndomod-3x.o OK
Now sudo will be configured to grant permissions to centreon for specific changes (e.g. restart of Nagios)
------------------------------------------------------------------------
Configure Sudo
------------------------------------------------------------------------
Where is sudo configuration file
default to [/etc/sudoers]
>
/etc/sudoers OK
Nagios init script OK
Your sudo is not configure
Do you want I configure your sudo ? (WARNING)
[y/n], default to [n]:
> y
Configuring Sudo OK
Now some questions regarding the configuration of the apache web server.\\ This beta version will not accept the httpd scripts on Fedora so you have to restart the web server manually after the end of the installation!
------------------------------------------------------------------------
Configure Apache server
------------------------------------------------------------------------
Do you want write Apache configuration file ?
[y/n], default to [n]:
> y
Create '/etc/apache2/conf.d/centreon.conf' OK
Configuring Apache OK
Do you want reload your Apache ?
[y/n], default to [n]:
> n
Preparing Centreon temporary files
Now the check and installation of php files for centreon starts.
------------------------------------------------------------------------
Start Centreon Web Front Installation
------------------------------------------------------------------------
In process
Change macros for php file
Change macros for php file OK
Copy CentWeb in system directory
CentWeb file installation OK
Install Centreon cron OK
PEAR libraries: a set of libraries is still missing but they will be installed or updated as nessecary (if you have a connection to the internet). Otherwise you have to install them manually :-(.
Pear Modules
Check PEAR modules
PEAR 1.5.0 1.4.11 NOK
DB 1.7.6 NOK
DB_DataObject 1.8.4 NOK
DB_DataObject_FormBuilder 1.0.0RC4 NOK
MDB2 2.0.0 NOK
Date 1.4.6 NOK
HTML_Common 1.2.2 NOK
HTML_QuickForm 3.2.5 NOK
HTML_QuickForm_advmultiselect 1.1.0 NOK
HTML_Table 1.6.1 NOK
Archive_Tar 1.1 1.3.1 OK
Auth_SASL 1.0.1 NOK
Console_Getopt 1.2 1.2 OK
HTTP 1.2.2 NOK
Image_GraphViz 1.1.0 NOK
Net_SMTP 1.2.8 NOK
Net_Socket 1.0.1 NOK
Net_Traceroute 0.21 NOK
Net_Ping 2.4.1 NOK
Validate 0.6.2 NOK
XML_RPC 1.4.5 NOK
SOAP 0.10.1 NOK
Log 1.9.11 NOK
After displaying the current versions you may get the request to update some libraries.
Do you want I install/upgrade your PEAR modules
[y/n], default to [y]:
> y
Upgrading PEAR modules
PEAR 1.5.0 1.4.11 1.7OK
Installing PEAR modules
DB 1.7.6 1.7.13 OK
DB_DataObject 1.8.4 1.8.8 OK
DB_DataObject_FormBuilder 1.0.0RC4 1.0.0RC7 OK
MDB2 2.0.0 2.4.1 OK
HTML_QuickForm_advmultiselect 1.1.0 1.4.1 OK
HTML_Table 1.6.1 1.8.2 OK
Auth_SASL 1.0.1 1.0.2 OK
HTTP 1.2.2 1.4.0 OK
Image_GraphViz 1.1.0 1.2.1 OK
Net_SMTP 1.2.8 1.3.0 OK
Net_Traceroute 0.21 0.21.1 OK
Net_Ping 2.4.1 2.4.3 OK
Validate 0.6.2 0.8.1 OK
XML_RPC 1.4.5 1.5.1 OK
SOAP 0.10.1 0.11.0 OK
Log 1.9.11 1.10.1 OK
Usually the script is done with installation of PEAR modules and will show the state of the modules for a last time.
Check PEAR modules
PEAR 1.5.0 1.7.1 OK
DB 1.7.6 1.7.13 OK
DB_DataObject 1.8.4 1.8.8 OK
DB_DataObject_FormBuilder 1.0.0RC4 1.0.0RC7 OK
MDB2 2.0.0 2.4.1 OK
Date 1.4.6 1.4.7 OK
HTML_Common 1.2.2 1.2.4 OK
HTML_QuickForm 3.2.5 3.2.10 OK
HTML_QuickForm_advmultiselect 1.1.0 1.4.1 OK
HTML_Table 1.6.1 1.8.2 OK
Archive_Tar 1.1 1.3.2 OK
Auth_SASL 1.0.1 1.0.2 OK
Console_Getopt 1.2 1.2.3 OK
HTTP 1.2.2 1.4.0 OK
Image_GraphViz 1.1.0 1.2.1 OK
Net_SMTP 1.2.8 1.3.0 OK
Net_Socket 1.0.1 1.0.8 OK
Net_Traceroute 0.21 0.21.1 OK
Net_Ping 2.4.1 2.4.3 OK
Validate 0.6.2 0.8.1 OK
XML_RPC 1.4.5 1.5.1 OK
SOAP 0.10.1 0.11.0 OK
Log 1.9.11 1.10.1 OK
All PEAR module OK
The script will continue.
------------------------------------------------------------------------
Centreon Post Install
------------------------------------------------------------------------
Create /usr/local/centreon/www/install/install.conf.php OK
Create /etc/centreon/instCentWeb.conf OK
Now CentStorage will be installed, also called ODS (Oreon Data Storage). At the moment this module permits archiving on the basis of RRD and MySQL. Additionally CentStorage enables you to create graphs for monitoring the different metrics.
------------------------------------------------------------------------
Start CentStorage Installation
------------------------------------------------------------------------
Where is your Centreon Run Dir directory?
default to [/var/run/centreon]
>
Do you want me to create this directory ? [/var/run/centreon]
[y/n], default to [n]:
> y
Path /var/run/centreon OK
Where is your CentStorage binary directory
default to [/usr/local/centreon/bin]
>
Do you want me to create this directory ? [/usr/local/centreon/bin]
[y/n], default to [n]:
> y
Path /usr/local/centreon/bin OK
Where is your CentStorage RRD directory
default to [/var/lib/centreon]
>
Attention: the centreon lib directory should be placed on a continously available partition to avoid problems. The directory contains the RRDTools. Consider to place the MySQl data on a reasonably dimensioned disk. The logs and performance data also need a lot of space.
Do you want me to create this directory ? [/var/lib/centreon]
[y/n], default to [n]:
> y
Path /var/lib/centreon OK
Finding Nagios group : nagios
Finding nagios group 'nagios' in /etc/group OK
Finding Nagios user : nagios
Finding nagios user nagios in /etc/passwd OK
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will move...
Creating Centreon Directory '/var/lib/centreon/status' OK
Creating Centreon Directory '/var/lib/centreon/metrics' OK
Replace Centstorage Macro OK
Set CentStorage properties OK
Replace Centstorage init script Macro OK
Do you want I install CentStorage init script ?
[y/n], default to [n]:
> y
Do you want I install CentStorage run level ?
[y/n], default to [n]:
> y
Adding system startup for /etc/init.d/centstorage ...
/etc/rc0.d/K30centstorage -> ../init.d/centstorage
/etc/rc1.d/K30centstorage -> ../init.d/centstorage
/etc/rc6.d/K30centstorage -> ../init.d/centstorage
/etc/rc2.d/S40centstorage -> ../init.d/centstorage
/etc/rc3.d/S40centstorage -> ../init.d/centstorage
/etc/rc4.d/S40centstorage -> ../init.d/centstorage
/etc/rc5.d/S40centstorage -> ../init.d/centstorage
Set logAnalyser properties OK
Set nagiosPerfTrace properties OK
Install CentStorage cron OK
Create /etc/centreon/instCentStorage OK
CentStorage is installed now. Still missing is SNMPTT (only versions > beta 3)!
Where is your SNMP configuration directory
default to [/etc/snmp]
>
/etc/snmp OK
Where is your SNMPTT binaries directory
default to [/opt/snmptt]
> /usr/local/src/centreon-2.0-b3/snmptt
/usr/local/src/centreon-2.0-b3/snmptt
Please answer some questions regarding the installation of the centreon plugins.
------------------------------------------------------------------------
Start CentPlugins Installation
------------------------------------------------------------------------
Where is your CentPlugins lib directory
default to [/var/lib/centreon]
>
Path /var/lib/centreon OK
Finding Nagios user : nagios
Finding nagios user nagios in /etc/passwd OK
Finding Nagios group : nagios
Finding nagios group 'nagios' in /etc/group OK
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will move...
CentPlugins is installed
Reloading Apache configuration on Fedora:
# service httpd reload
Reloading Apache configuration on Debian:
# /etc/init.d/apache reload
Reloading Apache configuration on OpenSuse/Ubuntu:
# /etc/init.d/apache2 reload
The installation script ends. Two or three steps remain to be done manually.
Retrieved from ""
注意: 对于PEAR modules 插件NOK 的可以使用pear install安装直到全部都OK。
参考: