Node.js
Before starting: Make sure you have the necessary folders and permissions — get more information.
Links: Homepage | Downloads
Dependencies: None
Version: 11.0.0
Node.js is an open-source, cross-platform runtime environment for developing server-side Web applications in JavaScript.
Get the Code
Switch to /usr/local/src
and download the pre-compiled binaries.
cd /usr/local/src
curl --remote-name http://nodejs.org/dist/vVERSION/node-vVERSION-darwin-x64.tar.gz
Install
Unpack the binaries into /usr/local/mac-dev-env
.
tar -zxvf node-vVERSION-darwin-x64.tar.gz -C /usr/local/mac-dev-env
Create a symbolic link to /usr/local/node
.
sudo ln -s mac-dev-env/node-vVERSION-darwin-x64 /usr/local/node
Shell
Execute the following lines to update your Bash startup script.
echo 'export PATH=/usr/local/node/bin:$PATH' >> ~/.bash_profile
echo 'export MANPATH=/usr/local/node/share/man:$MANPATH' >> ~/.bash_profile
Load the new shell configurations.
source ~/.bash_profile
Verify the Installation
Verify that you have successfully installed Node.js.
node --version