Skip to content

Setup Ubuntu 20

Thang Chung edited this page May 21, 2021 · 5 revisions
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

sudo snap install tree #for vim

# docker
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
apt-cache madison docker-ce
sudo apt-get install     apt-transport-https     ca-certificates     curl     gnupg     lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo   "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo add-apt-repository multiverse && sudo apt-get update
sudo apt install virtualbox

sudo ln -s /usr/local/bin/VBoxManage /usr/local/bin/vboxmanage # solve the problem cannot find vboxmanage when use docker-machine

base=https://github.com/docker/machine/releases/download/v0.16.0 && >   curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && >   sudo mv /tmp/docker-machine /usr/local/bin/docker-machine && >   chmod +x /usr/local/bin/docker-machine

docker-machine create --driver virtualbox default
sudo ln /usr/local/bin/docker-machine /snap/bin/docker-machine # solve the problem cannot find vboxmanage when use docker-machine

docker-machine env default

eval $(docker-machine env default) # change env to current docker

docker-machine ip # use this IP to push on docker registry
curl -L -O -C - http://ftp.ussg.iu.edu/linux/centos/latest/isos/file.iso # curl download with resume
# configure git
git config --global user.name "your username"
git config --global user.email "your email"
# Insufficient permissions to access MicroK8s.
sudo usermod -a -G microk8s thangchung
sudo chown -f -R thangchung ~/.kube
# alias microk8s.kubectl to kubectl
sudo snap alias microk8s.kubectl kubectl
Clone this wiki locally