change values above unless you perfectly understand ## what you are doing.## Centreon temporary directory to workTMP_DIR="/tmp/centreon-setup"## default snmp config directorySNMP_ETC="/usr/local/etc/snmp/"## a list of pear modules require by CentreonPEAR_MODULES_LIST="pear.lst"####################################################################### End: Default variables############################################################################################################################################ Begin: Centreon preferences####################################################################### Above variables are necessary to run a silent install## Where you want to install Centreon (Centreon root directory)INSTALL_DIR_CENTREON="/usr/local/centreon"## Centreon log files directoryCENTREON_LOG="/var/log/centreon"## Centreon config filesCENTREON_ETC="/usr/local/etc/centreon"## Centreon run dir (all .pid, .run, .lock)CENTREON_RUNDIR="/var/run/centreon"## Centreon generation config directory## filesGeneration and filesUploadCENTREON_GENDIR="/var/cache/centreon"## CentStorage RRDs directory (where .rrd files go)CENTSTORAGE_RRD="/var/lib/centreon"## path to centstorage binaryCENTSTORAGE_BINDIR="/usr/local/centreon/bin"## path to centcore binaryCENTCORE_BINDIR="/usr/local/centreon/bin"## libraries temporary files directoryCENTREON_VARLIB="/var/lib/centreon"## Some plugins require temporary datas to process output.## These temp datas are store in the CENTPLUGINS_TMP path.CENTPLUGINS_TMP="/var/lib/centreon/centplugins"## path to centpluginsTraps binariesCENTPLUGINSTRAPS_BINDIR="/usr/local/centreon/bin"## path for snmptt installationSNMPTT_BINDIR="/usr/local/centreon/bin/"## force install init script (install in init.d)## Set to "1" to enableCENTCORE_INSTALL_INIT=1CENTSTORAGE_INSTALL_INIT=1## force install run level for init script (add all link on rcX.d)## Set to "1" to enableCENTCORE_INSTALL_RUNLVL=1CENTSTORAGE_INSTALL_RUNLVL=1####################################################################### End: Centreon preferences############################################################################################################################################ Begin: Nagios preferences####################################################################### Install directoryINSTALL_DIR_NAGIOS="/usr/local"## Configuration directoryNAGIOS_ETC="/usr/local/etc/nagios/"## Plugins directoryNAGIOS_PLUGIN="/usr/local/libexec/nagios"## Images (logos) directoryNAGIOS_IMG="/usr/local/www/nagios/images/logos"## The nagios binary (optional)#NAGIOS_BINARY="/usr/local/bin/nagios"## The nagiostats binary (optional)#NAGIOSTATS_BINARY=""## Logging directoryNAGIOS_VAR="/var/spool/nagios/"## Nagios user (optional)NAGIOS_USER="nagios"## Nagios group (optional)NAGIOS_GROUP="nagios"####################################################################### End: Nagios preferences############################################################################################################################################ Begin: Apache preferences####################################################################### Apache configuration directory (optional)#DIR_APACHE="/usr/local/etc/apache20"## Apache local specific configuration directory (optional)#DIR_APACHE_CONF="/etc/apache/conf.d"## Apache configuration file. Only file name. (optional)#APACHE_CONF="apache.conf"## Apache user (optional)WEB_USER="www"## Apache group (optional)WEB_GROUP="www"## Force apache reload (optional): set APACHE_RELOAD to 1#APACHE_RELOAD=0####################################################################### End: Apache preferences############################################################################################################################################ Begin: Other binary####################################################################### RRDTOOL (optional)#BIN_RRDTOOL="/usr/bin/rrdtool"## Mail (optional)#BIN_MAIL="/bin/mail"## SSH (optional)#BIN_SSH="/usr/bin/ssh"## SCP (optional)#BIN_SCP="/usr/bin/scp"## PHP (optional)#PHP_BIN="/usr/bin/php"#PHP_BIN="/usr/bin/php"## GREP (optional)#GREP=""## CAT (optional)#CAT=""## SED (optional)GSED="/usr/local/bin/gsed"## CHMOD (optional)#CHMOD=""## CHOWN (optional)#CHOWN####################################################################### End: Other binary############################################################################################################################################ Begin: Others####################################################################### Perl path for RRDs.pm fileRRD_PERL="/usr/local/lib/perl5/site_perl/5.10.1/mach/"## Path to sudoers file (optional)SUDO_FILE="/usr/local/etc/sudoers"## Apache user (optional)WEB_USER="www"## Apache group (optional)WEB_GROUP="www"## init script directory (optional)INIT_D="/usr/local/etc/rc.d"## cron config script directory (optional)CRON_D="/usr/local/etc/cron.d"## Path for PEAR.php filePEAR_PATH="/usr/local/share/pear/"####################################################################### End: Others#####################################################################Agora vamos executar o comando de compilacao e instalacao do Centreon:# cd ../..# bash ./install.sh -f tmpl/vardistrib/freebsdDo you want me to configure your sudo ? (WARNING)[y/n], default to [n]:> yDo you want to reload your Apache ?[y/n], default to [n]:> nFeito isso vamos reiniciar o Apache e o MYSQL com o seguinte comando:# /usr/local/etc/rc.d/apache22 restart# /usr/local/etc/rc.d/mysql-server restartVamos acertar uma permissao nao realizada:# chown -R www:www /usr/local/etc/centreon/Vamos agora testar o Centreon. Use um browser para conectar a:# http://"ip_do_servidor"/centreon20- Configurando o CentreonSiga as etapas a seguir para a configuracao do Centreon: Agora precisamos exportar os arquivos de configuracao para que nosso NDO-Utils possa funcionar:Acesse a guia ConfigurationAgora NagiosMarque todas as opcoes e clique em ExportFeito isso, podemos inicializar o NDO:# ee /etc/rc.confAdicionando ao final do arquivo as linhas abaixo, depois salve o arquivo e saia:# NDO2DB ndo2db_enable="YES"Agora vamos iniciar o MySQL com o seguinte comando:# /usr/local/etc/rc.d/ndo2db startAgora, vamos iniciar os processos do Centreon:# pw user mod nagios -s /bin/sh# /usr/local/etc/rc.d/centcore start# /usr/local/etc/rc.d/centstorage startVamos acertar um path dentro do SUDO:# perl -p -i -e 's/\/etc\/init\.d\/nagios/\/usr\/local\/etc\/rc\.d\/nagios/g' /usr/local/etc/sudoersAcertar a parte da CRON para o FreeBSD:# cat /usr/local/etc/cron.d/* >> /etc/crontabReiniciar o CRON# /etc/rc.d/cron restartE agora o Nagios:# /usr/local/etc/rc.d/nagios restart21- Referenciaswww.fug.com.brwww.bsdux.com.brhttp://www.fug.com.br/content/view/505/60/http://nagios.sourceforge.net/docs/3_0/quickstart.htmlhttp://www.nagiosbook.org/PRE-RELEASE_The_Nagios_Book-05012006.pdfhttp://ws.edu.isoc.org/workshops/2008/apricot2008/netmanage/presos/nagios/http://www.luizgustavo.pro.br/blog/2010/02/15/centreon-2-1-4-no-freebsd/http://wiki.monitoring-fr.org/powered/centreon/starthttp://en.doc.centreon.com/CentreonArchitecturehttp://silverwraith.com/papers/freebsd-snmp.phphttp://www.remontti.com.br/blog/archives/648http://dev.mysql.com/doc/refman/5.5/en/freebsd.htmlhttp://www.fug.com.br/content/view/360/77/http://tuxtraining.com/2009/04/22/how-to-setup-a-famp-freebsd-apache-mysql-php-serverhttp://www.georgemendonca.com.br/middlecore-introducao-ao-desenvolvimento-de-a