docker+docker-compose安装-centos7-国内源加速-简洁的步骤

修改DNS客户机配置文件

vi /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8

修改yum源

yum install -y wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache

开始安装 docker

wget -P /etc/yum.repos.d/ https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install -y docker-ce
mkdir /etc/docker
cat > /etc/docker/daemon.json << EOF
{
  "registry-mirrors": ["https://iw3lcsa3.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload && systemctl enable docker && systemctl restart docker

离线安装 docker-compose

wget -O /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/1.27.3/docker-compose-Linux-x86_64
chmod 777 /usr/local/bin/docker-compose
docker-compose version

在线安装 docker-compose

修改pip源

cd /root/
mkdir .pip
cd .pip
touch pip.conf
echo 'set number' >> /etc/vimrc
pip.conf内容如下:

[global]
index-url=http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com

开始安装

yum -y install libffi-devel
yum -y install python-devel
yum -y install epel-release
yum -y install python-pip
pip install docker-compose
docker-compose version

接下来更精彩,请勿走开(以下是私事,不喜欢别往下看了)

好用的HTTP模拟请求工具

市面上有很多HTTP模拟请求工具,有yapi,有ApiPost,好不好用在此不做评价。这里推荐使用BB-API,功能全面,免费使用、资源无限制,自动生成接口文档,界面简洁大气。支持局域网部署,打造属于你、公司的HTTP 协议管理工具。
官网地址http://api.app-yun.com/bbapi/index.html

你可能感兴趣的:(docker,pip,docker-compose)