The logo of the Node.js Project from the offic...

Image via Wikipedia

This one was a little hard. I got lots of help so I decided to post it online since it doesn’t exist on the internet yet… I wonder why….

The simple step by step instruction:

  1. sudo yum install git

  2. cd node
  3. git checkout v0.6.2
  4. sudo yum install openssl-devel
  5. sudo yum install gcc # you can skip this if you already have gcc
  6. sudo yum install gcc-c++ # you can skip this if you already have gcc-c++
  7. ./configure       [ thank you Ed for the heads up! ]
  8. make -j2
  9. make install
  10. export PATH=$PATH:/usr/local/bin:/usr/local #this is to add usr local to your path wher nodejs was installed
  11. sudo visudo
  12. Find Defaults secure_path=/sbin:/bin:/usr/sbin:/usr/bin
    go to the end “a” for append, type “:/usr/local/bin”, ESC, “:wq”
  13. curl |sudo sh #installing npm a very good too to install nodejs packages
    P.S. : This step is outdated as of node.js 0.6.3 since node.js 0.6.3 comes out with npm
  14. sudo yum install mongodb #installing mongodb
  15. #go to the dir where you wish to code and use npm!!
  16. npm install mongodb
  17. npm install mongoose
  18. npm install express
  19. npm install coffee-script
  20. npm install stylus
  21. npm install underscore
  22. npm list
    ├── coffee-script@1.1.3
    ├─┬ express@2.5.1
    │ ├─┬ connect@1.8.0
    │ │ └── formidable@1.0.7
    │ ├── mime@1.2.4
    │ ├── mkdirp@0.0.7
    │ └── qs@0.3.2
    ├── mongodb@0.9.7-0
    ├─┬ mongoose@2.3.13
    │ ├── colors@0.5.1
    │ ├── hooks@0.1.9
    │ └── mongodb@0.9.6-23
    ├─┬ stylus@0.19.3
    │ ├── cssom@0.2.0
    │ ├── growl@1.1.0
    │ └── mkdirp@0.0.7
    └── underscore@1.2.2
John Roach

Related Posts
Comments ( 18 )
  1. Ed
    December 6, 2011 at 4:38 pm

    Before step #8 you could add “./configure”, I’m kind of new to linux and didn’t know that.
    Great step by step.

    • John Roach
      December 6, 2011 at 5:02 pm

      Thank you for the heads up Ed! Edited as could be seen :D

  2. Jean.cedric.t
    December 16, 2011 at 9:31 am

    I don’t mean to be offendind, but did you heard of ?

    • John Roach
      December 16, 2011 at 9:49 am

      Don’t worry I’m never offended by new information. However I would rather build my node.js packages myself than pull it from a source I don’t know.

  3. Anvith
    December 29, 2011 at 7:32 pm

    Nice work just make a minor change in step 2 change –depth to –depth . Kind of lame to point out but for a amatuer like me i have to resort to check the manual of the package for the same.

  4. Anvith
    December 29, 2011 at 7:35 pm

    Oops I just noticed a doube negative when posted here is encoded as a different character .Check the same when u cutpaste and run it on a terminal.

    • John Roach
      December 29, 2011 at 11:16 pm

      Fixed it :) I should have checked the auto-formatting :) Thank you Anvith :)

  5. aardvax
    January 24, 2012 at 8:19 pm

    Thanks a lot :) you saved my life

  6. Michael
    April 6, 2012 at 5:29 am

    Good afternoon my name is Michael, and using your tutorial I was able to get to step 16, however after that, when I run the next command in step 17, I get a msg that “command not found”. If you have any reason why I’m getting that it would be most appreciated. Thank you, this tutorial is very helpfull.

    • John Roach
      April 6, 2012 at 9:36 am

      The problem might be that you couldn’t install npm correctly. Please check if npm exists. Fedora has a neat “locate” command by default which you can use to locate files and folders. So try “locate npm”. If nothing comes up go back to step 14 and retry installing npm.

  7. ganpath
    April 20, 2012 at 1:37 pm

    Good .exelent work other tips

  8. Ryan
    April 25, 2012 at 7:42 am

    As of node v0.6.3, npm is included in node source in packages/installers and is installed on make install. Just posting this for people that are installing a node version other than 0.6.2. Thanks, John

    • John Roach
      April 25, 2012 at 10:45 am

      Thank you for the heads up Ryan!

  9. Sheldon Hearn
    May 27, 2012 at 10:41 am

    What executable ends up in /usr/local instead of /usr/local/bin? It’s very unusual to have to include /usr/local in the PATH.

    • John Roach
      May 28, 2012 at 12:43 pm

      I really don’t know but the build of version 0.6.2 installed in /usr/local… hence, sadly, had to add the path.

  10. Pepe
    July 19, 2012 at 3:48 am

    Thanks. This save my day.

  11. Joey
    January 2, 2013 at 12:24 am

    Nice and clear, but outdated.

    A simpler way: get the latest sources from the repository at github.

    follow the given steps, i.e
    make install

    node is in your path, and npm is available.

    • John Roach
      January 2, 2013 at 12:03 pm

      Thank you for your input.