Project

General

Profile

Azure VPS setup notes » History » Revision 2

Revision 1 (Jon Goldberg, 06/08/2020 08:44 PM) → Revision 2/49 (Jon Goldberg, 07/26/2020 07:18 PM)

# Azure VPS setup notes 

 I have a lot more to put here, but for now: 

 ### Swap 
 https://support.microsoft.com/en-us/help/4010058/how-to-add-a-swap-file-in-linux-azure-virtual-machines By default, Azure VPSes don't have swap.    Creating a swapfile (as opposed to a swap partition) is an excellent use of the ephemeral disk that Azure VPSes come with.    [More detailed documentation is available](https://linuxize.com/post/create-a-linux-swap-file/), but as root: 

 ```shell 
 # This first command takes a few minutes. 
 dd if=/dev/zero of=/mnt/resource/swap bs=1024 count=8G 
 chmod 600 /mnt/resource/swap 
 mkswap /mnt/resource/swap 
 swapon /mnt/resource/swap 
 echo "/mnt/resource/swapfile         none      swap      sw        0         0" >> /etc/fstab  
 ```