侧边栏壁纸
博主头像
silianpan博主等级

Feel no regret for this life.

  • 累计撰写 40 篇文章
  • 累计创建 20 个标签
  • 累计收到 2 条评论

centos6安装docker和docker-compose

silianpan
2022-03-18 / 0 评论 / 0 点赞 / 133 阅读 / 739 字
温馨提示:
本文最后更新于 2022-03-18,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

安装docker

yum install epel-release
yum install https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm

安装 Docker Compose

安装开发工具和Python2.7

# yum groupinstall "Development"
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
# wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz
# tar -xvf Python-2.7.8.tar.xz
# cd Python-2.7.8
# ./configure --prefix=/usr/local
# make && make altinstall
# mv /usr/bin/python /usr/bin/python2.6.6
# ln -s /usr/local/bin/python2.7 /usr/bin/python

vi /usr/bin/yum 
CHANGE to python2.6.6


/usr/bin/yum
#!/usr/bin/python
import sys
......

改为
#!/usr/bin/python2.6.6
import sys
......

安装docker-compose

# wget https://bootstrap.pypa.io/get-pip.py
# python get-pip.py 
 pip install docker-compose==1.5.2
0

评论区