First, the system configuration
Ubuntu 16.04 LTS
Dockers 1.11.2
Mariadb
Second, install Docker (APT mode +curl mode)
1, Apt mode installation
1.1. Install the HTTPS certificate:
$ sudo apt-get update
$ sudo apt-get install Apt-transport-https ca-certificates
1.2. Install the official Docker apt source public key:
$ sudo apt-key adv--keyserver hkp://p80.pool.sks-keyservers.net:80--recv-keys 58118e89f3a912897c070adbf76221572c52609d
1.3. Add Docker Source:vi/etc/apt/sources.list.d/docker.list
Plus deb Https://apt.dockerproject.org/repo ubuntu-wily Main
1.4. Cache Apt-get Source:
$ apt-get Update
$ apt-get Purge Lxc-docker
$ Apt-cache Policy Docker-engine
1.5. Update Source list:sudo apt-get update
1.6, 16.04 LTS need to install the kernel Patch:sudo apt-get install linux-image-extra-$ (uname-r)
1.7. Installing Docker:sudo apt-get install Docker-engine
1.8. Verify the results of the installation:$ sudo docker-v
1.9. Start Docker:$ sudo systemctl start docker
1.10. Set boot from:$ sudo systemctl enable Docker
1.11, adjust the kernel:
(1), modify the user group------the XXXX user (that is, your Ubuntu System login username) added to the Docker group
$ sudo usermod-ag docker xxxx
(2), adjust the memory and exchange statistics
To enable memory and swap on system using GNU GRUB (GNU GRand Unified Bootloader), do the following:
$ vi/etc/default/grub
Modify grub_cmdline_linux= "Cgroup_enable=memory swapaccount=1"
(3), Update GRUB
$ sudo update-grub
2, Curl mode installation
2.1. Check if the Curl Pack is installed:
$ which Curl
If curl is not installed, install the Curl package after updating the apt source
2.2. Install Curl Package:
$ sudo apt-get update
$ sudo apt-get Install curl
2.3. Get the latest Docker installation package:
$ curl-ssl https:// get.docker.com/ | Sh
The shell prompts you to enter a password for sudo and then starts the installation process.
2.4. Confirm that Docker is installed successfully:
$ sudo docker run Hello-world
This command downloads a test image and launches a container to run it.
2.5, adjust the kernel:
(1), modify the user group------the XXXX user (that is, your Ubuntu System login username) added to the Docker group
$ sudo usermod-ag docker xxxx
(2), adjust the memory and exchange statistics
To enable memory and swap on system using GNU GRUB (GNU GRand Unified Bootloader), do the following:
$ vi/etc/default/grub
Modify grub_cmdline_linux= "Cgroup_enable=memory swapaccount=1"
(3), Update GRUB
$ sudo update-grub
Third, installation zabbix3.0
1. Download image
Docker pull zabbix/zabbix-3.0------Download Zabbix image
Docker pull zabbix-db-mariadb------Download mariadb
Docker Pull Busybox:latest
2, Installation Zabbix-db-storage
Mkdir/data/docker/mysql---Creating a MySQL file directory
Docker run-d-v/data/docker/mysql--name zabbix-db-storage busybox:latest
3, Installation Zabbix-db
Docker run-d \
--restart=always \
--name zabbix-db \
-v/data/backups:/backups \
-v/etc/localtime:/etc/localtime:ro \
--volumes-from zabbix-db-storage \
--env= "Mariadb_user=zabbix" \
--env= "Mariadb_pass=admin" \
Zabbix/zabbix-db-mariadb
4, Installation zabbix3.0
Docker run-d \
--restart=always \
--name Zabbix \
-P 8,080:80 \
-P 10,051:10,051 \
-v/zabbix/tmp:/usr/local/src/zabbix/frontends/php/fonts \
-v/etc/localtime:/etc/localtime:ro \
--link zabbix-db:zabbix.db \
--env= "Zs_dbhost=zabbix.db" \
--env= "Zs_dbuser=zabbix" \
--env= "Zs_dbpassword=admin" \
Zabbix/zabbix-3.0:latest
Note:
Docker exec-it Zabbix bash-----into Docker
-v/data/backups:/backups \----Mapping database backup path: Before the host's path (can be changed)
To change the Chinese font:
$ rz-y---Put the font into Ubuntu (to install Lrzsz package, $ sudo apt-get install lrzsz)
$ cp/home/docker/simkai.ttf/zabbix/tmp/
# vi/usr/local/src/zabbix/frontends/php/include/locales.inc.php
# # # #将false改为true #####
' ZH_CN ' + = [' name ' = ' = ' (' Chinese (zh_cn) '), ' display ' = True],
Sed-i ' s/dejavusans/simkai/g '/usr/local/src/zabbix/frontends/php/include/defines.inc.php
This article is from the "Township of it Youth" blog, please be sure to keep this source http://cai53.blog.51cto.com/8565836/1831834
Ubuntu under Installation configuration Deployment zabbix3.0--based on Docker