设为首页 加入收藏

TOP

数据库监控(Zabbix)(一)
2019-03-05 16:09:41 】 浏览:29
Tags:数据库 监控 Zabbix
[root@wallet04 ~]# rpm -ivh epel-release-6-8.noarch.rpm

[root@wallet04 ~]# rpm -ivh https://mirror.webtatic.com/yum/el6/latest.rpm

[root@wallet04 ~]# yum install -y httpd php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-devel.x86_64 \

php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-bcmath.x86_64 php56w-xml.x86_64 \

php56w-mysqlnd.x86_64 php56w-pdo.x86_64

[root@wallet04 ~]# vi /etc/httpd/conf/httpd.conf

ServerName 192.168.1.204:80

[root@wallet04 ~]# vi /etc/php.ini

date.timezone = Asia/Shanghai

max_execution_time = 300

max_input_time = 300

post_max_size = 32M

memory_limit = 128M

mbstring.func_overload = off

always_populate_raw_post_data = -1

[root@wallet04 ~]# service httpd start

[root@wallet04 ~]# rpm -ivh https://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

[root@wallet04 ~]# yum install -y mysql-community-server

[root@wallet04 ~]# service mysqld start

[root@wallet04 ~]# /usr/bin/mysql_secure_installation

[root@wallet04 ~]# mysql -uroot -pabcd.1234

mysql> create database zabbix default character set utf8;

Query OK, 1 row affected (0.05 sec)

mysql> grant all on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix';

Query OK, 0 rows affected (0.10 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.01 sec)

[root@wallet04 ~]# yum install -y net-snmp net-snmp-utils net-snmp-devel

[root@wallet04 ~]# tar zxvf zabbix-3.0.16.tar.gz

[root@wallet04 ~]# cd zabbix-3.0.16

[root@wallet04 zabbix-3.0.16]# ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2

[root@wallet04 zabbix-3.0.16]# make install

[root@wallet04 zabbix-3.0.16]# mysql -uroot -p zabbix < database/mysql/schema.sql

[root@wallet04 zabbix-3.0.16]# mysql -uroot -p zabbix < database/mysql/images.sql

[root@wallet04 zabbix-3.0.16]# mysql -uroot -p zabbix < database/mysql/data.sql

[root@wallet04 zabbix-3.0.16]# cp misc/init.d/fedora/core/zabbix_* /etc/init.d/

[root@wallet04 zabbix-3.0.16]# cp -r frontends/php /var/www/html/zabbix

[root@wallet04 ~]# vi /usr/local/etc/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix

[root@wallet04 ~]# service zabbix_server start

Starting zabbix_server: [ OK ]

[root@wallet04 ~]# netstat -tupln |grep zabbix_server

tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 16927/zabbix_server

[root@wallet04 ~]# service zabbix_agentd start

Starting zabbix_agentd: [ OK ]

[root@wallet04 ~]# netstat -tupln |grep zabbix_agentd

tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 16999/zabbix_agentd

[root@wallet01 ~]# yum install -y golang

[root@wallet01 ~]# go version

go version go1.11.2 linux/amd64

[root@wallet01 ~]# export GOPATH=/home/go

[root@wallet01 ~]# go get -u github.com/go-sql-driver/mysql

[root@wallet01 ~]# git clone https://github.com/actiontech/actiontech_zabbix_mysql_monitor.git

Initialized empty Git repository in /root/actiontech_zabbix_mysql_monitor/.git/

remote: Enumerating objects: 193, done.

remote: Total 193 (delta 0), reused 0 (delta 0), pack-reused 193

Receiving objects: 100% (193/193), 10.78 MiB | 185 KiB/s, done.

Resolving deltas: 100% (115/115), done.

[root@wallet01 ~]# cd actiontech_zabbix_mysql_monitor

[root@wallet01 actiontech_zabbix_mysql_monitor]# chmod a+x *.sh

[root@wallet01 actiontech_zabbi
编程开发网

首页 上一页 1 2 3 下一页 尾页 1/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇事务隔离级别 下一篇MySQL 5.7使用or是否会用到索引并..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

array(4) { ["type"]=> int(8) ["message"]=> string(24) "Undefined variable: jobs" ["file"]=> string(32) "/mnt/wp/cppentry/do/bencandy.php" ["line"]=> int(214) }