CentOS

文件传输

yum install lrzsz

  • rz:从本地上传文件至服务器
  • sz filename:从服务器下载文件至本地

git

yum -y install git

  • git —version

docker

  1. # 通过yum源安装docker
  2. sudo yum -y install docker
  3. # 启动docker
  4. sudo systemctl start docker
  5. # 开机自启
  6. sudo systemctl enable docker

换源

cd /etc/docker ls vim daemon.json

  1. {
  2. "registry-mirrors": [
  3. "https://nkbcf7cm.mirror.aliyuncs.com"
  4. ]
  5. }

systemctl daemon- reload systemctl restart docker docker info

docker-compose

  • 环境检查 pip --version
  • 我用的是python3 安装的 (2我一直安装不上)

    1. # 检查默认python
    2. python --version or python -V
    3. #删除原来指向python2的软链接
    4. sudo mv /usr/bin/python /usr/bin/python.bak
    5. #/usr/local/python3.6/bin/python3.6 这个路径为实际的python3.6的bin文件夹下的Python3.6的路径,这个按照自己的实际情况进行更改
    6. sudo ln -s /usr/bin/python3.6 /usr/bin/python
    7. # 再次查看
    8. python --version or python -V
  • 官方安装 ```java

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py pip —version

  1. - 安装 compose
  2. ```shell
  3. # 安装docker compose
  4. pip install -U docker-compose
  5. pip install -U docker-compose==1.25.0
  6. # 验证docker compose版本
  7. docker-compose --version
  8. # 安装补全插件
  9. curl -L https://raw.githubusercontent.com/docker/compose/1.25.0/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose