|
|
(未显示同一用户的1个中间版本) |
第1行: |
第1行: |
| ==Install== | | ==Install== |
| | | |
− | ===Install===
| |
| | | |
− | | + | *[https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager Install NodeJS] |
− | ====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稳定版本
| + | |
− | | + | |
− | <pre>
| + | |
− | #!/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'
| + | |
− | </pre>
| + | |
− | | + | |
− | | + | |
− | | + | |
− | ===安装NPM(nodeJS模块管理器)===
| + | |
− | | + | |
− | | + | |
− | *curl <nowiki>http://npmjs.org/install.sh</nowiki> | sudo sh
| + | |
− | | + | |
− | ==资料==
| + | |
− | | + | |
− | *[http://www.ibm.com/developerworks/cn/web/1201_wangqf_nodejs/index.html?ca=drs- 被误解的 Node.js ]
| + | |