-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,4 +175,4 @@ git clone [email protected]:aehyok/NET8.0.git | |
|
||
//给脚本授权 | ||
chmod 777 run.sh | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
## zabbix docker | ||
- 参考文章 | ||
- https://mp.weixin.qq.com/s/yx-mm2Am_LIZ2AvHw21mUA | ||
|
||
## zabbix 后端 | ||
``` | ||
docker run \ | ||
--restart always -itd \ | ||
--name zabbix-server \ | ||
--link mysql \ #//--link | ||
-p 10051:10051 \ #//docker inspect看下暴露的端口 | ||
-e DB_SERVER_HOST="mysql" \ #//直接写mysql容器名字 -e设置环境变量 | ||
-e MYSQL_USER="root" \ | ||
-e MYSQL_PASSWORD="M9y2512!" \ | ||
-d zabbix/zabbix-server-mysql #//要使用那个镜像进行创建容器 | ||
docker run \ | ||
--restart always -itd \ | ||
--name zabbix-server \ | ||
--link mysql \ | ||
-p 10051:10051 \ | ||
-e DB_SERVER_HOST="mysql" \ | ||
-e MYSQL_USER="root" \ | ||
-e MYSQL_PASSWORD="M9y2512!" \ | ||
-d zabbix/zabbix-server-mysql | ||
``` | ||
|
||
## zabbix 前端 | ||
``` | ||
docker run \ | ||
--restart always -itd \ | ||
--name zabbix-web \ | ||
--link mysql \ | ||
--link zabbix-server \ | ||
-p 8081:8080 \ | ||
-p 8444:8443 \ | ||
-e DB_SERVER_HOST="mysql" \ | ||
-e MYSQL_USER="root" \ | ||
-e MYSQL_PASSWORD="M9y2512!" \ | ||
-e ZBX_SERVER_HOST="zabbix-server" \ | ||
-e PHP_TZ="Asia/Shanghai" \ | ||
-d zabbix/zabbix-web-nginx-mysql | ||
``` | ||
|
||
## 访问 | ||
``` | ||
http://xxx.xx.xxx.xxx:8081 | ||
Admin zabbix | ||
``` | ||
|
||
|
||
## 查看服务器 | ||
``` | ||
//查看活跃的资源以及使用的内存 | ||
top | ||
//查看剩余内存 | ||
free -h | ||
``` |