Last active 6 months ago

Revision f659c332cf22327e230516e16978baa22d1bab0e

init_ubuntu2404.sh Raw
1#!/bin/bash
2
3sudo timedatectl set-timezone Asia/Shanghai
4
5echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee "/etc/sudoers.d/dont-prompt-$USER-for-sudo-password"
6
7curl -fsSL https://mirrors.aliyun.com/kubernetes-new/core/stable/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/aliyun_kubernetes_1.29.gpg
8curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/aliyun_docker-ce.gpg
9
10sudo bash -c 'cat << UK > /etc/apt/sources.list.d/wuke.list
11deb [signed-by=/etc/apt/trusted.gpg.d/aliyun_kubernetes_1.29.gpg] https://mirrors.aliyun.com/kubernetes-new/core/stable/v1.29/deb/ /
12deb [signed-by=/etc/apt/trusted.gpg.d/aliyun_docker-ce.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable
13UK'
14
15sudo apt update
16sudo apt install git zsh bash-completion wget unzip tree tmux vim sysstat -y
17
18curl -fsSL https://gitlab.com/-/snippets/3629384/raw/main/install_ohmyzsh.sh | bash