Docker-Compose是一个部署多个容器的简单但是非常必要的工具.安装Docker-Compose之前,请先安装 python-pip
一、安装 python-pip[root@workbench-test ~]# pip -V-bash: pip: command not found [root@workbench-test ~]# yum install python-pip[root@workbench-test ~]# yum -y install epel-release[root@workbench-test ~]# yum install python-pip[root@workbench-test ~]# pip install --upgrade pip [root@workbench-test ~]# pip -Vpip 10.0.1 from /usr/lib/python2.7/site-packages/pip (python 2.7) 二、安装Docker Compose[root@workbench-test ~]# pip install docker-compose---------------------------------------------------------------------------------------如果报错:ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out解决:# pip --default-timeout=200 install -U docker-compose--------------------------------------------------------------------------------------如果执行中报错:Setup script exited with error: command 'gcc' failed with exit status 1异常 这是没有正确安装Python开发环境导致,解决如下:# yum install python-devel# yum install libevent-devel# pip install gevent# yum install groupinstall 'development tools' -------------------------------------------------------------------------------------- 检验docker-compose是否安装成功[root@workbench-test ~]# docker-compose --versiondocker-compose version 1.21.2, build a133471--------------------------------------------------------------------------------------如果报错:pkg_resources.DistributionNotFound: backports.ssl-match-hostname>=3.5 解决方法:更新backports.ssl-match-hostname的版本,在终端输入命令# pip install --upgrade backports.ssl_match_hostname