标签:follow cti tps gen 更新 设置 htm ranch 依赖
写在前面由于Docker-Engine Docker官方已经不推荐使用,无法安装了,所以现在安装Docker-CE。
systemctl stop firewalld.service
systemctl disable firewalld.service
yum install ca-certificates ;
update-ca-trust;
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo-bak #备份
cat << ‘EOF‘ > /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
EOF
export docker_version=18.09.9;
apt-get remove docker docker-engine docker.io containerd runc -y;
apt-get update;
apt-get -y upgrade;
apt-get -y install apt-transport-https ca-certificates \
curl software-properties-common bash-completion gnupg-agent;
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | \
sudo apt-key add -;
add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable";
apt-get -y update;
install_version=$( apt-cache madison docker-ce | grep ${docker_version} | awk ‘{print $3}‘ );
apt-get -y install docker-ce=${install_version} docker-ce-cli=${install_version} --allow-downgrades;
usermod -aG docker $NEW_USER;
systemctl start docker;
systemctl enable docker;
apt-get autoremove -y
yum install yum-plugin-versionlock
yum versionlock add docker-ce docker-ce-cli
yum versionlock add docker-ce docker-ce-cli
yum versionlock list
yum versionlock delete <软件包名称>
yum versionlock clear
标签:follow cti tps gen 更新 设置 htm ranch 依赖
原文地址:https://blog.51cto.com/13760351/2496889