Sunday 20 January 2013

Install Node.js on Fedora 17



The easiest way to install Node.js on Fedora these days (as far as I can tell) is using creationix’s NVM (Node Version Manager) script.
You can grab it by cloning it from his github site.
  1. Install git and perl-Digest-SHA if you don’t have them already:
    sudo yum install git perl-Digest-SHA -y
    If you are missing perl-Digest-SHA you’ll get a checksums don't match error when you attempt to install.
  2. Clone the nvm repository:
    git clone git://github.com/creationix/nvm.git ~/nvm
  3. Once you’ve cloned it, execute the following to add a line to your ~/.bashrcenvironment file (this assumes that you checked out nvm in your home directory, so as~/nvm):
    echo "source ~/nvm/nvm.sh" >> ~/.bashrc
  4. Now to load that environment, run:
    source ~/.bashrc
Now you have nvm installed, and can use it to install and manage node versions.
To install the latest (at the time of writing) node.js version:
nvm install 0.8.18
And to set it as the default:
nvm alias default 0.8.18
Enjoy.

1 comment: