Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-27-2016, 01:01 PM   #1
Registered: Aug 2012
Posts: 566

Rep: Reputation: Disabled
Installing different versions of nodejs

Per, I am trying to install nodejs version 6 and npm on Centos6.

When I check the version of the installed package, it appears that it is some old version 0.10.46. But if I google "0.10.46-1.el6 nodejs", it appears not to be that old.

What version of nodejs have I installed? If old, how do I install a newer version?


[root@devserver ~]# curl --silent --location | bash -

## Installing the NodeSource Node.js 6.x repo...

## Inspecting system...

+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release
+ uname -m

## Confirming "el6-x86_64" is supported...

+ curl -sLf -o /dev/null ''

## Downloading release setup RPM...

+ mktemp
+ curl -sL -o '/tmp/tmp.ZO59oc8RTf' ''

## Installing release setup RPM...

+ rpm -i --nosignature --force '/tmp/tmp.ZO59oc8RTf'

## Cleaning up...

+ rm -f '/tmp/tmp.ZO59oc8RTf'

## Checking for existing installations...

+ rpm -qa 'node|npm' | grep -v nodesource

## Run `yum install -y nodejs` (as root) to install Node.js 6.x and npm.
## You may also need development tools to build native addons:
##   `yum install -y gcc-c++ make`

[root@devserver ~]# yum install -y nodejs npm
Loaded plugins: fastestmirror, priorities, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * ius:
 * updates:
183 packages excluded due to repository priority protections

......                                                                                                                                                                                      75/75

  nodejs.x86_64 0:0.10.46-1.el6                                                                                           npm.noarch 0:1.3.6-5.el6

Dependency Installed:

[root@devserver ~]#

[root@devserver ~]# node -v
[root@devserver ~]# npm -v
[root@devserver ~]#
Old 11-27-2016, 01:35 PM   #2
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,531

Rep: Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394
Although a package might install one particular version of this JavaScript library (and might uninstall older ones from its appointed location for such things), bear in mind that this library will be used by clients of web sites hosted by this machine ... each client requesting the library from the server through some URL.

And so, there's nothing in this world keeping you from downloading other versions of this library, directly from its authoritative source, and placing these different versions where this-or-that web site will know to find it. (Probably abstracting those locations to the client through the use of Apache <Directory> or <Location> tags.)

Also consider carefully how you choose to specify the caching behavior of this (rather large, even when minified) library file. You want to encourage the client browser to cache it, without losing the ability to supersede their cached copy.

Note that it is not recommended to attempt to source the library directly from, nor from any other "external" source. You should have copies on the server machine of "anything and everything which this server will be tasked to deliver to a client."

- - -
Incidentally: this reply applies equally to any host operating system, and/or any web-server software.

Last edited by sundialsvcs; 11-27-2016 at 01:38 PM.
Old 11-27-2016, 01:53 PM   #3
Registered: Aug 2012
Posts: 566

Original Poster
Rep: Reputation: Disabled
Hi sundialsvcs,

Node.js is a little (make that a lot) different than tradition JavaScript. Particularly, it is executed by the server and not the web browser client, and it is not a single file called Node.js, but that is the name of the entire environment.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing nodejs and npm on Centos NotionCommotion Linux - Newbie 1 11-28-2016 08:59 PM
nodejs on debian fmc-uws Linux - Software 5 12-04-2014 05:19 AM
[SOLVED] nodejs installation error yashfire007 Linux - Newbie 4 05-15-2013 10:37 AM
[SOLVED] nodejs, nodejs-dev incompatibility in Ubintu? mjbradakis Linux - Software 1 03-25-2013 12:50 AM

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration