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
    4. 2.4. ZSH lazyload
    5. 2.5. ZSH autosuggestions
    6. 2.6. Iterm2 Badges
  3. 3. Docker
    1. 3.1. 国内
      1. 3.1.1. tuna
      2. 3.1.2. ali
    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
  6. 6. Neofetch

同参考 Ubuntu 必装软件

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

ZSH lazyload

1
2
git clone https://github.com/qoomon/zsh-lazyload $ZSH_CUSTOM/plugins/zsh-lazyload
plugins+=(zsh-lazyload)

ZSH autosuggestions

1
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Iterm2 Badges

Link

Docker

国内

tuna

1
2
3
export DOWNLOAD_URL="https://mirrors.tuna.tsinghua.edu.cn/docker-ce"
# 如您使用 curl
curl -fsSL https://get.docker.com/ | sh

ali

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

全球

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

Docker Compose

这部分不是必须的,在新版的 docker 里面已经增加了 compose 的插件,使用 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

Neofetch

打印系统信息。 https://github.com/dylanaraps/neofetch

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ neofetch                                                                                      
.-/+oossssoo+/-. yanick@yanick-MS-7C94
`:+ssssssssssssssssss+:` ---------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 20.04.3 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Host: MS-7C94 1.0
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.13.0-39-generic
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 9 hours, 29 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 2672 (dpkg), 1 (flatpak), 20 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: zsh 5.8
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 3840x2160, 3840x2160
ossyNMMMNyMMhsssssssssssssshmmmhssssssso DE: GNOME 3.36.9
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ WM Theme: Adwaita
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Theme: Yaru [GTK2/3]
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Icons: Yaru [GTK2/3]
+sssssssssdmydMMMMMMMMddddyssssssss+ Terminal: gnome-terminal
/ssssssssssshdmNNNNmyNMMMMhssssss/ CPU: AMD Ryzen 9 5900X (24) @ 3.700GHz
.ossssssssssssssssssdMMMNysssso. GPU: NVIDIA GeForce GT 630 OEM
-+sssssssssssssssssyyyssss+- Memory: 25039MiB / 64234MiB
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.