title: How to install node binary distribution files on Linux
body: <p>My production server (Centos 5.9) won't compile nodejs, possibly because it's gcc is only 4.1.2 (4.2 or above is recommended) so I've trying to install the binaries.</p>
  
  <pre><code>$ wget http://nodejs.org/dist/v0.10.22/node-v0.10.22-linux-x86.tar.gz
  $ tar -zxvf node-v0.10.22-linux-x86.tar.gz
  $ cd node-v0.10.22-linux-x86
  $ sudo cp bin/* /usr/local/bin
  $ sudo cp -R lib/* /usr/local/lib
  $ sudo cp -R share/* /usr/local/share
  </code></pre>
  
  <p>And now for testing:</p>
  
  <pre><code>$ node -v  # =&gt; v0.10.22
  $ man node # looks fine
  $ npm -v   # UH OH, PROBLEM - Cannot find module 'npmlog'
  </code></pre>
  
  <p>Now (keeping in mind I'm a complete beginner at node) I did some searching and found there's an environment variable called NODE_PATH, so I tried:</p>
  
  <pre><code>$ export NODE_PATH=/usr/local/lib/node_modules
  $ npm -v   # SAME PROBLEM - Cannot find module 'npmlog'
  </code></pre>
  
  <p>So then I found out where npmlog lives and tried modifying NODE_PATH accordingly:</p>
  
  <pre><code>$ find /usr/local/lib -name npmlog # =&gt; /usr/local/lib/node_modules/npm/node_modules/npmlog
  $ export NODE_PATH=/usr/local/lib/node_modules/npm/node_modules
  $ npm -v   # DIFFERENT PROBLEM - Can't find '../lib/npm.js'
  </code></pre>
  
  <p>At this stage, after more unhelpful googling, I decided I was in over my depth and decided to ask for help. Can anyone tell me what I'm doing wrong?</p>