Last active
September 24, 2015 16:17
-
-
Save coolaj86/774759 to your computer and use it in GitHub Desktop.
Install Node.JS on Mac OS X or Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NUMBER_OF_CPU_CORES=2 | |
BASHRC=~/.bashrc # use .bash_profile on OS X | |
# Remove old Node.JS installation | |
rm ~/local/*/node* -rf | |
rm ~/.node_libraries -rf | |
sudo rm /usr/local/*/node* -rf | |
sudo rm /usr/*/node* -rf | |
# Install Node.JS | |
mkdir -p ~/local/{bin,lib,share} | |
mkdir -p ~/local/share/man | |
cd ~/ | |
git clone http://github.com/ry/node.git | |
cd node | |
git checkout v0.8.18 | |
./configure --prefix=~/local | |
make -j ${NUMBER_OF_CPU_CORES} | |
make install | |
# Put node in your path | |
echo 'PATH=~/local/bin/:${PATH}' >> ${BASHRC} | |
source ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment