Linux源配置

一、Linux ubuntu源配置:(这里是阿里云的docker-ce的源)

curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
apt update
apt install docker-ce

二、阿里云的普通源配置

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo或者yum install -y epel-release

curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

yum clean all

yum makecache

引入公钥命令:rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

posted @ 2019-05-21 13:45  海平面下的我们  阅读(126)  评论(0编辑  收藏  举报