Created
January 16, 2020 18:52
-
-
Save ryanhanwu/b78b53d5f6d9b87887651ef77659ec74 to your computer and use it in GitHub Desktop.
#Ubuntu Setup
This file contains hidden or 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
## Update Hostname | |
``` | |
sudo hostname YOUR_HOSTNAME | |
# UPDATE your hostname and change it to YOUR_HOSTNAME | |
vim /etc/hostname | |
# Update your hosts | |
echo "127.0.0.1 YOUR_HOSTNAME" >> /etc/hosts | |
``` | |
## Update System | |
``` | |
sudo apt-get update | |
sudo apt-get install git vim htop glances ncdu ack-grep | |
``` | |
## Text Editor | |
* Vim - https://github.com/spf13/spf13-vim or https://github.com/amix/vimrc | |
``` | |
curl https://j.mp/spf13-vim3 -L > spf13-vim.sh && sh spf13-vim.sh | |
``` | |
or | |
``` | |
git clone https://github.com/amix/vimrc.git ~/.vim_runtime | |
sh ~/.vim_runtime/install_awesome_vimrc.sh | |
``` | |
## Shell | |
* Bash - https://github.com/Bash-it/bash-it | |
``` | |
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it | |
~/.bash_it/install.sh | |
bash-it enable alias docker docker-compose tmux vim apt git | |
bash-it enable completion awscli vim tmux docker docker-compose git | |
bash-it enable plugin aws tmux docker-compose docker nginx ssh | |
``` | |
## Timezone and NTP | |
``` | |
sudo dpkg-reconfigure tzdata | |
sudo apt-get -y install ntp | |
``` | |
* Check the timeoffset | |
``` | |
/usr/bin/ntpq -np | |
``` | |
## Create Swap | |
``` | |
sudo fallocate -l 1G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo /bin/sh -c 'echo "/swapfile swap swap defaults 0 0" >> /etc/fstab' | |
``` | |
## Docker Engine | |
1. [Docker Compose](https://docs.docker.com/compose/install/) | |
1. [Docker + Ubuntu Linux](https://docs.docker.com/install/linux/docker-ce/ubuntu/) | |
1. https://docs.docker.com/install/linux/linux-postinstall/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment