How to install Node.js on Mediatemple DV 4 Managed
I was struggling to find some instructions on installing Node.js on a Mediatemple DV Managed server running Plesk 12 on CentOS 5 and play nicely with a disgruntled Apache server. After I managed to get it right I reckoned I'd share the easiest process to getting this done.
There are some prerequisites to this process. You will require the following:
- Root access to your server
- A little understanding of unix command line
- A cup of coffee
First you'll need to SSH into your Mediatemple solution. This requires Root access to be set in your Account Centre at http://www.mediatemple.net
Next you will need to open Terminal (on Mac) or download PuTTY (on Windows) and run the following command:
You will be required to type in your root password that you specified in the Account Centre.
Node.js packages depend on the EPEL repository being available. So lets install that quickly.
Warning before using this guide
This is specifically for CentOS 5, don't run this on any other version of the OS. I take no responsibility for what happens to your system.
In the terminal or puTTY run the following command to install the EPEL repository.
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm sudo rpm -Uvh epel-release-5*.rpm
These two commands above will install the EPEL package required by Node.js.
Next lets run the installer. To be honest the above command is bundled with this command below but I run it just to make sure I have the required EPEL package. It also just prevents you from worrying about many prompts during the install.
curl -sL https://rpm.nodesource.com/setup | bash -
Once you've done the above, all you need to do is run the below line and Node.js will be installed.
yum install -y nodejs
Finally run the following command to see if Node.js is working:
This should output the version of Node.js
This worked for me on my Mediatemple DV4 Managed hosting solution with no problems.
Next tutorial I'll show you how to serve the content to the web browser