Last active
March 5, 2016 06:20
-
-
Save dudewheresmycode/8383e7e4f119b70f5bf4 to your computer and use it in GitHub Desktop.
Install Node.js on Ubuntu 14.04 (DigitalOcean)
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
sudo apt-get update | |
sudo apt-get install git -y | |
cd ~ | |
wget https://nodejs.org/dist/v4.3.2/node-v4.3.2-linux-x64.tar.xz | |
mkdir node | |
tar xvf node-v4.3.2-linux-x64.tar.xz --strip-components=1 -C ./node | |
cd ~ | |
rm -rf node-v* | |
mkdir node/etc | |
echo 'prefix=/usr/local' > node/etc/npmrc | |
sudo mv node /opt/ | |
sudo chown -R root: /opt/node | |
sudo ln -s /opt/node/bin/node /usr/local/bin/node | |
sudo ln -s /opt/node/bin/npm /usr/local/bin/npm | |
node -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment