标签:lin centos7 ase rac span aliyun server agent 修改
1、操作系统版本为:centos7.5 2、docker版本为:1.13.1 3 、mysql数据库为:5.7
yum install docker -y
systemctl start docker
systemctl enable docker
sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-‘EOF‘ { "registry-mirrors": ["https://3pm9ld7m.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker
docker run --name zabbix-mysql-server --hostname zabbix-mysql-server -v /opt/mysql_db/mysql/conf/etc/mysql/conf.d -v /opt/mysql_db/mysql/datadir:/var/lib/mysql --privileged=true -e MYSQL_ROOT_PASSWORD="123456" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="123456" -e MYSQL_DATABASE="zabbix" -p 3306:3306 -d mysql:5.7 --character-set-server=utf8 --collation-server=utf8_bin
docker run --name zabbix-server-mysql --hostname zabbix-server-mysql --link zabbix-mysql-server:mysql -e DB_SERVER_HOST="mysql" -e MYSQL_USER="zabbix" -e MYSQL_DATABASE="zabbix" -e MYSQL_PASSWORD="123456" -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
最后安装zabbix-web-nginx docker run --name zabbix-web-nginx-mysql --hostname zabbix-web-nginx-mysql --link zabbix-mysql-server:mysql --link zabbix-server-mysql:zabbix-server -e DB_SERVER_HOST="mysql" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="123456" -e MYSQL_DATABASE="zabbix" -e ZBX_SERVER_HOST="zabbix-server" -e PHP_TZ="Asia/Shanghai" -p 8000:80 -p 8443:443 -d zabbix/zabbix-web-nginx-mysql
浏览器访问ip:8000查看
默认登录
username:Admin
password:zabbix
docker run --name zabbix-agent --link zabbix-server-mysql:zabbix-server -d zabbix/zabbix-agent:latest
最后需要在web端将,zabbix-agent添加到zabbix-server的host列表里面。
标签:lin centos7 ase rac span aliyun server agent 修改
原文地址:https://www.cnblogs.com/aiaiduo/p/9084582.html