NodeJS
From SME Server
Jump to navigationJump to search
Prerequesites
- Requires Python 2.7 installed as described in Python Altinstall
- git
yum -y install git
- g++
yum -y install gcc-c++
Install
mkdir -p /var/git cd /var/git RELEASE=$(curl -s http://nodejs.org/download/ |grep Current\ version |awk -F"[><]" '{print $5}') git clone https://github.com/joyent/node.git cd /var/git/node git reset --hard git checkout $RELEASE export PYTHON=/usr/local/bin/python2.7 $PYTHON ./configure make make install
Update
RELEASE=$(curl -s http://nodejs.org/download/ |grep Current\ version |awk -F"[><]" '{print $5}') cd /var/git/node git reset --hard git pull origin $RELEASE-release
Test
node -v