Before we start, it would be a good idea to update software repository to
the latest version:
Install Development Tools. Development Tools is a group of tools
for compiling software from sources.
Download Node.js source code. Navigate to
/usr/src directory, download the
source file.You can find the latest Node.js source code in Node.js Official Download Page.
Now we are ready to install.
After the install process done, run
node -v to check if it was installed correctly.
Note: to enable to run an executable in
have to add
/usr/local/bin to your
secure_path using visudo:
secure_path and add
:/usr/local/bin to the end of the path string.
Don’t forget the prefix colon.