Ali cloud host centos7 system creates SWAP area, and start to mount (SWAP-free zone for the virtualization platform)

Logon to root establishment swap file:

the -l 2G fallocate / swapfile
 chmod  600 / swapfile // given the root user's permissions, to ensure the safety 
mkswap / swapfile 
swapon / swapfile 
swapon - S
 echo  " / swapfile swap swap sw 0 0 " >> / etc / fstab
 

Guess you like

Origin www.cnblogs.com/Don/p/11432629.html
Recommended