Centos7 一键安装docker docker-compose环境脚本

释放双眼,带上耳机,听听看~!

yum -y install wget
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache
yum -y update

yum -y install vim
yum -y install unzip zip
yum -y install lrzsz
yum -y install yum-utils
yum -y install device-mapper-persistent-data
yum -y install lvm2
yum -y install epel-release
yum -y install python-pip
pip install –upgrade pip

yum -y remove docker
yum -y remove docker-common
yum -y remove docker-selinux
yum -y remove docker-engine
yum -y install docker-io
groupadd docker
usermod -aG docker $USER
tee -a /etc/sysctl.conf <<-EOF
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-‘EOF’
{
“registry-mirrors”: [“https://xl95ra1m.mirror.aliyuncs.com”]
}
EOF
sysctl -p
systemctl daemon-reload
systemctl restart docker
pip install -U docker-compose
service docker start
docker run hello-world

给TA打赏
共{{data.count}}人
人已打赏
安全技术安全运维

Windows服务器如何发现被黑

2018-5-20 12:24:31

安全技术

Bootstrap框架之排版

2021-12-21 16:36:11

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索