Thursday, February 14, 2019

Standard provisioning of Ubuntu 18.04 on cloud systems

Step-by-step guide

  1. Make sure your account has sudo access, or you have an SSH key in the root account.
  2. SSH into the VM / system & become sudo ( sudo su - or sudo su - root )
  3. If this isn't a system managed by Google or Azure, consider updating the .ssh/authorized_keys file with the other pertinent admin keys.
  4. Use nano or vim to edit /etc/sysctl.conf with the contents of Baseline /etc/sysctl.conf ; and modify as needed.
  5. Run the commands in Provisioning Sequence in-terminal.
  6. Use nano or vim to edit /etc/systemd/swap.conf to make any desired changes.
  7. systemctl enable systemd-swap && systemctl restart systemd-swap
  8. ucaresystem-core
  9. Check over the system, and reboot when ready.

Provisioning Sequence


sysctl -p && cd ~
wget https://github.com/Utappia/uCareSystem/releases/download/v4.4.0/ucaresystem-core_4.4.0_all.deb
apt update && apt -f -y install deborphan xterm haveged make git
systemctl restart haveged
dpkg -i ucaresystem-core_4.4.0_all.deb && rm ucaresystem-core_4.4.0_all.deb
cd /opt && git clone https://github.com/Nefelim4ag/systemd-swap.git && cd systemd-swap && make install && cd ~

Baseline /etc/sysctl.conf

######### Server sysctl
# Mix of wiki.mikejung.biz/Sysctl_tweaks + stuff from unquietwiki.blogspot.com
# Tested with Linux Kernel 4.16.x ; 6-6-2018
# Change 8192 to 1024 or 2048 on small systems
# Change 2048 to 512 or 1024 on small systems
# Change bbr to illinois (wired) or westwood (wireless / lossy), if on pre-4.10 kernel
fs.file-max = 4194304
net.core.default_qdisc=fq_codel
net.core.netdev_max_backlog=8192
net.core.rmem_max=16777216
net.core.somaxconn=2048
net.core.wmem_max=16777216
net.ipv4.tcp_base_mss=1024
net.ipv4.tcp_congestion_control=bbr
net.ipv4.tcp_max_syn_backlog=8192
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_rmem=4096 12582912 16777216
net.ipv4.tcp_slow_start_after_idle=0
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_wmem=4096 12582912 16777216

No comments:

Post a Comment