title: Whats the best way to install nodejs in different location
body: <p>By default nodejs is installed in <code>/usr/local/bin/node</code> but this location needs root access rights. </p>
  
  <p>If I then install a global package like grunt-cli or a yeoman generator they also need root access rights. But I don't want to install all global packages with sudo. </p>
  
  <p>So I tought why not install node and its global packages under something like <code>opt/bin/node</code> for example and give this location user access rights.</p>
  
  <p>I used to download the installer from the nodejs website but with that I can't change location of the installation. So the question is:</p>
  
  <p><strong>How can I install nodejs in a differnt location than the default location on OSX and Windows?</strong></p>