Installing node.js on Oracle Linux Server (OEL)

Install node.js is much easier to install on other Linux operating system like Ubuntu & Fedora.  I was challenged to find a way to install node.js on the Oracle Linux Server (OEL).  Below is the step by step I have pulled together to install node.js on this operating system.

Before beginning:

The account installing node.js will need to be able to sudo to root.   In my example below, my Linux account is going to be called “nodejs”.

On the Server:

1. Create the directory that will store the node.js files.  Then change into that directory.

cd /; sudo mkdir nodejs; sudo chown nodejs:nodejs nodejs; cd nodejs

SetDirectory

2. To install the node.js, a compiler will be needed.  Installing the compiler will twice prompt for input.  Answer yes for both, otherwise the “make install” process will fail with errors.  Depending on the internet connection speed, this process may take five minutes to complete.

sudo yum install gcc-c++

InstallCompiler

Below is the first prompt for a response, type y and enter to continue.

RespondYes

This is the second prompt, again type y and enter to continue.

AgainRespondYes

Below is a screen shot when this process finishes.

CompilerInstallCompleted

3. Download the compressed install file from nodejs.org.  At this writing, the most current version of node.js is v0.10.25.  There may be a new version, adjust the link to down load that version.

wget http://nodejs.org/dist/v0.10.25/node-v0.10.25.tar.gz

DownloadFiles

4. Un-compress the down loaded file.  Again adjust the file name if working with a more current version.

tar zxf node-v0.10.25.tar.gz

UncompressFiles

5. Change to the just uncompressed directory.

cd node-v0.10.25

ChangeIntoDirectory

6. Execute the configure command.

./configure

ConfigureNodeJS

7. Run the “make install” command.  This process will take about five minutes to run.

sudo make install

SudoMakeInstall

Below is a screen shot when this process finishes.

CompilerInstallCompleted

7. Check to see if node.js was installed successful.  Run the node command to see the current version.  If the version is returned, then the server is ready to run node.js.

node –version

Successful

Now you should be able to use node to run your java scripts.

Final Note:

This blog is a compilation of many message-boards and a lot of trial & error.  Many of the methods I attempted did not work on Oracle Linux Server.  If there is a better or fast method available, please let me know in the comments below.  I will either update this blog, or remove this writing & link to the better writing.

4 Comments