nodeJS
来自Blueidea
Install
Install
apt-get方式安装
- sudo apt-get install python-software-properties
- sudo add-apt-repository ppa:chris-lea/node.js
- sudo apt-get update
- sudo apt-get install nodejs
编译方式安装
此处代码来自于:http://apptob.org/ 其中安装的0.4.12,不过随着时间推移,推荐你安装最新的nodeJS稳定版本
#!/bin/sh ############################################################## # # Author: Ruslan Khissamov, email: rrkhissamov@gmail.com # ############################################################## # Update System echo 'System Update' apt-get -y update echo 'Update completed' # Install help app apt-get -y install libssl-dev git-core pkg-config build-essential curl gcc g++ # Download & Unpack Node.js - v. 0.4.12 echo 'Download Node.js - v. 0.4.12' mkdir /tmp/node-install cd /tmp/node-install wget http://nodejs.org/dist/node-v0.4.12.tar.gz tar -zxf node-v0.4.12.tar.gz echo 'Node.js download & unpack completed' # Install Node.js echo 'Install Node.js' cd node-v0.4.12 ./configure && make && make install echo 'Node.js install completed'
安装NPM(nodeJS模块管理器)
- curl http://npmjs.org/install.sh | sudo sh