Sunday, February 3, 2013

How to install Node.js in Fedora 17

Update: NodeJS is now part of Fedora as a stable package; so all you need to do to install it is:
$ yum install nodejs
Node currently is begin added/implemented on Fedora 18 and will be part of Fedora 19. If you want to try it out this may work for you:
sudo yum --enablerepo=updates-testing install nodejs
Besides that, I'm the kind of guy who doesn't like to get involved with experimental stuff or mess with my os regular install (and i currently have F17 on my notebook and work pc), so this is what i did:

First make sure you have a few devel packages that you'll need:

$ sudo yum install openssl-devel.i686 gcc gcc-c++

Download the source files (you can get the lastest version link from Node's homepage)

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

Once it finish, zunip and compile it (it may take a while depending on your computer)
$ tar zxvf node-v0.8.18.tar.gz
$ cd node-v0.8.18
$ ./configure
$ make
$ sudo make install

After that you can start using node!:

$ node -v
v0.8.18