Last active
December 29, 2017 03:48
-
-
Save jadaradix/a7e4d567291ace08dc77 to your computer and use it in GitHub Desktop.
One step install of node.js 5.1.0 for Linux/Mac (OS X - use "darwin" for THIS_PLATFORM)
This file contains hidden or 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
THIS_VERSION="9.3.0"; | |
THIS_PLATFORM="linux"; | |
echo "Downloading node.js tar..."; | |
wget https://nodejs.org/dist/v$THIS_VERSION/node-v$THIS_VERSION-$THIS_PLATFORM-x64.tar.xz -O node; | |
echo "Untarring node.js tar 'node'..."; | |
tar xf node; | |
echo "Deleting node.js tar 'node'..."; | |
rm node; | |
echo "Copying node.js binaries to /usr/local/bin..."; | |
sudo cp -R node-v$THIS_VERSION-$THIS_PLATFORM-x64/bin/* /usr/local/bin; | |
sudo cp -R node-v$THIS_VERSION-$THIS_PLATFORM-x64/lib/* /usr/local/lib; | |
sudo rm /usr/local/bin/npm; | |
sudo ln -s "/usr/local/lib/node_modules/npm/bin/npm-cli.js" /usr/local/bin/npm; | |
echo "Deleting untarred node.js..."; | |
rm -rf node-v$THIS_VERSION-$THIS_PLATFORM-x64; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment