Linux环境初始化脚本命令,安装yum和docker

#!/bin/bash
echo “开始安装环境…”

yum_install=yum install -y yum-utils device-mapper-persistent-data lvm2
echo $yum_install

yum_repo=yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
echo $yum_repo

yum_makecache=yum makecache fast
echo $yum_makecache

yum_docker=yum -y install docker-ce
echo $yum_docker

start_enable=systemctl enable docker
echo $start_enable

start=systemctl start docker
echo $start

docker_version=docker version
echo $docker_version

你可能感兴趣的:(Docker,linux,docker,运维)