### 前期准备
```
# 直接yum安装
```
### 安装
```
# 安装 sqlite zabbix-proxy-sqlite3
yum -y install sqlite sqlite-devel zabbix-proxy-sqlite3
# 配置数据库
mkdir -p /var/lib/sqlite
zcat /usr/share/doc/zabbix-proxy-sqlite3-3.0.4/schema.sql.gz |sqlite3 /var/lib/sqlite/zabbix.db
chmod 777 -R /var/lib/sqlite/
```
### 配置
```
# zabbix_proxy.conf
ProxyMode=0
Server=110.100.100.100 # zabbix_server的ip
ServerPort=10051 # zabbix_server的端口
Hostname=luwen-cs-proxy # 在zabbix_server上显示的主机名
ListenIP=10.28.100.1,127.0.0.1
LogFile=/var/log/zabbix/zabbix_proxy.log
LogFileSize=0
PidFile=/var/run/zabbix/zabbix_proxy.pid
DBName=/var/lib/sqlite/zabbix.db
ProxyOfflineBuffer=1
CacheSize=128M
ConfigFrequency=60 # 配置同步频率
DataSenderFrequency=10 # 数据同步频率
SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
Timeout=4
ExternalScripts=/usr/lib/zabbix/externalscripts
LogSlowQueries=3000
```
zabbix端口10051 zabbix agent端口10050