yum apt-get 安装指定版本

Posted by Sunday on 2018-11-20

apt-get

1
2
3
4
5
6
7
8
apt-cache madison docker-ce
docker-ce | 18.06.1~ce~3-0~ubuntu | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 18.06.0~ce~3-0~ubuntu | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 18.03.1~ce-0~ubuntu | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial/stable amd64 Packages
...
docker-ce | 17.03.3~ce-0~ubuntu-xenial | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial/stable amd64 Packages

apt-get install docker-ce=18.03.1~ce-0~ubuntu

yum

1
2
3
4
5
6
7
8
yum list nginx --showduplicates | sort -r
* updates: mirrors.aliyun.com
nginx.x86_64 1:1.8.1-1.el7.ngx nginx
nginx.x86_64 1:1.8.0-1.el7.ngx nginx
nginx.x86_64 1:1.14.1-1.el7_4.ngx nginx
nginx.x86_64 1:1.14.0-1.el7_4.ngx nginx

yum install nginx-1.14.1