centos5.7 安裝 nodejs 

一、下載和解壓

網站,請自行下載最新版

# wget http://nodejs.org/dist/latest/node-v0.6.15.tar.gz

# tar zxvf node-v0.6.15.tar.gz

二、先安裝必需套件

gcc, g++, openssl-devel
# yum install gcc-c++
# yum install openssl*

三、組態

# ./configure
# make
# make install

四、安裝npm

# curl http://npmjs.org/install.sh | sh

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7881  100  7881    0     0   7649      0  0:00:01  0:00:01 --:--:-- 37889
tar=/bin/tar
version:
tar (GNU tar) 1.15.1
install npm@1.1
fetching: http://registry.npmjs.org/npm/-/npm-1.1.18.tgz
0.6.15
1.1.18
cleanup prefix=/usr/local

All clean!
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm@1.1.18 /usr/local/lib/node_modules/npm
It worked

done!

完整連結 http://note.tc.edu.tw/762.html

arrow
arrow

    Johnson峰 發表在 痞客邦 留言(0) 人氣()