Skip to content

Instantly share code, notes, and snippets.

@BenSchZA
Created May 12, 2023 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenSchZA/c46cd0a22fa47ae9d5fb8da3a76e6210 to your computer and use it in GitHub Desktop.
Save BenSchZA/c46cd0a22fa47ae9d5fb8da3a76e6210 to your computer and use it in GitHub Desktop.
# Setup of Ghost Blog on Digital Ocean
# Increase swap: see https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04
sudo swapon --show
free -h
df -h
sudo fallocate -l 1G /swapfile
ls -lh /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo nano /etc/sysctl.conf
# vm.swappiness=10
# vm.vfs_cache_pressure=50
top -c
sudo dpkg-reconfigure unattended-upgrades
top -c
systemctl restart unattended-upgrades.service
top -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment