Setup basic environment
Config Interface
sudo vi /etc/network/interfaceUpdate the config like this
iface eth0 inet static
address 172.16.2.1
netmask 255.255.255.0
gateway 172.16.2.254
dns-nameservers 1.1.1.1 8.8.8.8Restart services and flush the ip binded to interface before
sudo ip addr flush dev eth0
sudo systemctl restart networkingHow to bring interface up/down
Using
ipUsage:
# ip link set dev <interface> up # ip link set dev <interface> downExample:
# ip link set dev eth0 up # ip link set dev eth0 downUsing
ifconfigUsage:
# /sbin/ifconfig <interface> up # /sbin/ifconfig <interface> downExample:
# /sbin/ifconfig eth0 up # /sbin/ifconfig eth0 down
Update apt-get repo list and set timezone
Update HWE
Mainly for Ubuntu 16.04
You may use
lsb_release -ato check the OS version first
Install docker and docker compose
Install Docker
Install Docker Compose
Install Space VIM
– Quick start guide | SpaceVim
Trouble-shot
SpaceVim中vimproc的vimproc_linux64.so未找到
Login to the docker hub
This part will be conducted by Danny sudo docker login
Install htop
$ sudo apt-get install htop
Set ulimit
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Set max virtual memory
set the parameters vm.max_map_countin /etc/sysctl.conf echo vm.max_map_count=262144 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
OR
run command (will be reset after reboot): sudo sysctl -w vm.max_map_count=262144
Setup the log rotation for docker
Configure the default logging driver This can be done by adding the following values in /etc/docker/daemon.json. Create this file if it doesn’t exist.
Execute the following commands to reload the updated daemon.json. The new configuration will apply to all newly created containers after restart.
Last updated