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
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++
Below is the first prompt for a response, type y and enter to continue.
This is the second prompt, again type y and enter to continue.
Below is a screen shot when this process finishes.
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
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
5. Change to the just uncompressed directory.
cd node-v0.10.25
6. Execute the configure command.
./configure
7. Run the “make install” command. This process will take about five minutes to run.
sudo make install
Below is a screen shot when this process finishes.
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
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.
Hi Anand,
What version of node are you trying to download, and what version of Oracle Linux? The error is for checking the C compiler on server.
Hi Anand,
Sorry about the slow response. The following link suggests that upgrading Python will resolve this issue:
http://stackoverflow.com/questions/14989164/node-js-configure-file-syntax-error-line-433
I am getting the following error. I am trying to install this on centos 5x server
File “./configure”, line 442
fpu = ‘vfpv3’ if armv7 else ‘vfpv2’
^
SyntaxError: invalid syntax
issue solved by installing python 2.7