Setup basic environment

Config Interface

sudo vi /etc/network/interface

Update 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.8

Restart services and flush the ip binded to interface before

sudo ip addr flush dev eth0
sudo systemctl restart networking

How to bring interface up/down

  1. Using ip

    Usage:

     # ip link set dev <interface> up
     # ip link set dev <interface> down

    Example:

     # ip link set dev eth0 up
     # ip link set dev eth0 down
  2. Using ifconfig

    Usage:

     # /sbin/ifconfig <interface> up
     # /sbin/ifconfig <interface> down

    Example:

     # /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 -a to check the OS version first

Install docker and docker compose

Install Docker

Reference

Install Docker Compose

Reference

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

Reference 1 / Reference 2

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