28.Debian上安装Node.js和npm

1.更新安装必要组件

sudo apt-get update
sudo apt-get install git-core curl build-essential openssl libssl-dev

2.安装Node

最好下载版本https://nodejs.org/download/release/latest-v4.x/

https://nodejs.org/download/release/latest-v4.x/node-v4.8.4.tar.gz

git clone https://github.com/joyent/node.git
cd node
git tag
git checkout v0.10.33

./configure
make
sudo make install

node -v

3.安装npm

https://npm.taobao.org/mirrors/npm/

wget https://npmjs.org/install.sh --no-check-certificate
chmod +x install.sh
./install.sh
npm -v

 

posted @ 2017-09-22 11:02  桃源仙居  阅读(170)  评论(0)    收藏  举报