1. 添加EPEL源
    在Shell中运行以下命令,安装EPEL源:
    yum install -y epel-release
  2. 安装python-pip
    在Shell中运行以下命令,安装Python-pip软件包:
    #注意python3软链接
    yum install -y python-pip
    yum install -y python3-pip#python3安装pip3!!!
  3. 安装docker-compose
    在Shell中运行以下命令,通过pip安装docker-compose:
    pip3 install docker-compose --default-timeout=100
    4.注意
    如果安装过程中提示

Could not find a version that satisfies the requirement docker-compose (from versions: )
No matching distribution found for docker-compose
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
就执行命令pip install --upgrade pip 更新pip版本
5. 查看pip版本
pip3 -V
6.验证是否安装成功
docker-compose -version
显示docker-compose version 1.18.0, build 8dd22a9表示安装成功

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐