1.下载二进制文件(1.26.1表示版本,参考https://github.com/docker/compose/releases)
(官方)$ curl -L "https://github.com/docker/compose/releases/download/1.26.1/docker-compose-$(uname -s)-$(uname -m)" > docker-compose
(国内)$ curl -L https://get.daocloud.io/docker/compose/releases/download/1.26.1/docker-compose-`uname -s`-`uname -m` > docker-compose
2.将二进制文件移到用户目录下
$ sudo mv docker-compose /usr/local/bin/
3.添加可执行权限
$ sudo chmod +x /usr/local/bin/docker-compose
4.验证
$ docker-compose version