真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

TheNagiosMonitoring數(shù)據(jù)如何寫進(jìn)Mysql中

下文主要給大家?guī)鞹he Nagios Monitoring數(shù)據(jù)如何寫進(jìn)MySQL中,希望這些內(nèi)容能夠帶給大家實(shí)際用處,這也是我編輯The Nagios Monitoring數(shù)據(jù)如何寫進(jìn)Mysql中這篇文章的主要目的。好了,廢話不多說,大家直接看下文吧。

成都網(wǎng)站建設(shè)哪家好,找創(chuàng)新互聯(lián)!專注于網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)公司、微信開發(fā)、小程序設(shè)計(jì)、集團(tuán)成都定制網(wǎng)頁設(shè)計(jì)等服務(wù)項(xiàng)目。核心團(tuán)隊(duì)均擁有互聯(lián)網(wǎng)行業(yè)多年經(jīng)驗(yàn),服務(wù)眾多知名企業(yè)客戶;涵蓋的客戶類型包括:成都公路鉆孔機(jī)等眾多領(lǐng)域,積累了大量豐富的經(jīng)驗(yàn),同時(shí)也獲得了客戶的一致贊美!

-------------------------------CMAKE-------------------------------

Install the compiler tool:

#tar xzf cmake-2.8.10.2.tar.gz 
#cd cmake-2.8.10.2
#./bootstrap
#make
#make install
-------------------------------Mysql-------------------------------
Preparatory work:
#groupadd mysql
#useradd -r -g mysql mysql
#mkdir /etc/mysql
#chown mysql:mysql /etc/mysql
 
Compile & Install:
#tar xzf mysql-5.6.10.tar.gz
#cd mysql-5.6.10
#cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/var/mysql/data \
-DSYSCONFDIR=/etc/mysql \
-DEXTRA_CHARSETS=all \
-DENABLED_LOCAL_INFILE=1
#make
#make install
 
Database initialization:
#chown -R mysql:mysql /usr/local/mysql
#mkdir -p /var/mysql/data
#chown -R mysql:mysql /var/mysql
#cd /usr/local/mysql/scripts
#./mysql_install_db --user=mysql \
--basedir=/usr/local/mysql \
--datadir=/var/mysql/data \
--skip-name-resolve
#mv ../support-files/my-default.cnf /etc/mysql/my.cnf
#mv ../support-files/mysql.server /etc/rc.d/init.d/mysqld
#service mysqld start
 
Change Password & verify that the installation was successful:
#/usr/local/mysql/bin/mysqladmin -u root password 'mysql'
#/usr/local/mysql/bin/mysql -uroot -pmysql
>status
 
-------------------------------Ndoutils-------------------------------
The ndoutils installation:
#tar xzf ndoutils-1.5.2.tar.gz
#cd ndoutils-1.5.2
#./configure --prefix=/usr/local/nagios \
--with-mysql=/usr/local/mysql \
--sysconfdir=/etc/nagios \
--with-ndo2db-user=nagios \
--with-ndo2db-group=nagios \
--enable-mysql
 
Modify the installation configuration file, otherwise it will make an error:
#vi include/config.h
#Original configuration is as follows:
#include
#include
#Modified as follows
#include
#include
 
Installation:
#make
  
Copy the compiled daemon to your Nagios installation:
#cp src/ndomod-3x.o /usr/local/nagios/bin/
#cp src/ndo2db-3x /usr/local/nagios/bin/ndo2db
#chown nagios:nagios /usr/local/nagios/bin/ndo*
 
Copy the default configuration file to the configuration directory that you specify:
#cp config/ndo2db.cfg-sample /etc/nagios/ndo2db.cfg
#cp config/ndomod.cfg-sample /etc/nagios/ndomod.cfg
#chown nagios:nagios /etc/nagios/ndo*
 
Increase to start the service:
#cp daemon-init /etc/init.d/ndo2db
#chmod u+x /etc/init.d/ndo2db
 
Create a database:
#export PATH=$PATH:/usr/local/mysql/bin/
#mysql -uroot -pmysql
>create database nagios;
>quit
 
Creating a database structure:
#cd db
#mysql -uroot -p nagios<./mysql.sql
 
Modify the Nagios configuration file:
#vim /etc/nagios/nagios.cfg
#Add by Kingcraft
broker_module=/usr/local/nagios/bin/ndomod-3x.o config_file=/etc/nagios/ndomod.cfg
 
Empowering for the database user nagios:
#mysql -u root -pmysql
>grant all privileges on nagios.* to 'nagios'@'127.0.0.1' identified by 'nagios';
>quit
 
Modify the Ndoutils configuration file:
#vim /etc/nagios/ndo2db.cfg
db_user=nagios
db_pass=nagios
db_host=127.0.0.1
 
#vim /etc/nagios/ndomod.cfg
output=127.0.0.1
 
Create soft links, or can not start:
#ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64
 
Verify whether the nagios data can be written to the database:
#service ndo2db start
#service nagios restart
 
#mysql -u root -pmysql
>use nagios
>select host_id,display_name,address from nagios_hosts;
+---------+-----------------+-----------------+
| host_id | display_name    | address         |
+---------+-----------------+-----------------+
|       1 | Linuxhost       | 192.168.174.130 |
|       2 | linksys-srw224p | 192.168.60.16   |
+---------+-----------------+-----------------+
對于以上關(guān)于The Nagios Monitoring數(shù)據(jù)如何寫進(jìn)Mysql中,大家是不是覺得非常有幫助。如果需要了解更多內(nèi)容,請繼續(xù)關(guān)注我們的行業(yè)資訊,相信你會(huì)喜歡上這些內(nèi)容的。


新聞名稱:TheNagiosMonitoring數(shù)據(jù)如何寫進(jìn)Mysql中
文章位置:http://weahome.cn/article/jodppj.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部