docker run -d -v /home/zabbix/mysql --name zabbix-db-storage busybox:latest docker run -d --name zabbix-db -v /home/zabbix/backups:/backups -v /etc/localtime:/etc/localtime:ro --volumes-from zabbix-db-storage --env="MARIADB_USER=zabbix" --env="MARIADB_PASS=my_password" monitoringartist/zabbix-db-mariadb docker run -d --name zabbix -p 80:80 -p 10051:10051 -v /etc/localtime:/etc/localtime:ro --link zabbix-db:zabbix.db --env="ZS_DBHost=zabbix.db" --env="ZS_DBUser=zabbix" --env="ZS_DBPassword=my_password" --env="PHP_memory_limit=512M" monitoringartist/zabbix-xxl:latest
往容器内拷贝字体
docker cp simkai.ttf zabbix:/usr/local/src/zabbix/frontends/php/fonts/
字体路径
/usr/local/src/zabbix/frontends/php/fonts/simkai.ttf
进入docker
docker exec -it zabbix /bin/bash
php配置文件路径,修改字体文件
vi /usr/local/src/zabbix/frontends/php/include/defines.inc.php
define(‘ZBX_GRAPH_FONT_NAME‘, ‘simkai‘); define(‘ZBX_FONT_NAME‘, ‘simkai‘);
zabbix-server配置文件
vi /usr/local/etc/zabbix_server.conf
zabbix-server报警文件
cd /usr/local/share/zabbix/alertscripts/
scp 172.18.1.20:/remote/scripts/sendmail.sh ./
重启docker
docker restart zabbix
原文:https://www.cnblogs.com/karl-python/p/10521614.html