目录
安装docker-ce
cd /etc/yum.repos.d/
rm -rf ./*
yum remove podman-manpages.noarch -y
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo
yum -y install yum-utils
yum-config-manager --add-repo https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo
cd /tmp
wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
rpm -ivh containerd.io-1.2.6-3.3.el7.x86_64.rpm --nodeps --force
yum install -y yum-utils device-mapper-persistent-data lvm2
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf list docker-ce
dnf install docker-ce --nobest -y
systemctl start docker
systemctl enable docker
echo $?
安装docker-compose
yum install python3-pip -y
pip3 install -i https://mirrors.aliyun.com/pypi/simple --upgrade pip
yum install python-devel -y
# pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ docker-compose 有时这个不能用
pip3 install -i https://mirrors.aliyun.com/pypi/simple docker-compose
docker-compose version
安装kvm
wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-8-reg.repo
yum clean all && yum makecache
yum module install perl:5.26
yum -y install cifs-utils nmap nfs-utils lrzsz net-tools yum-utils
cpu开虚拟化
cat /proc/cpuinfo | egrep "vmx|svm"
yum -y install kmod @virt virt-top libguestfs-tools openssl
yum install libvirt* virt-* qemu-kvm* -y
sudo systemctl enable --now libvirtd
virt-install --virt-type kvm --os-type=linux --os-variant rhel7 --name centos7 --memory 4096 --vcpus 1 --disk /opt/centos8.raw,format=raw,size=10 --cdrom /opt/CentOS-8.5.2111-x86_64-dvd1.iso --network network=default --graphics vnc,listen=0.0.0.0 --noautoconsol
标签:compose,--,kvm,ce,repo,yum,install,docker
From: https://www.cnblogs.com/yizhangheka/p/16614941.html