
note.js 설치
1) 소스파일
http://nodejs.org/download/
wget http://nodejs.org/dist/v0.10.13/node-v0.10.13.tar.gz
2) 설치전 사전 페키지 설치
yum install python*
2-1) python 2.7 설치
> nodejs make 시 에러 발생 python 2.6 이상필요
http://www.python.org/download/
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
./configure
make
make install
3) 설치
어디설치된지 모른게 –prefix=/usr/local/nodejs 잡아줍시당 -0-
tar zxvf node-v0.10.13.tar.gz
cd node-v0.10.13
./configure –prefix=/usr/local/nodejs
make
make install
4) npm 사용하여 모듈추가!
– global 설치!
/usr/local/nodejs/bin/npm install -g express
express@3.3.4 /usr/local/nodejs/lib/node_modules/express
?쒋?? methods@0.0.1
?쒋?? fresh@0.1.0
?쒋?? cookie-signature@1.0.1
?쒋?? range-parser@0.0.4
?쒋?? buffer-crc32@0.2.1
?쒋?? mkdirp@0.3.5
?쒋?? cookie@0.1.0
?쒋?? debug@0.7.2
?쒋?? send@0.1.3 (mime@1.2.9)
?쒋?? commander@1.2.0 (keypress@0.1.0)
?붴?? connect@2.8.4 (uid2@0.0.2, pause@0.0.1, qs@0.6.5, bytes@0.2.0, formidable@1.0.14)
/usr/local/nodejs/bin/npm install -g socket.io
> ws@0.4.27 install /usr/local/nodejs/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/usr/local/nodejs/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build’
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/usr/local/nodejs/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build’
socket.io@0.9.16 /usr/local/nodejs/lib/node_modules/socket.io
?쒋?? base64id@0.1.0
?쒋?? policyfile@0.0.4
?쒋?? redis@0.7.3
?붴?? socket.io-client@0.9.16 (xmlhttprequest@1.4.2, uglify-js@1.2.5, active-x-obfuscator@0.0.1, ws@0.4.27)
이런식으로 완료된 프롬프트를 볼수있다
자자 개발자분들 이제 쓰세요~
make까지 잘 됐는데 make install에서
python tools/install.py install
File “tools/install.py”, line 219
cmd = args[1] if len(args) > 1 else ‘install’
에러가 발생할 수 있다(필자는 발생했다)
이럴땐 파이선 버전이 2.6 이상이라면
# sudo python tools/install.py install
[출처] [CentOS] node.js 설치하기|작성자 제노하트
http://nodejs-kr.org/insidejs/archives/704 조흔싸이트