Node-V0.10.13 Install

Os Version: CentOS release 5.9

Lib Version:  node-v0.10.13


node-v0.10.13-linux-x64.tar.gz Install Procedure:

cd /usr/local/src

wget -c http://nodejs.org/dist/v0.10.13/node-v0.10.13-linux-x64.tar.gz

tar -zxvf node-v0.10.13-linux-x64.tar.gz

mkdir -p /usr/local/node

mv node-v0.10.13-linux-x64/* /usr/local/node/


node-v0.10.13.tar.gz Install Procedure:

cd /usr/local/src

wget -c http://nodejs.org/dist/v0.10.13/node-v0.10.13.tar.gz

tar -zxvf node-v0.10.13.tar.gz

mkdir -p /usr/local/node

cd  node-v0.10.13

./configure --prefix=/usr/local/node

make && make install


Test whether the installation was successful:

cd /usr/local/node

mkdir /usr/local/node/doc

vim HelloWord.js

console.log('Hello World.');

cd /usr/local/node/bin

node HellWord.js



Notice Matter:

nodejs install ./configure error Workaround

An Error Message:

File "./configure", line 261

o['variables']['node_prefix'] = options.prefix if options.prefix else ''

^SyntaxError: invalid syntax


Reason:  Because Python Version Too Low

Solve:

cd /usr/local/src

wget -c http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2

tar -jxvf Python-2.7.3.tar.bz2

cd Python-2.7.3

./configure

make && make install

which python

/usr/local/bin/python2.7 �CV

mv /usr/bin/python /usr/bin/python.bak

ln �Cs /usr/local/bin/python2.7 /usr/bin/python

python �Cv

vim /usr/bin/yum

sed -i '1s/\/usr\/bin\/python/\/usr\/bin\/python2.4/1'/usr/bin/yum







你可能感兴趣的:(node-v0.10.13)