build Aliyun Environment-Aliyun CentOS How to install Node.js
Above is the new VPS configuration.
First step:
Start up the server in the Aliyun management console.
Step Two:
SSH Login server SSH root@ your public network IP
Step Three:
Yum First update
Yum-y Update
Fourth Step:
CentOS system to compile the source code of some development tools, we installed together.
Yum-y groupinstall "Development Tools"
Fifth Step:
Select a stable node.js version. My development environment, production environment are v0.10.28
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
Then unpack:
Tar zxvf node-v0.10.28.tar.gz
Enter the Extract directory:
CD node-v0.10.28
Pre-compiling:
./configure–prefix=/homede/0.8.9
Compile:
Make install
Fifth Step:
After the installation is successful, configure a system environment variable
echo "Export path= path:/homede/0.10.28/bin" >>/.bashprofile. /.bashprofile The above step is to first open the. bashprofile file in the root root directory, then add/homede/0.10.28/bin to the system environment variable, and then update the system environment variable path:/homede/ 0.10.28/bin ">> ~/.bash_profile. ~/.bash_profile The above step is to first open the. bash_profile file in the root root directory, and then add/homede/0.10.28/bin to the system environment variable, and then update the system environment variable PATH
You can use the following command to see if you want to add
Echo $PATH
Sixth step:
See if the node variable is in effect:
node–versionv0.10.28
See above to show that the environment variable takes effect.
Here, the entire Node.js environment installation is complete.