Search code examples
node.jscentoscpanelwhm

Where should I install node.js?


I'm wondering in which directory I should go to install node.js on a CentOS 5/cPanel server by executing the following commands mentioned in the Wiki:

git clone --depth 1 https://github.com/joyent/node.git
cd node
git checkout origin/v0.4 # optional.  Note that master is unstable.
export JOBS=2 # optional, sets number of parallel commands.
mkdir ~/local
./configure --prefix=$HOME/local/node
make
make install
echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.profile
source ~/.profile

Please advise.


Solution

  • The more conventional locations for a multi-user system are:

    /usr/bin/node
    /usr/local/bin/node
    

    But as @Raynos stated you can put it wherever you want to.