18 lines
495 B
Bash
18 lines
495 B
Bash
|
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
|
||
|
|