sudo apt-get update
sudo apt-get install build-essential -y
sudo apt-get install git -y
Node.js itself requires very little in the way of dependencies.
- python - Version 2.6 or 2.7.
- libssl-dev - You will need this if you plan to use SSL/TLS encryption.
-
sudo apt-get install python libssl-dev -y
cd /usr/local/src
1、
sudo mkdir node cd node sudo wget http://nodejs.org/dist/v0.6.17/node-v0.6.17.tar.gz sudo tar -xzvf node-v0.6.17.tar.gz
cd node-v0.6.17 sudo ./configure
2、
cd /usr/local/src sudo git clone git://github.com/joyent/node.git
cd node sudo git checkout v0.6.17
sudo ./configure
sudo make sudo make install
cd /usr/local/src/node sudo git checkout master sudo git pull origin master
sudo git checkout vx.x.x sudo ./configure sudo make sudo make install
mkdir -p ~/local/src cd ~/local/src git clone git://github.com/joyent/node.git cd node git checkout v0.6.17 ./configure --prefix=~/local make make install
时间: 2024-10-22 07:57:50