CentOS7下安装Docker-Compose
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7下安装Docker-Compose相关的知识,希望对你有一定的参考价值。
Docker-Compose是一个部署多个容器的简单但是非常必要的工具.
安装Docker-Compose之前,请先安装 python-pip
安装 python-pip
1、首先检查linux有没有安装python-pip包,终端执行 pip -V
[[email protected] network-scripts]# pip -V
-bash: pip: command not found
2、没有python-pip包就执行命令 yum -y install epel-release
[[email protected] network-scripts]# yum -y install epel-release
······
Complete!
3、执行成功之后,再次执行yum -y install python-pip
[[email protected] network-scripts]# yum install python-pip
······
Complete!
4、对安装好的pip进行升级 pip install --upgrade pip
[[email protected] network-scripts]# pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 351kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.2
Uninstalling pip-8.1.2:
Successfully uninstalled pip-8.1.2
Successfully installed pip-18.0
至此,pip安装好了,执行pip -V 再次检查pip环境。
[[email protected] network-scripts]# pip -V
pip 18.0 from /usr/lib/python2.7/site-packages/pip (python 2.7)
安装Docker-Compose
[[email protected] network-scripts]# pip install docker-compose
······
检查docker-compose 安装:docker-compose -version
[[email protected] network-scripts]# docker-compose -version
docker-compose version 1.22.0, build f46880f
以上是关于CentOS7下安装Docker-Compose的主要内容,如果未能解决你的问题,请参考以下文章