当前位置:网站首页>zabbix自动化监控脚本
zabbix自动化监控脚本
2022-08-02 12:11:00 【沐辰晨兮】
#!/bin/bash
#docker安装
touch /etc/yum.repos.d/aliyun.docker.repo
cat > /etc/yum.repos.d/aliyun.docker.repo
[docker]
name=docker
baseurl=docker-ce-linux-centos-7-x86_64-stable安装包下载_开源镜像站-阿里云
enabled=1
gpgcheck=0
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
EOF
yum -y install docker-ce
docker -v
mkdir -p /etc/docker
tee /etc/docker/daemon.json
{
"registry-mirrors": ["https://2teyhdx3.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload
systemctl restart docker
systemctl enable docker
docker info
#安全配置
systemctl stop firewalld.service
systemctl disable firewalld.service
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
#docker私有仓库搭建
docker pull registry:2
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
sysctl -p
mkdir -p /opt/data/registry
yum -y install net-tools
docker run -itd -p 5000:5000 --restart always -v /opt/data/registry/:/var/lib/registry --name registry registry:2
curl 172.17.10.32:5000/v2/_catalog
sed -i '13c ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --insecure-registry 172.20.10.32:5000' /usr/lib/systemd/system/docker.service
#下载镜像
docker pull nginx
docker pull busybox
docker pull httpd
docker pull centos:7
#镜像改名
docker tag centos:7 172.20.10.32:5000/centos
docker rmi centos:7
docker tag nginx:latest 172.20.10.31:5000/nginx
docker tag httpd:latest 172.20.10.31:5000/httpd
docker tag busybox:latest 172.20.10.31:5000/busybox
边栏推荐
- 8大软件供应链攻击事件概述
- AQS-AbstractQueuedSynchronizer
- Seneor Exposure Basics
- ASP.NET Core 6框架揭秘实例演示[31]:路由“高阶”用法
- 力扣35-搜索插入位置——二分查找
- Likou 209 - String with the Minimum Length - Sliding Window Method
- The ex-boyfriend bought chili water and threatened to rob his daughter. Can the woman apply for a personal safety protection order?
- ABAP-OOAVL template program
- 【kali-信息收集】(1.8)ARP侦查工具_Netdiscover
- go语言的接口
猜你喜欢
MyCat2 introduction and installation and basic use
免费的中英文翻译软件-自动批量中英文翻译软件推荐大全
今日睡眠质量记录85分
When not to use () instead of Void in Swift
np.nan, np.isnan, None, pd.isnull, pd.isna 整理与小结
AQS-AbstractQueuedSynchronizer
Taurus.MVC V3.0.3 微服务开源框架发布:让.NET 架构在大并发的演进过程更简单。
Likou 977-Squaring of ordered arrays - brute force method & double pointer method
力扣27-移除元素——简单题
Crack detection technology based on deep learning
随机推荐
npm WARN deprecated [email protected] This version of tar is no longer supported, and will not receive
【The 6th Strong Net Cup CTF-Wp】
Running yum reports Error: Cannot retrieve metalink for reposit
excel 批量翻译-excel 批量函数公司翻译大全免费
力扣704-二分查找
Process finished with exit code 1
手撸架构,网络 面试36问
商业流程服务BPass你真的了解吗?
第十四章 手动创建 REST 服务(二)
Learning Experience Sharing Seven: YOLOv5 Code Chinese Comments
Seneor曝光基础知识
Likou 58 - Left Rotation String
8大软件供应链攻击事件概述
How to set up wireless PPI communication between Weiluntong touch screen and S7-200smart?
SQL function TRIM
Metaverse "Drummer" Unity: Crazy expansion, suspense still exists
如何通过DBeaver 连接 TDengine?
doc2vec和word2vec(zigbee简介及应用)
使用kubesphere图形界面创建一个devops的CI/CD流程
Thymeleaf