NodeJS

From SME Server
Revision as of 23:17, 23 August 2014 by Mmccarn (talk | contribs) (Barebones page on nodejs 10 installation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
PythonIcon.png Skill level: Advanced
The instructions on this page may require deviations from standard procedures. A good understanding of linux and Koozali SME Server is recommended.


Prerequesites

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