-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |