当前位置:网站首页>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
边栏推荐
猜你喜欢
【Acunetix-Forgot your password】
darknet训练yolov4模型
Taurus.MVC V3.0.3 微服务开源框架发布:让.NET 架构在大并发的演进过程更简单。
npm run serve启动报错npm ERR Missing script “serve“
喜迎八一 《社会企业开展应聘文职人员培训规范》团体标准出版发行会暨橄榄枝大课堂上线发布会在北京举行
翻译英语的软件-免费翻译软件-各种语言互相翻译
MyCat2 introduction and installation and basic use
【kali-信息收集】(1.8)ARP侦查工具_Netdiscover
An example of type3 voltage loop compensator taking Boost as an example
Seneor曝光基础知识
随机推荐
Swiper系列之轮播图
JVM简介
太厉害了,终于有人能把TCP/IP 协议讲的明明白白了
Golang map数组按字段分类
CCF论文会议 IEEE 如何查询某个会议期刊的所有文章
Thymeleaf
Solve the problem of Chinese garbled characters in exporting excel file names
QAbstractScrollArea、QScrollArea
simulink PID自动整定
DTG-SSOD: The latest semi-supervised detection framework, Dense Teacher (with paper download)
Do you really understand the business process service BPass?
npm run serve启动报错npm ERR Missing script “serve“
雷克萨斯,锁死的安全,挡不住的心寒
干测试这些年,去过阿里也去过小公司,给年轻测试员们一个忠告...
阿苹的思考
记录代码
元宇宙“吹鼓手”Unity:疯狂扩局,悬念犹存
Seneor曝光基础知识
7种最常用数据分析思维,解决95%的分析难题
ansible module --yum module