OS 初始化工具安装

Catalogue
  1. 1. PRE
    1. 1.1. 镜像源更换
  2. 2. ZSH
    1. 2.1. 国内
    2. 2.2. 全球
    3. 2.3. ZSH Theme P10K
      1. 2.3.1. 国内
      2. 2.3.2. 全球
        1. 2.3.2.1. Update
  3. 3. Docker
    1. 3.1. 国内
    2. 3.2. 全球
    3. 3.3. Docker Compose
      1. 3.3.1. 国内
      2. 3.3.2. 全球
  4. 4. Kube
    1. 4.1. 国内
  5. 5. Jenkins

PRE

镜像源更换

USTC MIRROR 生成


ZSH

国内

1
2
apt install -y git zsh autojump
sh -c "$(curl -fsSL https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"

全球

1
2
apt install -y git zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

ZSH Theme P10K

国内

1
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

全球

1
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Set ZSH_THEME=”powerlevel10k/powerlevel10k” in ~/.zshrc.

Update
1
git -C ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k pull

Docker

国内

1
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

全球

1
curl -fsSL https://get.docker.com

Docker Compose

国内

1
curl -L https://get.daocloud.io/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose

全球

1
curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose  && chmod +x /usr/local/bin/docker-compose

Kube

国内

1
2
3
4
5
6
7
apt-get install -y apt-transport-https
curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-stretch main
EOF
apt-get update
apt-get install -y kubectl

Jenkins

启动 jenkins 之后,访问 ${JENKINS}/pluginManager/advanced

替换 update-center.json

1
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json

进入系统的 update 目录更新

1
sed -i 's/https:\/\/updates.jenkins.io\/download/https:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins/g' default.json && sed -i 's/http:\/\/www.google.com/https:\/\/www.baidu.com/g' default.json

重启系统
${JENKINS}/restart