CentOS
文件传输
yum install lrzsz
- rz:从本地上传文件至服务器
- sz filename:从服务器下载文件至本地
git
yum -y install git
- git —version
docker
# 通过yum源安装docker
sudo yum -y install docker
# 启动docker
sudo systemctl start docker
# 开机自启
sudo systemctl enable docker
换源
cd /etc/docker ls vim daemon.json
{
"registry-mirrors": [
"https://nkbcf7cm.mirror.aliyuncs.com"
]
}
systemctl daemon- reload systemctl restart docker docker info
docker-compose
- 环境检查
pip --version
我用的是python3 安装的 (2我一直安装不上)
# 检查默认python
python --version or python -V
#删除原来指向python2的软链接
sudo mv /usr/bin/python /usr/bin/python.bak
#/usr/local/python3.6/bin/python3.6 这个路径为实际的python3.6的bin文件夹下的Python3.6的路径,这个按照自己的实际情况进行更改
sudo ln -s /usr/bin/python3.6 /usr/bin/python
# 再次查看
python --version or python -V
官方安装 ```java
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py pip —version
- 安装 compose
```shell
# 安装docker compose
pip install -U docker-compose
pip install -U docker-compose==1.25.0
# 验证docker compose版本
docker-compose --version
# 安装补全插件
curl -L https://raw.githubusercontent.com/docker/compose/1.25.0/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose