十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
本篇内容介绍了“nagios插件ndoutile的使用方法”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
创新互联建站主要为客户提供服务项目涵盖了网页视觉设计、VI标志设计、网络营销推广、网站程序开发、HTML5响应式重庆网站建设公司、成都做手机网站、微商城、网站托管及成都网站改版、WEB系统开发、域名注册、国内外服务器租用、视频、平面设计、SEO优化排名。设计、前端、后端三个建站步骤的完善服务体系。一人跟踪测试的建站服务标准。已经为塔吊租赁行业客户提供了网站营销推广服务。
cmake安装
./bootstrap ; make ; make install
MySQL安装
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DMYSQL_DATADIR=/data/mysqldb \
-DMYSQL_TCP_PORT=3306 \
-DENABLE_DOWNLOADS=1
make && make install
chown mysql:mysql /usr/local/mysql/ -R
chown mysql:mysql /data/mysqldb/ -R
scripts/mysql_install_db --user=mysql --datadir=/data/mysqldb
service mysqld start
启动报错
The server quit without updating PID file ([FAILED]sqldb/nagios.pid)
解决办法,查看日志。pid进程是否存在。、
wget http://www.cpan.org/modules/by-module/DBD/DBI-1.634.tar.gz
wget http://www.cpan.org/modules/by-module/DBD/DBD-mysql-4.033.tar.gz
cd DBI-1.605
perl Makefile.PL
make
make install
cd DBD-mysql-3.0008
unset LANG
perl Makefile.PL --libs="-L/usr/local/mysql/bin/mysql -lmysqlclient -L/usr/lib -lz" --cflags=-I/usr/local/mysql/include/mysql --mysql_config=/usr/local/mysql/bin/mysql_config --testhost=127.0.0.1 --
testsocket=/usr/local/mysql/tmp/mysql.sock --testdb=nagios --testuser=root --testpassword=123456 :有问题 没继续
make
make install
cd /usr/local/include
# ln -s /usr/local/mysql/include/mysql ./mysql
# cd /usr/lib64
# ln -s /usr/local/mysql/lib/mysql/libmysqlclient.so ./libmysqlclient.so
# ln -s /usr/local/mysql/lib/mysql/libmysqlclient.so.16\
./configure --prefix=/usr/local/nagios --enable-mysql --disable-pgsql LDFLAGS=-L/usr/local/mysql/lib --with-mysql-inc=/usr/local/mysql/include/mysql --with-mysql-lib=/usr/local/mysql/lib/mysql
make
cp ./src/ndomod-3x.o /usr/local/nagios/bin
cp ./src/ndo2db-3x /usr/local/nagios/bin
cp ./src/log2ndo /usr/local/nagios/bin
cp ./src/file2sock /usr/local/nagios/bin
chown nagios:nagios /usr/local/nagios/bin/*
# cp ./config/ndo* /usr/local/nagios/etc/
# chown nagios:nagios /usr/local/nagios/etc/*
mysql -uroot -p
mysql> create database ndodb;
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON nagios.* TO nagios@localhost IDENTIFIED BY '123456';
mysql> flush privileges;
mysql> \q
生成ndoutils所需要的数据库
cd db
./installdb -u n root -p 123456 -h localhost -d ndodb
也可这样:# /opt/mysql/bin/mysql -u root -p -D nagios -h localhost < ./db/mysql.sql
vi /usr/local/nagios/etc/ndo2db.cfg
db_user=nagios
db_pass=123456
vi /usr/local/nagios/etc/nagios.cfg
broker_module=/usr/local/nagios/bin/ndomod-3x.o config_file=/usr/local/nagios/etc/ndomod.cfg
event_broker_options=-1
/usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg
“nagios插件ndoutile的使用方法”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!