当前位置:网站首页>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
边栏推荐
- np.nan, np.isnan, None, pd.isnull, pd.isna 整理与小结
- 力扣977-有序数组的平方——暴力法&双指针法
- The ex-boyfriend bought chili water and threatened to rob his daughter. Can the woman apply for a personal safety protection order?
- 软件成分分析:手握5大能力守护软件供应链安全
- excel 批量翻译-excel 批量函数公司翻译大全免费
- AQS-AbstractQueuedSynchronizer
- darknet训练yolov4模型
- Seneor曝光基础知识
- Transfer files between servers
- 力扣151-颠倒字符串中的单词
猜你喜欢

Problem solving in the process of using mosquitto

Lexicon 27 - Remove Elements - Simple Questions

Crack detection technology based on deep learning

How to set up wireless PPI communication between Weiluntong touch screen and S7-200smart?

【第六届强网杯CTF-Wp】

网站自动翻译-网站批量自动翻译-网站免费翻译导出

三种实现分布式锁的方式

CCF paper conference IEEE how to query all articles of a conference journal
![[kali-information collection] (1.8) ARP reconnaissance tool _Netdiscover](/img/04/f477cd8726d147b892f6050d46c312.png)
[kali-information collection] (1.8) ARP reconnaissance tool _Netdiscover

Crack detection technology based on deep learning
随机推荐
数据湖(一):数据湖概念
NVIDIA NeMo Metrics 轻量性能采集系统
Drools(8): WorkBench uses
numpy&pands 中的unique
npm WARN config global `--global`, `--local` are deprecated. Use `--location解决方案
SQL function TRIM
ansible module --yum module
今日睡眠质量记录85分
Create an application operation process using the kubesphere GUI
面积曲线AUC(area under curve)
After Effects 教程,如何在 After Effects 中对蒙版进行动画绘制?
Problem solving in the process of using mosquitto
When not to use () instead of Void in Swift
MyCat2 introduction and installation and basic use
[kali-information collection] (1.8) ARP reconnaissance tool _Netdiscover
【第六届强网杯CTF-Wp】
企业级数据治理工作怎么开展?Datahub这样做
手撸架构,Mysql 面试126问
MD5详解(校验文件完整性)
np.nan, np.isnan, None, pd.isnull, pd.isna 整理与小结