Skip to content

Instantly share code, notes, and snippets.

@hydrz
Last active April 9, 2022 06:59
Show Gist options
  • Save hydrz/eabdb5ce68002e40269a339454cb3fcd to your computer and use it in GitHub Desktop.
Save hydrz/eabdb5ce68002e40269a339454cb3fcd to your computer and use it in GitHub Desktop.
mutipass init script
#!/bin/sh
# change source
sudo sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo apt update
# install base
sudo apt install -y curl git net-tools
# install docker
sudo curl -fsSL https://repo.huaweicloud.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://repo.huaweicloud.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get install -y docker-ce
sudo groupadd docker
sudo usermod -aG docker ubuntu
sudo curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s https://registry.cn-hangzhou.aliyuncs.com
sudo systemctl enable docker.service
sudo systemctl restart docker.service
# install zsh
sudo apt install -y zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
sed -i "s/ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"ys\"/" $HOME/.zshrc
sed -i "s/^#\s\(.*disable.*automatic.*updates.*\)/\1/" $HOME/.zshrc
sudo sed -i "s@ubuntu:x:1000:1000:Ubuntu:/home/ubuntu:/bin/bash@ubuntu:x:1000:1000:Ubuntu:/home/ubuntu:/bin/zsh@" /etc/passwd
@hydrz
Copy link
Author

hydrz commented Apr 9, 2022

Usage

curl -fsSL https://bit.ly/mutipass-init-sh | sh -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment