Last active
April 9, 2022 06:59
-
-
Save hydrz/eabdb5ce68002e40269a339454cb3fcd to your computer and use it in GitHub Desktop.
mutipass init script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage