亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Nagios和Centreon的安裝部署

發布時間:2020-06-07 20:20:53 來源:網絡 閱讀:4616 作者:guhongying009 欄目:移動開發
Centreon是開源的IT監控軟件,由法國人于2003年開發,最初名為Oreon,并于2005年正式更名為centreon。

centreon作為nagios的分布式監控管理平臺,其功能之強大,打造了centreon在IT監控方面強勢地位,它的底層使用nagios監控軟件,nagios通過ndoutil模塊將監控數據寫入數據庫,centreon讀取該數據并即時的展現監控信息,通過centreon可以簡單地管理和配置所有nagios,因此,完全可以使用centreon輕易的搭建企業級分布式IT基礎運維監控系統。

注:以上內容摘自百度百科


一、準備工作:

1)配置yum源

   最好保證此主機能上Internet,因為光盤內的安裝包有些版本比較舊,還有一部分安裝包沒有,所以如果把光盤作為yum源,會在后面的安裝過程中碰到一些麻煩。

[root@Domain01 ~]# cat /etc/yum.repos.d/rhel-internet.repo
[rhel-internet]
name=rhel-internet
baseurl=http://centos.ustc.edu.cn/centos/6/os/x86_64/#中科大yum源
enabled=1
gpgcheck=0

2)安裝包下載

http://pan.baidu.com/s/1qWLefKS

以上連接中包括Nagios,Nagios-Plugins,Centreon,RRDtool,ndoutils源碼安裝包

二、LAMP環境搭建

   如果網絡環境好,且硬盤足夠大建議最大化安裝,因為這樣可以最大化的避免源碼安裝過程中找不到庫文件,centreon配置時找不到對應文件的尷尬。

安裝之前先安裝開發包組:

yum -y groupinstall "Development tools"
yum -y install gd gd-devel

最大化安裝LAMP:

yum -y install httpd*
yum -y install mysql*
yum -y install php*

   由于安裝文件比較多,這幾步視網絡情況可能要花幾分鐘時間,期間可以上個廁所,沏杯茶,或者刷耍微博之類的。

   如果在安裝過程中出現以下錯誤:

Error Downloading Packages:
  bcel-5.2-7.2.el6.x86_64: failure: Packages/bcel-5.2-7.2.el6.x86_64.rpm from rhel-internet: [Errno 256] No more mirrors to try.

請下載對應的安裝包后安裝,bcel的rpm包:http://rpm.pbone.net/index.php3?stat=26&dist=74&size=1426424&name=bcel-5.2-7.2.el6.x86_64.rpm 右鍵另存為即可。

安裝過程中如存在依賴關系請使用yum安裝:

yum -y install bcel-5.2-7.2.el6.x86_64.rpm

安裝完成后記得將httpd,mysqld,加入開機啟動中:

[root@Domain01 ~]# chkconfig httpd on
[root@Domain01 ~]# chkconfig mysqld on

開啟httpd服務并測試:

service httpd start
service mysqld start
mysqladmin -uroot password 123456

看到如下界面說明安裝成功

Nagios和Centreon的安裝部署


三、Nagios及相關插件安裝

Nagios安裝:    

useradd -s /sbin/nologin -G apache nagios #增加Nagios用戶,并將其加入apache組中
tar xf nagios-3.4.4.tar.gz
tar xf nagios-3.4.4.tar.gz
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make all
make install
make install-init && make install-commandmode &&  make install-config && make install-webconf

Nagios-plugins安裝

tar xf nagios-plugins-1.5.tar.gz
cd nagios-plugins-1.5
./configure --prefix=/usr/local/nagios/ --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

相關配置:

創建Nagios web登錄用戶并設置密碼

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

防火墻和Selinux設置:

iptables -F  #清除防火墻規則,生產環境慎用
iptables -A INPUT -p tcp --dport 80 -j ACCEPT #開啟80端口
setenforce 0 #關閉selinux
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/sysconfig/selinux #在配置文件中永久關閉selinux

ndoutils安裝

tar xf ndoutils-1.5.2.tar.gz
cd ndoutils-1.5.2
./configure --prefix=/usr/local/nagios --with-mysql-lib=/usr/lib/mysql --with-mysql-inc=/usr/include/mysql
make
cp src/ndo2db-3x src/file2sock src/log2ndo src/ndomod-3x.o /usr/local/nagios/bin/
cp config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
cp config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
chown nagios.nagios /usr/local/nagios/bin/* /usr/local/nagios/etc/ndo*
vim /usr/local/nagios/etc/ndo2db.cfg
--------------------------------------------------------------------------------------------------
     120 db_user=nagios
     121 db_pass=123456
mysql -uroot
     mysql> create database nagios;
     mysql> grant all on nagios.* to nagios@localhost identified by '123456';
     mysql> flush privileges;
     mysql> q
mysql -unagios -p123456 nagios < db/mysql.sql
vim /usr/local/nagios/etc/nagios.cfg
--------------------------------------------------------------------------------------------------
    219 event_broker_options=-1
    220broker_module=/usr/local/nagios/bin/ndomod3x.o
    config_file=/usr/local/nagios/etc/ndomod.cfg  #增加本行代碼
/usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg

RRDTool安裝:

tar xf rrdtool-1.4.7.tar.gz
cd rrdtool-1.4.7
./configure --prefix=/usr/local/rrdtool && make && make install


四、Centreon安裝

chmod o=rwx /usr/local/centreon/log
tar -zxvf centreon-2.4.0.tar.gz
cd centreon-2.4.0
./install.sh -i
Do you accept GPL license ?
[y/n], default to [n]:
> y
------------------------------------------------------------------------
        Please choose what you want to install
------------------------------------------------------------------------
Do you want to install : Centreon Web Front
[y/n], default to [n]:
> y
Do you want to install : Centreon CentCore
[y/n], default to [n]:
> y
Do you want to install : Centreon Nagios Plugins
[y/n], default to [n]:
> y
Do you want to install : Centreon Snmp Traps process
[y/n], default to [n]:
> y
------------------------------------------------------------------------
        Start CentWeb Installation
------------------------------------------------------------------------
Where is your Centreon directory?
default to [/usr/local/centreon]
>
Path /usr/local/centreon                                   OK
Where is your Centreon log directory
default to [/usr/local/centreon/log]
>
Path /usr/local/centreon/log                               OK
Where is your Centreon etc directory
default to [/etc/centreon]
>
Path /etc/centreon                                         OK
Where is your Centreon binaries directory
default to [/usr/local/centreon/bin]
>
Path /usr/local/centreon/bin                               OK
Where is your Centreon data informations directory
default to [/usr/local/centreon/data]
>
Path /usr/local/centreon/data                              OK
Where is your Centreon generation_files directory?
default to [/usr/local/centreon]
>
Path /usr/local/centreon                                   OK
Where is your Centreon variable library directory?
default to [/var/lib/centreon]
>
Path /var/lib/centreon                                     OK
Where is your CentPlugins Traps binary
default to [/usr/local/centreon/bin]
>
Path /usr/local/centreon/bin                               OK
Where is the RRD perl module installed [RRDs.pm]
default to [/usr/lib/perl5/RRDs.pm]
> /usr/local/rrdtool/lib/perl/5.10.1/i386-linux-thread-multi/RRDs.pm
Path /usr/local/rrdtool/lib/perl/5.10.1/i386-linux-thread-mOKti
/usr/bin/rrdtool                                           OK
/bin/mail                                                  OK
/usr/bin/php                                               OK
/usr/bin/perl                                              OK
Finding Apache user :                                      apache
Finding Apache group :                                     apache
What is the Centreon group ? [centreon]
default to [centreon]
>
What is the Centreon user ? [centreon]
default to [centreon]
>
What is the Monitoring engine user ?
> centreon                                                    #安裝centreon的用戶
What is the Broker user ? (optional)
>
What is the Monitoring engine log directory ?
> /usr/local/centreon/log                                    #日志存放目錄             
Where is your monitoring plugins (libexec) directory ?
default to [/usr/lib/nagios/plugins]
> /usr/local/nagios/libexec/                                  #libexec路徑
Path /usr/local/nagios/libexec/                            OK
Add group centreon to user apache                          OK
Add group centreon to user centreon                        OK
Add group centreon to user apache                          OK
Add group centreon 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                                           #nagios初始路徑在哪
What is the Monitoring engine binary ?                     
> /usr/local/nagios/bin/nagios                                 #nagios命令的路徑
What is the Monitoring engine configuration directory ?
> /usr/local/nagios/etc/                                       #nagios的etc目錄
Where is the configuration directory for broker module ?
> /usr/local/nagios/etc/                                       #ndoutils的路徑
Where is the init script for broker module daemon ?
> /usr/local/nagios/bin/ndo2db-3x
Your sudo is not configured
Do you want me to configure your sudo ? (WARNING)
[y/n], default to [n]:
> y
Configuring Sudo                                           OK
------------------------------------------------------------------------
        Configure Apache server
------------------------------------------------------------------------
Do you want to add Centreon Apache sub configuration file ?
[y/n], default to [n]:
> y
Create '/etc/httpd/conf.d/centreon.conf'                   OK
Configuring Apache                                         OK
Do you want to reload your Apache ?
[y/n], default to [n]:
> y
Configuring Sudo                                           OK
------------------------------------------------------------------------
 Configure Apache server
------------------------------------------------------------------------
Do you want to add Centreon Apache sub configuration file ?
[y/n], default to [n]:
> y
Create '/etc/httpd/conf.d/centreon.conf'                   OK
Configuring Apache                                         OK
Do you want to reload your Apache ?
[y/n], default to [n]:
> y
Reloading Apache service                                   OK
Preparing Centreon temporary files
Change right on /usr/local/centreon/log                    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 right on /usr/local/nagios/etc                      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
Change macros for eventReportBuilder.pl                    OK
Change macros for dashboardBuilder.pl                      OK
Install cron directory                                     OK
Change right for eventReportBuilder.pl                     OK
Change right for dashboardBuilder.pl                       OK
Change macros for centreon.logrotate                       OK
Install Centreon logrotate.d file                          OK
Prepare export-mysql-indexes                               OK
Install export-mysql-indexes                               OK
Prepare import-mysql-indexes                               OK
Install import-mysql-indexes                               OK
Prepare indexes schema                                     OK
Install indexes schema                                     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.3.7          OK
Auth_SASL                       1.0.1                      NOK
Console_Getopt                  1.2         1.2.3          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.4          OK
SOAP                            0.10.1                     NOK
Log                             1.9.11                     NOK
Archive_Zip                     0.1.2                      NOK
Do you want me to install/upgrade your PEAR modules
[y/n], default to [y]:
> y
Upgrading PEAR modules
Installing PEAR modules
DB                              1.7.6       1.7.14         OK
DB_DataObject                   1.8.4       1.11.2         OK
DB_DataObject_FormBuilder       1.0.0RC4    1.0.2          OK
MDB2                            2.0.0       2.4.1          OK
HTML_QuickForm_advmultiselect   1.1.0       1.5.1          OK
HTML_Table                      1.6.1       1.8.3          OK
Auth_SASL                       1.0.1       1.0.6          OK
Net_SMTP                        1.2.8       1.6.2          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
SOAP                            0.10.1      0.13.0         OK
Log                             1.9.11      1.12.7         OK
Archive_Zip                     0.1.2       0.1.2          OK
Check PEAR modules
PEAR                            1.4.9       1.9.4          OK
DB                              1.7.6       1.7.14         OK
DB_DataObject                   1.8.4       1.11.2         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.13         OK
HTML_QuickForm_advmultiselect   1.1.0       1.5.1          OK
HTML_Table                      1.6.1       1.8.3          OK
Archive_Tar                     1.1         1.3.7          OK
Auth_SASL                       1.0.1       1.0.6          OK
Console_Getopt                  1.2         1.2.3          OK
Net_SMTP                        1.2.8       1.6.2          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.4          OK
SOAP                            0.10.1      0.13.0         OK
Log                             1.9.11      1.12.7         OK
Archive_Zip                     0.1.2       0.1.2          OK
All PEAR modules                                           OK
------------------------------------------------------------------------
                Centreon Post Install
------------------------------------------------------------------------
Create /usr/local/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 [n]:
> y
Path /var/run/centreon                                     OK
Where is your CentStorage binary directory
default to [/usr/local/centreon/bin]
> y
You select slash...
Where is your CentStorage binary directory
default to [/usr/local/centreon/bin]
>
Path /usr/local/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
Change macros for centstorage binary                       OK
Install CentStorage binary                                 OK
Install library for centstorage                            OK
Change right : /var/run/centreon                           OK
Change macros for centstorage init script                  OK
Do you want me to install CentStorage init script ?
[y/n], default to [n]:
> y
CentStorage init script installed                          OK
Do you want me to install CentStorage run level ?
[y/n], default to [n]:
> y
Change macros for logAnalyser                              OK
Install logAnalyser                                        OK
Change macros for logAnalyser-cbroker                      OK
Install logAnalyser-cbroker                                OK
Change macros for nagiosPerfTrace                          OK
Install nagiosPerfTrace                                    OK
Change macros for purgeLogs                                OK
Install purgeLogs                                          OK
Change macros for purgeCentstorage                         OK
Install purgeCentstorage                                   OK
Change macros for centreonPurge.sh                         OK
Install centreonPurge.sh                                   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/local/centreon/bin]
>
Path /usr/local/centreon/bin                               OK
/usr/bin/ssh                                               OK
/usr/bin/scp                                               OK
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change CentCore Macro                                      OK
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
Do you want me to install CentCore init script ?
[y/n], default to [n]:
> y
CentCore init script installed                             OK
Do you want me to install CentCore run level ?
[y/n], default to [n]:
> y
Create /etc/centreon/instCentCore.conf                     OK
------------------------------------------------------------------------
        Start CentPlugins Installation
------------------------------------------------------------------------
Where is your CentPlugins lib directory
default to [/var/lib/centreon/centplugins]
> y
You select slash...
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 [n]:
> 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 SNMPTT binaries directory
default to [/usr/local/centreon/bin/]
>
/usr/local/centreon/bin/                                   OK
Finding Apache user :                                      apache
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for CentPluginsTraps                         OK
Change macros for init scripts                             OK
Installing the plugins Trap binaries                       OK
Change macros for snmptrapd.conf                           OK
Change macros for snmptt.ini                               OK
SNMPTT init script installed                               OK
Install : snmptrapd.conf                                   OK
Install : snmp.conf                                        OK
Install : snmptt.ini                                       OK
Install : snmptt                                           OK
Install : snmptthandler                                    OK
Install : snmpttconvertmib                                 OK
Create /etc/centreon/instCentPlugins.conf                  OK
hostname: Unknown host
###############################################################################
#                                                                             #
#                 Go to the URL : http:///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安裝完成。最后登錄http://IP/centreon做初始化。


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

封丘县| 互助| 南投市| 铁力市| 龙川县| 湖口县| 偃师市| 策勒县| 喜德县| 搜索| 当雄县| 夏津县| 宜良县| 手机| 岱山县| 井研县| 山阳县| 双江| 吉木乃县| 杂多县| 博湖县| 门源| 海林市| 邵阳市| 柘城县| 延寿县| 松江区| 泗水县| 兴隆县| 丹凤县| 汝州市| 桃园市| 潼关县| 杂多县| 郴州市| 门头沟区| 阳春市| 佛学| 图们市| 澳门| 商都县|