Swap on VPS

systemsautomation used Ask the Experts™
I have got a VPS running Centos with a hosting provider. it does not have a swap space. I want swap since I need to install Oracle. My hosting provider says that swap cannot be made available. Is there a way to make a swap file: it is really very important for me.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2009

nop you cant

it has to be made by them because you not using a dedicated server, its Virtual Server
and they need to create that from their Virtualize softare

you will have to go for dedicated hosting. so that you can have swap .

I got the following from somewhere on internet

NEW="$[SWAP*1024]"; TEMP="${NEW//?/ }"; OLD="${TEMP:1}0"
umount /proc/meminfo 2> /dev/null
sed "/^Swap\(Total\|Free\):/s,$OLD,$NEW," /proc/meminfo > /etc/fake_meminfo
mount --bind /etc/fake_meminfo /proc/meminfo

It solved my problem


Got the solution

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial