centos7安装19版本Docker详细步骤
时间: 2024-01-24 20:04:16 浏览: 149
为了在CentOS 7上安装Docker版本19,可以按照以下步骤进行操作:
1. 首先,卸载已有的Docker版本,可以使用以下命令: [1]
```
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
```
2. 然后,检查CentOS的版本,确保是CentOS 7: [1]
```
cat /etc/redhat-release
```
3. 更新yum包管理器: [1]
```
sudo yum update
```
4. 添加Docker的yum仓库: [2]
```
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
```
5. 安装Docker: [1]
```
sudo yum install docker-ce docker-ce-cli containerd.io
```
6. 启动Docker并设置为开机自动启动: [1]
```
sudo systemctl start docker
sudo systemctl enable docker
```
7. 验证Docker是否安装成功: [1]
```
sudo docker run hello-world
```
通过以上步骤,你应该能够在CentOS 7上成功安装Docker版本19。祝你好运!<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [centos 在线安装docker/docker-compose](https://blog.csdn.net/weixin_45528530/article/details/130485912)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [CentOS 离线安装 Docker](https://blog.csdn.net/Saladbobo/article/details/128674886)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文