docker部署zabbix

docker部署

docker run --name zabbix-appliance -it \
-p 10051:10051 \
-p 8008:80 \
-e PHP_TZ="Asia/Shanghai" \
-e ZBX_CACHESIZE=512M \
--restart unless-stopped \
-v /etc/localtime:/etc/localtime:ro \
-v zabbix_sh:/usr/lib/zabbix/externalscripts \
-d zabbix/zabbix-appliance:latest

docker-server端安装agent-被动模式

wget https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-agent-4.4.4-1.el7.x86_64.rpm 
rpm -Uvh zabbix-agent-4.4.3-1.el7.x86_64.rpm 
(yum install -y abbix-agent-4.4.3-1.el7.x86_64.rpm)
vim /etc/zabbix/zabbix_agent.conf
server地址设为docker ip
web界面主机地址设置为172.17.0.1

web时间问题

vi /etc/php7/conf.d/99-zabbix.ini
date.timezone=Asia/Shanghai
ps -ef | grep php*
kill - 9 
cd /usr/sbin/
./php-fpm
重启容器后,发现修改会被覆盖,再次修改上述文件

字体乱码解决,替换字体

/usr/share/zabbix/assets/fonts
docker cp DejaVuSans.ttf zabbix01:/usr/share/zabbix/assets/fonts/
posted @ 2019-12-06 22:10  kylingx  阅读(547)  评论(0编辑  收藏  举报