Rick Luo
Rick Luo
发布于 2024-12-06 / 8 阅读
0
0

Servers 全面更新至 24.04

初始化流程:

配置好登录权限:

echo " " > .ssh/authorized_keys

echo "ed25519 ... rick@macbook.m4" > .ssh/authorized_keys

更新 ssh-key:

ssh-keygen -t ed25519 -C "rick@server-location-annotation"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

重新登录测试好.

之后开始安装与更新软件包:

sudo apt update && sudo apt upgrade -y && sudo apt install -y curl wget git vim zsh

便民工具:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
cd ~ && mv .zshrc zshrc_backup.dimo && wget https://raw.githubusercontent.com/blodely/Mac-Configurations/refs/heads/master/zshrc && mv zshrc .zshrc && source ~/.zshrc

可适当重启,检查一切是否生效:

sudo reboot

安装 docker:

sudo apt update
sudo apt install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

安装 1Panel:

curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh


评论