I'm using the cheapest Amazon Lightsail instance to set up an Nginx + Node.js server.
I have compiled Nginx successfully already, however it's taking too long to compile Node.js.
Is this is even a good practice to compile Node.js from source? Should I just use the version from the package manager?
The specs for the Lightsail instance are:
512MB Ram
1 vCPU
20 GB SSD
512 GB Transfer
The first time I tried to compile Node.js, GCC seemed to have run out of memory. I got this error (internal compiler error: Killed (program cc1plus)). I created a swap file to increase the available RAM size, as described here. (dd
, mkswap
, swapon
, add to /etc/fstab
)
Now it's compiling, but taking hours to complete. Should I wait for the compilation to finish or install from the package manager?