标签:grep enable mysqld raw 配置 .com input latest 指标
如图所示:
zabbix_server端在阿里云上,其代理程序部署在各地机房,代理程序收集所在机房的所有机器监控指标,然后传给server端
环境说明:
CentOS release 6.9 (Final) [root@check3 ~]# uname -a Linux check3 2.6.32-696.16.1.el6.x86_64 #1 SMP Wed Nov 15 16:51:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
与安装zabbix_server端相差不多,有些不解释
[root@check3 ~]# mkdir zabbix [root@check3 ~]# cd zabbix/ [root@check3 zabbix]# rpm -ivh http://repo.webtatic.com/yum/el6/latest.rpm [root@check3 zabbix]# yum -y install php56w php56w-gd php56w-mysql php56w-bcmath php56w-mbstring php56w-xml php56w-ldap [root@check3 zabbix]# vim /etc/php.ini date.timezone = Asia/Shanghai post_max_size = 32M max_execution_time = 300 max_input_time = 300 always_populate_raw_post_data = -1 [root@check3 zabbix]# rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm [root@check3 zabbix]# yum -y install mysql-server mysql-devel [root@check3 zabbix]# vim /etc/my.cnf [mysqld] innodb_file_per_table [root@check3 zabbix]# service mysqld start [root@check3 zabbix]# mysql_secure_installation [root@check3 zabbix]# mysql -uroot -p mysql> CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY ‘zabbix‘; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> quit Bye
编译安装zabbix_proxy
[root@check3 zabbix]# useradd -m -s /sbin/nologin zabbix [root@check3 zabbix]# yum -y install httpd libxml2-devel net-snmp-devel libcurl-devel [root@check3 zabbix]# wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.2.0/zabbix-3.2.0.tar.gz [root@check3 zabbix]# tar xf zabbix-3.2.0.tar.gz [root@check3 zabbix]# cd zabbix-3.2.0 [root@check3 zabbix-3.2.0]# /usr/bin/mysql -uzabbix -p zabbix < database/mysql/schema.sql #只导入这一个!!! Enter password: [root@check3 zabbix-3.2.0]# ./configure --prefix=/usr/local/zabbix --sysconfdir=/etc/zabbix --enable-proxy --enable-agent --enable-get --with-mysql --with-net-snmp --with-libcurl --with-libxml2 [root@check3 zabbix-3.2.0]# make [root@check3 zabbix-3.2.0]# make install
配置zabbix_proxy
[root@check3 ~]# vim /etc/zabbix/zabbix_proxy.conf 24 Server=192.168.8.10 #zabbix_server的IP地址 43 Hostname=check3 #本机的名字 85 LogFile=/tmp/zabbix_proxy.log #日志存放位置 124 DBHost=localhost #zabbix_proxy数据库的网络位置 135 DBName=zabbix #数据库名字 150 DBUser=zabbix #数据库用户 160 DBPassword=zabbix #数据库密码 216 ConfigFrequency=60 #主动去server端拉取配置更新的频率,建议一分钟一次 227 DataSenderFrequency=2 #发送采集的监控数据到服务端,默认为1秒,看情况设置 185 # ProxyLocalBuffer=0 #代理配置文件中的这一项和下面一项参数控制数据在本地保留多长时间 194 # ProxyOfflineBuffer=1 [root@check3 ~]# /usr/local/zabbix/sbin/zabbix_proxy #启动代理程序 [root@check3 ~]# netstat -anpt | grep zabbix tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 14875/zabbix_proxy
标签:grep enable mysqld raw 配置 .com input latest 指标
原文地址:https://www.cnblogs.com/LuckWJL/p/9055587.html