The Bad News
You can’t. Or at least I couldn’t. Make started throwing “virtual memory exhausted: Cannot allocate memory” errors after a few seconds. I tried setting some make flags. I confirmed make was increasing the fail count of ‘privvmpages’ in /proc/user_beancounters. I started trying to change the swap. And then I found an easier way.
It is pennies and minutes to upgrade to a VPS with 1gig of RAM, compile node.js, and revert back to your economic 512mb slice. You keep all your data. No problem.
Temporarily (<2hrs) upgrade your MediaTemple (ve) server
1) Enter your MediaTemple console
2) Select ‘Upgrade Account’
3) Select the size container you need (1gig works for compiling node js)
4) Wait a few minutes, ssh in, configure && make && make install
5) Reverse the process, going back to the 512mb VPS.
At first I was pretty frustrated that I couldn’t compile node. But MediaTemple does let you choose from a lot of new OSes, which is nice, err, pretty much a requirement. I consider myself pretty handy with a linux server, but I want to worry about improving the application and infrastructure, not hacking some memory issue on a shared server because I can’t afford more power yet. That is wasted time. But media temple makes it amazingly easy to upgrade and downgrade your box. (mt) ftw!