Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

Currently, I manage no less than 40 virtual servers. One of the most awkward things is that some vendors provide swap memory, others don't. So, the best way to workaround this is adding a swap file into the Linux manually. This is useful when you have a server without space to add a swap partition.

I do the following to have 1 GB of swap. Change the data to fit your needs.

dd if=/dev/zero of=/swapfile bs=1M count=1024
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo /swapfile none swap defaults 0 0 >> /etc/fstab


blog comments powered by Disqus


Read about IT, Migration, Business, Money, Marketing and other subjects.

Some subjects: FusionPBX, FreeSWITCH, Linux, Security, Canada, Cryptocurrency, Trading.