May 10, 2021 Node.js
In this section, we'll show you how to install Node and .js and Linux.
This installation tutorial is an example .js version of Node v0.10.26.
Node .js installation package and source download address is: http://www.nodejs.org/en/download/.
Choose the Node installation package you need based on .js platform system.
Note: Installing Node .js on Linux requires Python 2.6 or 2.7, and Python 3.0 or more is not recommended.
Windows installation package (.msi) :
32-bit installation package download address: http://nodejs.org/dist/v0.10.26/node-v0.10.26-x86.msi
64-bit installation package download address: http://nodejs.org/dist/v0.10.26/x64/node-v0.10.26-x64.msi
Installation steps:
Step 1: Double-click on the downloaded installation package node-v0.10.26-x86.msi, as follows:
Step 2: Click run above and the following interface will appear:
Step 3: Check the Accept Agreement option and click the next button:
Step 4: Node .js the default installation directory is "C:\Program Files\nodejs", you can modify the directory and click next:
Step 5: Click on the tree icon to select the installation mode you need, then click Next
Step 6: Click Install to start installing the Node .js. Y ou can also click Back to modify the previous configuration. T hen click next:
Installation process:
Click the Finish button to exit the installation wizard.
To detect if the PATH environment variable is configured with Node.js, click Start, Run, enter "cmd" and enter the command "path" and output the following results:
PATH=C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;
c:\python32\python;C:\MinGW\bin;C:\Program Files\GTK2-Runtime\lib;
C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files\nodejs\;
C:\Users\rg\AppData\Roaming\npm
We can see that the environment variable already contains C:\Program Files\nodejs
Check the version .js Node
Windows binary (.exe) installation :
32-bit installation package download address: http://nodejs.org/dist/v0.10.26/node.exe
64-bit installation package download address: http://nodejs.org/dist/v0.10.26/x64/node.exe
Installation steps
Step 1: Double-click on the downloaded installation package Node .exe and the following interface will appear:
Clicking the Run button will appear in the command line window:
version testing
Go to .exe directory where node is located, as follows:
If you get the output above, you have successfully installed .js.
The following sections describe how to install Node under Ubuntu Linux .js. O ther Linux systems, such as Centos, have similar installation steps.
Get the node source code .js Github:
After the download is complete, change the source package name to 'node'.
Modify directory permissions:
Create a compilation file using './configure'.
Compiled: make.
Complete installation: make install.
Finally, let's enter the 'node--version' command to see if .js the node is successfully installed.
The command format is as follows:
sudo apt-get install nodejs
sudo apt-get install npm
1, download the source code, you need to http://nodejs.org/ the latest version of Nodejs, this article v4.5.0 as an example:
cd /usr/local/src/
wget http://nodejs.org/dist/v4.5.0/node-v4.5.0.tar.gz
2, decompression source code
tar zxvf node-v4.5.0.tar.gz
3, compilation and installation
cd node-v4.5.0
./configure --prefix=/usr/local/node/4.5.0
make
make install
4, configuration NODE_HOME, into the profele editing environment variables
vim /etc/profile
Set the nodejs environment variable and add the following on the line of export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL:
#set for nodejs
export NODE_HOME=/usr/local/node/4.5.0
export PATH=$NODE_HOME/bin:$PATH
:wq save and exit, compile/etc/profile makes the configuration effective
source /etc/profile
Verify that the installation configuration was successful
node -v
Output v4.5.0 indicates a successful configuration
The npm module installation path
/usr/local/node/4.5.0/lib/node_modules/
Note: Nodejs website provides compiled Linux binary packages that you can also download and apply directly.