docker部署zabbix4.4
docker部署zabbix4.4
安装docker-ce
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce
systemctl start docker
docker安装mysql5.7
docker run --name mysql-server -t
-e MYSQL_DATABASE="zabbix"
-e MYSQL_USER="zabbix"
-e MYSQL_PASSWORD="zabbix"
-e MYSQL_ROOT_PASSWORD="zabbix"
-v /data/docker/mysql/zabbix/data:/var/lib/mysql
-p 3306:3306
-d mysql:5.7
--character-set-server=utf8 --collation-server=utf8_bin
docker安装zabbix-server-mysql
docker run --name zabbix-server-mysql -t
--link mysql-server:mysql
-e DB_SERVER_HOST="mysql-server"
-e MYSQL_DATABASE="zabbix"
-e MYSQL_USER="zabbix"
-e MYSQL_PASSWORD="zabbix"
-e MYSQL_ROOT_PASSWORD="zabbix"
-v /etc/localtime:/etc/localtime:ro
-v /data/docker/zabbix/alertscripts:/usr/lib/zabbix/alertscripts
-v /data/docker/zabbix/externalscripts:/usr/lib/zabbix/externalscripts
-p 10051:10051
-d
zabbix/zabbix-server-mysql:centos-4.4-latest
docker安装zabbix-web-nginx-mysql
docker run --name zabbix-web-nginx-mysql -t
--link mysql-server:mysql
--link zabbix-server-mysql:zabbix-server
-e DB_SERVER_HOST="mysql-server"
-e MYSQL_DATABASE="zabbix"
-e MYSQL_USER="zabbix"
-e MYSQL_PASSWORD="zabbix"
-e MYSQL_ROOT_PASSWORD="zabbix"
-e PHP_TZ="Asia/Singapore"
-p 80:80
-d
zabbix/zabbix-web-nginx-mysql:centos-4.4-latest
客户端安装zabbix-agent, 我这边的客户端是用docker安装的
docker run --name zabbix-agent
-e ZBX_HOSTNAME="agent01"
-e ZBX_SERVER_HOST="192.168.1.48"
-e ZBX_METADATA="agent01"
-p 10050:10050
-d zabbix/zabbix-agent:centos-4.4-latest
访问zabbix-server的ip地址,默认用户admin, 密码: zabbix
以上是 docker部署zabbix4.4 的全部内容, 来源链接: utcz.com/z/517564.html