Centreon+Nagios实战第五篇——监控端安装Centreon
2016-10-04 19:39
1041 查看
Centreon+Nagios实战第五篇——监控端安装Centreon
首先要安装一些相关包yum update yum upgrade yum install httpd gd fontconfig-devel libjpeg-devel libpng-devel gd-devel perl-GD \ openssl-devel perl-DBD-MySQL mysql-server mysql-devel php php-mysql php-gd php-ldap php-xml php-mbstring \ perl-Config-IniFiles perl-DBI perl-DBD-MySQL rrdtool perl-rrdtool perl-Crypt-DES perl-Digest-SHA1 \ perl-Digest-HMAC net-snmp-utils perl-Socket6 perl-IO-Socket-INET6 net-snmp net-snmp-libs php-snmp \ dmidecode lm_sensors perl-Net-SNMP net-snmp-perl fping cpp gcc gcc-c++ libstdc++ glib2-devel \ php-pear
为了能正确配置环境,执行以下命令
usermod -U apache pear channel-update pear.php.net
然后执行更新pear
pear upgrade-all
下载Centreon-web安装包
这里建议下载低版本的安装包,我这边下载的是2.5.4版本的,下载完后解压
tar zxf centreon-2.5.4.tar.gz cd centreon-2.5.4
运行安装脚本
./install.sh -i
这是程序会先给我们看一份协议,直接拉到最下面,程序会问你是否同意GPL license,输入y即可,然后进入安装。
下面又是一堆问题,全部选择y即可
Do you want to install : Centreon Web Front [y/n], default to : > y Do you want to install : Centreon CentCore [y/n], default to : > y Do you want to install : Centreon Nagios Plugins [y/n], default to : > y Do you want to install : Centreon Snmp Traps process [y/n], default to : > y
然后就是自定义安装路径
----------------------------------------------------------- Start CentWeb Installation ----------------------------------------------------------- Where is your Centreon directory? default to [/usr/local/centreon] > /usr/share/centreon Do you want me to create this directory ? [/usr/share/centreon] [y/n], default to : > y Path /usr/share/centreon OK Where is your Centreon log directory default to [/usr/local/centreon/log/] > /var/log/centreon Do you want me to create this directory ? [/var/log/centreon/] [y/n], default to : > y Path /var/log/centreon/ OK Where is your Centreon etc directory default to [/etc/centreon] > Do you want me to create this directory ? [/etc/centreon] [y/n], default to : > y Path /etc/centreon OK Where is your Centreon binaries directory default to [/usr/local/centreon/bin] > /usr/share/centreon/bin Do you want me to create this directory ? [/usr/share/centreon/bin] [y/n], default to : > y Path /usr/share/centreon/bin OK Where is your Centreon data information directory default to [/usr/local/centreon/data] > /usr/share/centreon/data Do you want me to create this directory ? [/usr/share/centreon/data] [y/n], default to : > y Where is your Centreon variable library directory? default to [/var/lib/centreon] > Do you want me to create this directory ? [/var/lib/centreon] [y/n], default to : > y Path /var/lib/centreon OK /usr/bin/rrdtool OK /bin/mail OK /usr/bin/php OK Where is PEAR [PEAR.php] default to [/usr/share/php/PEAR.php] > /usr/share/pear/PEAR.php Path /usr/share/pear OK /usr/bin/perl OK Finding Apache user : apache Finding Apache group : apache
创建用户和组
What is the Centreon group ? [centreon] default to [centreon] > Do you want me to create this group ? [centreon] [y/n], default to : > y What is the Centreon user ? [centreon] default to [centreon] > Do you want me to create this user ? [centreon] [y/n], default to : > y What is the Monitoring engine user ? > nagios What is the Broker user ? (optional) > nagios What is the Monitoring engine log directory ? > /usr/local/nagios/var/archives Where is your monitoring plugins (libexec) directory ? default to [/usr/lib/nagios/plugins] > /usr/local/nagios/libexec Path /usr/local/nagios/libexec OK Add group centreon to user apache OK Add group centreon to user nagios OK Add group nagios to user apache OK Add group nagios to user centreon OK ----------------------------------------------------------- Configure Sudo ----------------------------------------------------------- Where is sudo configuration file default to [/etc/sudoers] > /etc/sudoers OK What is the Monitoring engine init.d script ? > /etc/init.d/nagios What is the Monitoring engine binary ? >/usr/local/nagios/bin/nagios What is the Monitoring engine configuration directory ? > /usr/local/nagios/etc Where is the configuration directory for broker module ? > /usr/local/nagios/etc Where is the init script for broker module daemon ? > /etc/init.d/ndo2db Your sudo is not configured Do you want me to configure your sudo ? (WARNING) [y/n], default to : > y Configuring Sudo OK ----------------------------------------------------------- Configure Apache server ----------------------------------------------------------- Do you want to add Centreon Apache sub configuration file ? [y/n], default to : > y Create '/etc/httpd/conf.d/centreon.conf' OK Configuring Apache OK Do you want to reload your Apache ? [y/n], default to : > y Reloading Apache service OK Preparing Centreon temporary files Change right on /var/log/centreon OK Change right on /etc/centreon OK Change macros for insertBaseConf.sql OK Change macros for sql update files OK Change macros for php files OK Change macros for perl binary OK Change right on /usr/local/nagios/etc OK Add group nagios to user apache OK Add group nagios to user nagios OK Add group centreon to user nagios OK Copy CentWeb in system directory Install CentWeb (web front of centreon) OK Change right for install directory Change right for install directory OK Install libraries OK Write right to Smarty Cache OK Copying libinstall OK Change macros for centreon.cron OK Install Centreon cron.d file OK Change macros for centAcl.php OK Change macros for downtimeManager.php OK Install cron directory OK Change right for eventReportBuilder OK Change right for dashboardBuilder OK Change macros for centreon.logrotate OK Install Centreon logrotate.d file OK Prepare centFillTrapDB OK Install centFillTrapDB OK Prepare centreon_trap_send OK Install centreon_trap_send OK Prepare centreon_check_perfdata OK Install centreon_check_perfdata OK Prepare centreonSyncPlugins OK Install centreonSyncPlugins OK Prepare centreonSyncArchives OK Install centreonSyncArchives OK Install generateSqlLite OK Install changeRrdDsName.pl OK Prepare export-mysql-indexes OK Install export-mysql-indexes OK Prepare import-mysql-indexes OK Install import-mysql-indexes OK Centreon Web Perl lib installed OK ----------------------------------------------------------- Pear Modules ----------------------------------------------------------- Check PEAR modules PEAR 1.4.9 1.9.4 OK 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.4.2 OK Auth_SASL 1.0.1 NOK Console_Getopt 1.2 1.3.1 OK 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 1.5.5 OK SOAP 0.10.1 NOK Log 1.9.11 NOK Archive_Zip 0.1.2 NOK
这里pear模块有很多没有安装或者更新所以才会出现NOK,系统会提示更新一下这些模块
Do you want me to install/upgrade your PEAR modules [y/n], default to [y]: > y Upgrading PEAR modules Installing PEAR modules Check PEAR modules PEAR 1.4.9 1.9.5 OK DB 1.7.6 1.9.2 OK DB_DataObject 1.8.4 1.11.5 OK DB_DataObject_FormBuilder 1.0.0RC4 1.0.2 OK MDB2 2.0.0 2.4.1 OK Date 1.4.6 1.4.7 OK HTML_Common 1.2.2 1.2.5 OK HTML_QuickForm 3.2.5 3.2.14 OK HTML_QuickForm_advmultiselect 1.1.0 1.5.1 OK HTML_Table 1.6.1 1.8.4 OK Archive_Tar 1.1 1.4.2 OK Auth_SASL 1.0.1 1.0.6 OK Console_Getopt 1.2 1.3.1 OK Net_SMTP 1.2.8 1.6.3 OK Net_Socket 1.0.1 1.0.14 OK Net_Traceroute 0.21 0.21.3 OK Net_Ping 2.4.1 2.4.5 OK Validate 0.6.2 0.8.5 OK XML_RPC 1.4.5 1.5.5 OK SOAP 0.10.1 0.13.0 OK Log 1.9.11 1.13.1 OK Archive_Zip 0.1.2 0.1.2 OK All PEAR modules OK
更新完成之后都变成了OK,但是如果还是出现NOK,那就请手动更新这些模块,比如我之前更新完后DB依然还是NOK,我就重新打开了一个终端输入pear install -f DB更新DB即可
----------------------------------------------------------- Centreon Post Install -----------------------------------------------------------Create /usr/share/centreon/www/install/install.conf.php OK Create /etc/centreon/instCentWeb.conf OK ----------------------------------------------------------- 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 : > y Path /var/run/centreon OK Where is your CentStorage binary directory default to [/usr/share/centreon/bin] > Path /usr/share/centreon/bin OK Where is your CentStorage RRD directory default to [/var/lib/centreon] > Path /var/lib/centreon OK Preparing Centreon temporary files /tmp/centreon-setup exists, it will be moved... install www/install/createTablesCentstorage.sql OK Creating Centreon Directory '/var/lib/centreon/status' OK Creating Centreon Directory '/var/lib/centreon/metrics' OK Install CentStorage binary OK Change right : /var/run/centreon OK Change macros for centstorage init script OK Replace CentStorage sysconfig script Macro OK Do you want me to install CentStorage init script ? [y/n], default to : > y CentStorage init script installed OK CentStorage sysconfig script installed OK Do you want me to install CentStorage run level ? [y/n], default to : > y CentStorage Perl lib installed OK Install logAnalyser OK Install logAnalyserBroker OK Install nagiosPerfTrace OK Change macros for centstorage.cron OK Install CentStorage cron OK Change macros for centstorage.logrotate OK Install Centreon Storage logrotate.d file OK Create /etc/centreon/instCentStorage.conf OK ----------------------------------------------------------- Start CentCore Installation ----------------------------------------------------------- Where is your CentCore binary directory default to [/usr/share/centreon/bin] > Path /usr/share/centreon/bin OK Preparing Centreon temporary files /tmp/centreon-setup exists, it will be moved... Copy CentCore in binary directory OK Change right : /var/run/centreon OK Change right : /var/lib/centreon OK Change macros for centcore.logrotate OK Install Centreon Core logrotate.d file OK Replace CentCore init script Macro OK Replace CentCore sysconfig script Macro OK Do you want me to install CentCore init script ? [y/n], default to : > y CentCore init script installed OK CentCore sysconfig script installed OK Do you want me to install CentCore run level ? [y/n], default to : > y CentCore Perl lib installed OK Create /etc/centreon/instCentCore.conf OK ----------------------------------------------------------- Start CentPlugins Installation ----------------------------------------------------------- Where is your CentPlugins lib directory default to [/var/lib/centreon/centplugins] > Do you want me to create this directory ? [/var/lib/centreon/centplugins] [y/n], default to : > y Path /var/lib/centreon/centplugins OK Preparing Centreon temporary files /tmp/centreon-setup exists, it will be moved... Change macros for CentPlugins OK Installing the plugins OK Change right on centreon.conf OK CentPlugins is installed ----------------------------------------------------------- Start CentPlugins Traps Installation ----------------------------------------------------------- Where is your SNMP configuration directory default to [/etc/snmp] > /etc/snmp OK Where is your CentreonTrapd binaries directory default to [/usr/local/centreon/bin] > /usr/share/centreon/bin /usr/share/centreon/bin OK Finding Apache user : apache Preparing Centreon temporary files /tmp/centreon-setup exists, it will be moved... Change macros for snmptrapd.conf OK Replace CentreonTrapd init script Macro OK Replace CentreonTrapd sysconfig script Macro OK Do you want me to install CentreonTrapd init script ? [y/n], default to : > y CentreonTrapd init script installed OK CentreonTrapd sysconfig script installed OK Do you want me to install CentreonTrapd run level ? [y/n], default to : > y trapd Perl lib installed OK Install : snmptrapd.conf OK Install : centreontrapdforward OK Install : centreontrapd OK Create /etc/centreon/instCentPlugins.conf OK ############################################################################### # # # Go to the URL : http://localhost/centreon/ # # to finish the setup # # # # Report bugs at http://forge.centreon.com # # # # Thanks for using Centreon. # # ----------------------- # # Contact : infos@centreon.com # # http://www.centreon.com # # # ###############################################################################
出现以上信息说明您的Centreon已经安装完成,下面您就可以进行Centreon Web界面设置
相关文章推荐
- Centreon+Nagios实战第三篇——监控端安装Nagios-plugin
- Centreon+Nagios实战第四篇——监控端安装NDOUtils
- Centreon+Nagios实战第二篇——监控端安装Nagios
- Centreon+Nagios实战第八篇——Nagios+Centreon添加监控服务
- Centreon+Nagios监控系统安装与部署文档(二)
- Centreon+Nagios监控系统安装与部署文档(一)
- Centreon+Nagios实战第九篇——利用nrpe插件监控本机
- Centreon+Nagios实战第七篇——安装NRPE
- Nagios+Centreon开源监控系统黄金搭档之完整详细安装部署一[理论基础]
- centreon+nagios安装配置操作手册(2)——配置监控服务
- centreon+nagios安装测试-配置监控服务
- Centreon+Nagios实战第六篇——进行Centreon web界面设置
- Centreon 安装3 (centreon web安装( 基于redhat linux))
- centreon+nagios+mysql 主节点安装全步骤验证
- nagios+centreon总结之第八章――Centreon 添加nagios检查命令
- nagios+centreon总结之第二章――nagios+centreon安装
- nagios+centreon总结之第二章——nagios+centreon安装
- centreon+nagios安装测试-环境搭建
- nagios+centreon监控构建
- nagios+centreon应用实战1