当前位置:网站首页>zabbix automated monitoring script
zabbix automated monitoring script
2022-08-02 12:19:00 【Mu Chenchenxi】
#!/bin/bash
#docker install
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 installation package download_open source mirror site-aliyun
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
#Security configuration
systemctl stop firewalld.service
systemctl disable firewalld.service
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
#docker private warehouse build
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
#download mirror
docker pull nginx
docker pull busybox
docker pull httpd
docker pull centos:7
#Mirror rename
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
边栏推荐
猜你喜欢
SuperSlide系列之轮播图
SQL Server 数据库之导入导出数据
商业流程服务BPass你真的了解吗?
redis cluster cluster, the ultimate solution?
三种实现分布式锁的方式
Crack detection technology based on deep learning
AQS-AbstractQueuedSynchronizer
[kali-information collection] (1.9) Metasploit + search engine tool Shodan
Speed up your programs with bitwise operations
力扣58-左旋转字符串
随机推荐
元宇宙“吹鼓手”Unity:疯狂扩局,悬念犹存
如何通过DBeaver 连接 TDengine?
Swiper系列之轮播图
云原生(三十) | Kubernetes篇之应用商店-Helm介绍
力扣27-移除元素——简单题
匹配滤波(四种滤波器的幅频特性)
第11章 文件
QAbstractScrollArea、QScrollArea
项目监控六大事项
如何更好评估信用贷风险?看这场评分卡模型直播就可以了
MD5 detailed explanation (check file integrity)
Pod Scheduling Strategy: Affinity, Stain and Stain Tolerance
翻译英语的软件-免费翻译软件-各种语言互相翻译
CCF paper conference IEEE how to query all articles of a conference journal
智能图像分析-智能家用电器图像目标检测统计计数检测与识别-艾科瑞特科技(iCREDIT)
使用mosquitto过程中的问题解决
自己如何做小程序呢?
力扣704-二分查找
Likou 704 - binary search
[kali-information collection] (1.9) Metasploit + search engine tool Shodan