zabbix install(ft. docker)# Virtualation/Docker2024. 3. 25. 09:06
Table of Contents
728x90
반응형
# 설치환경
[darksharavim]cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
## 자빅스 컨테이너 이미지 다운로드
[darksharavim]docker pull zabbix/zabbix-server-mysql
Using default tag: latest
Trying to pull repository docker.io/zabbix/zabbix-server-mysql ...
missing signature key
도커 버전으로 인한 이슈 도커 버전 업그레이드 진행
## 도커설치
[darksharavim]yum -y update
[darksharavim]yum install -y yum-utils
[darksharavim]yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
[darksharavim]yum install docker-ce docker-cd-cli containerd.io docker-buildx-plugin docker-compse-plugin
[darksharavim]docker version
Client: Docker Engine - Community
Version: 26.0.0
API version: 1.45
Go version: go1.21.8
Git commit: 2ae903e
Built: Wed Mar 20 15:21:09 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 26.0.0
API version: 1.45 (minimum version 1.24)
Go version: go1.21.8
Git commit: 8b79278
Built: Wed Mar 20 15:20:06 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
### portainer설치 ###
## 볼륨생성
[darksharavim]docker volume create portainer_data
## 볼륨확인
[darksharavim]docker volume list
DRIVER VOLUME NAME
local 04eea5a7f211861bb15de80bd24a1b865b46406691ae82cd0edff0a17c4e8e3b
local portainer_data
## 컨테이너 실행
[darksharavim]docker run -d \
-p 9000:9000
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
--restart=always \
portainer/portainer
## 확인
[darksharavim]docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cfbec2b83c3f portainer/portainer "/portainer" 5 minutes ago Up 5 minutes 8000/tcp, 9443/tcp, 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp eloquent_elbakyan
[darksharavim]docker pull zabbix/zabbix-server-mysql
Using default tag: latest
latest: Pulling from zabbix/zabbix-server-mysql
4abcf2066143: Pull complete
f62add95a03b: Pull complete
0addf72d90cf: Pull complete
47679ddcb62a: Pull complete
41cf1d1843c1: Pull complete
4700417c527a: Pull complete
139dfdcedc88: Pull complete
4f4fb700ef54: Pull complete
271479c552b7: Pull complete
Digest: sha256:b8f3d5e47f1c909acbe2c99042a8700e8de4f095dee1074aafc0d298f2e4c88b
Status: Downloaded newer image for zabbix/zabbix-server-mysql:latest
docker.io/zabbix/zabbix-server-mysql:latest
[darksharavim]docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
zabbix/zabbix-server-mysql latest 70d83d127687 10 hours ago 134MB
portainer/portainer latest 5f11582196a4 16 months ago 287MB
portainer/portainer latest 5f11582196a4 16 months ago 287MB
centos latest 5d0da3dc9764 2 years ago 231MB
mariadb 10.4.3 9057231b8afe 5 years ago 379MB
mariadb 10.3.8 2c73b3262fff 5 years ago 363MB
# 자빅스 관련 이미지 다운
docker pull mysql
docker pull zabbix/zabbix-server-mysql
docker pull zabbix/zabbix-web-nginx-mysql
docker pull zabbix/zabbix-java-gateway
docker pull zabbix/zabbix-agent
## mysql 컨테이너 실행
docker run \
--name mysql-server -t \
-e MYSQL_DATABASE="zabbix" \
-e MYSQL_USER="zabbix" \
-e MYSQL_PASSWORD="zabbix" \
-e MYSQL_ROOT_PASSWORD="qwer1234" \
-d mysql \
--character-set-server=utf8 \
--collation-server=utf8_bin \
--default-authentication-plugin=mysql_native_password
## 자빅스 자바 게이트웨이 컨테이너 실행
docker run --name zabbix-java-gateway -t \
--restart unless-stopped \
-d zabbix/zabbix-java-gateway
## 자빅스 서버 mysql 컨테이너 실행
docker run --name zabbix-server-mysql -t \
-e DB_SERVER_HOST="mysql-server" \
-e MYSQL_DATABASE="zabbix" \
-e MYSQL_USER="zabbix" \
-e MYSQL_PASSWORD="zabbix" \
-e MYSQL_ROOT_PASSWORD="qwer1234" \
-e ZBX_JAVAGATEWAY="zabbix-java-gateway" \
--link mysql-server:mysql \
--link zabbix-java-gateway:zabbix-java-gateway \
-p 10051:10051 \
--restart unless-stopped \
-d zabbix/zabbix-server-mysql
## 자빅스 웹인터페이스 컨테이너 실행
docker run \
--name zabbix-web-nginx-mysql -t \
-e DB_SERVER_HOST="mysql-server" \
-e MYSQL_DATABASE="zabbix" \
-e MYSQL_USER="zabbix" \
-e MYSQL_PASSWORD="zabbix" \
-e MYSQL_ROOT_PASSWORD="qwer1234" \
-e ZBX_SERVER_HOST="zabbix-server-mysql" \
--link mysql-server:mysql \
--link zabbix-server-mysql:zabbix-server \
-p 8080:8080 \
--restart unless-stopped \
-d zabbix/zabbix-web-nginx-mysql
## 자빅스 에이전트 컨테이너 실행
docker run --name zabbix-agent \
--link mysql-server:mysql \
--link zabbix-server-mysql:zabbix-server \
-e ZBX_HOSTNAME="Zabbix server" \
-e ZBX_SERVER_HOST="zabbix-server" \
-d zabbix/zabbix-agent
https://hub.docker.com/r/zabbix/zabbix-web-apache-mysql
https://hub.docker.com/r/zabbix/zabbix-web-nginx-mysql
https://www.zabbix.com/documentation/6.0/en/manual/installation/requirements/best_practices
https://www.zabbix.com/documentation/6.0/en/manual/config/items/itemtypes/log_items
728x90
반응형
'# Virtualation > Docker' 카테고리의 다른 글
NPM install(ft. docker) (0) | 2024.04.08 |
---|---|
windows(xp~11) install(ft. docker) (0) | 2024.04.04 |
[vagrant]centos container install(provider docker) (0) | 2023.04.05 |
Vagrant (0) | 2023.04.05 |
docker container 재시작 정책 수정 (0) | 2022.11.18 |
@다크쉐라빔 :: 다크쉐라빔의 주절주절
안녕하세요. 이곳은 IT위주의 잡다한 정보를 올려두는 개인 블로그입니다.
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!