centos 安装些许组件及docker

yum install -y vim net-tools bind-utils lrzsz wget sysstat iotop iftop nc zip unzip

setenforce 0

sed -i 's#^SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config

getenforce

systemctl disable firewalld

systemctl stop firewalld

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 install gcc

yum -y install gcc-c++

yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine

yum install -y yum-utils device-mapper-persistent-data lvm2

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

yum makecache fast

yum -y install docker-ce

sudo mkdir -p /etc/docker

sudo tee /etc/docker/daemon.json <<-'EOF'

{ "registry-mirrors": ["https://nkhaeg5s.mirror.aliyuncs.com"] }

EOF

sudo systemctl daemon-reload

sudo systemctl restart docker

service docker start

systemctl enable docker

swapoff -a

sed -ri 's/.*swap.*/#&/' /etc/fstab

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章