From 0257e0419e5c2b9cfac819d92a829c971b8cbbef Mon Sep 17 00:00:00 2001 From: Peter Blazejewicz Date: Thu, 26 Oct 2017 19:02:49 +0200 Subject: [PATCH] Update for Node 8.8.0 and 8.8.1 - install scripts - readme Thanks! --- README.md | 12 ++++++++++++ install-node-v8.8.0.sh | 36 ++++++++++++++++++++++++++++++++++++ install-node-v8.8.1.sh | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 install-node-v8.8.0.sh create mode 100644 install-node-v8.8.1.sh diff --git a/README.md b/README.md index eed6725..691badb 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,18 @@ $ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/insta $ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.7.0.sh | bash ``` +## v8.8.0 + +```sh +$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.8.0.sh | bash +``` + +## v8.8.1 + +```sh +$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.8.1.sh | bash +``` + ## v.lts ```sh diff --git a/install-node-v8.8.0.sh b/install-node-v8.8.0.sh new file mode 100644 index 0000000..5ab7f8d --- /dev/null +++ b/install-node-v8.8.0.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# By Steven de Salas + +# Based on script by Richard Stanley @ https://github.com/audstanley/Node-MongoDb-Pi/ +# This is for a RaspberryPi Zero but should work across all models. + +VERSION=v8.8.0; + +# Creates directory for downloads, and downloads node +cd ~/ && mkdir temp && cd temp; +wget https://nodejs.org/dist/$VERSION/node-$VERSION-linux-armv6l.tar.gz; +tar -xzf node-$VERSION-linux-armv6l.tar.gz; +# Remove the tar after extracing it. +sudo rm node-$VERSION-linux-armv6l.tar.gz; +# This line will clear existing nodejs +sudo rm -rf /opt/nodejs; +# This next line will copy Node over to the appropriate folder. +sudo mv node-$VERSION-linux-armv6l /opt/nodejs/; +# Remove existing symlinks +sudo unlink /usr/bin/node; +sudo unlink /usr/sbin/node; +sudo unlink /sbin/node; +sudo unlink /usr/local/bin/node; +sudo unlink /usr/bin/npm; +sudo unlink /usr/sbin/npm; +sudo unlink /sbin/npm; +sudo unlink /usr/local/bin/npm; +# Create symlinks to node && npm +sudo ln -s /opt/nodejs/bin/node /usr/bin/node; +sudo ln -s /opt/nodejs/bin/node /usr/sbin/node; +sudo ln -s /opt/nodejs/bin/node /sbin/node; +sudo ln -s /opt/nodejs/bin/node /usr/local/bin/node; +sudo ln -s /opt/nodejs/bin/npm /usr/bin/npm; +sudo ln -s /opt/nodejs/bin/npm /usr/sbin/npm; +sudo ln -s /opt/nodejs/bin/npm /sbin/npm; +sudo ln -s /opt/nodejs/bin/npm /usr/local/bin/npm; diff --git a/install-node-v8.8.1.sh b/install-node-v8.8.1.sh new file mode 100644 index 0000000..a22fb09 --- /dev/null +++ b/install-node-v8.8.1.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# By Steven de Salas + +# Based on script by Richard Stanley @ https://github.com/audstanley/Node-MongoDb-Pi/ +# This is for a RaspberryPi Zero but should work across all models. + +VERSION=v8.8.1; + +# Creates directory for downloads, and downloads node +cd ~/ && mkdir temp && cd temp; +wget https://nodejs.org/dist/$VERSION/node-$VERSION-linux-armv6l.tar.gz; +tar -xzf node-$VERSION-linux-armv6l.tar.gz; +# Remove the tar after extracing it. +sudo rm node-$VERSION-linux-armv6l.tar.gz; +# This line will clear existing nodejs +sudo rm -rf /opt/nodejs; +# This next line will copy Node over to the appropriate folder. +sudo mv node-$VERSION-linux-armv6l /opt/nodejs/; +# Remove existing symlinks +sudo unlink /usr/bin/node; +sudo unlink /usr/sbin/node; +sudo unlink /sbin/node; +sudo unlink /usr/local/bin/node; +sudo unlink /usr/bin/npm; +sudo unlink /usr/sbin/npm; +sudo unlink /sbin/npm; +sudo unlink /usr/local/bin/npm; +# Create symlinks to node && npm +sudo ln -s /opt/nodejs/bin/node /usr/bin/node; +sudo ln -s /opt/nodejs/bin/node /usr/sbin/node; +sudo ln -s /opt/nodejs/bin/node /sbin/node; +sudo ln -s /opt/nodejs/bin/node /usr/local/bin/node; +sudo ln -s /opt/nodejs/bin/npm /usr/bin/npm; +sudo ln -s /opt/nodejs/bin/npm /usr/sbin/npm; +sudo ln -s /opt/nodejs/bin/npm /sbin/npm; +sudo ln -s /opt/nodejs/bin/npm /usr/local/bin/npm;