Install node binaries from (shell script)

This commit is contained in:
Tom Russell 2018-08-04 12:36:58 +01:00
parent 2d06bfe779
commit 9711385963

17
provision/install_node.sh Normal file
View File

@ -0,0 +1,17 @@
set -x
# node
NODE_VERSION=v8.11.3
DISTRO=linux-x64
wget -nc https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$DISTRO.tar.xz
sudo mkdir /usr/local/lib/node
sudo tar xf node-v8.11.3-linux-x64.tar.xz -C /usr/local/lib/node
sudo mv /usr/local/lib/node/node-$NODE_VERSION-$DISTRO /usr/local/lib/node/node-$NODE_VERSION
rm node-$NODE_VERSION-$DISTRO.tar.xz
cat >> ~/.profile <<EOF
# Nodejs
export NODEJS_HOME=/usr/local/lib/node/node-$NODE_VERSION/bin
export PATH=\$NODEJS_HOME:\$PATH
EOF