From 9eb8b67b5c88ef074ec9d55e9555e17af4b03621 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Fri, 15 Feb 2019 20:17:30 -0800 Subject: [PATCH] Install blockexplorer dependencies --- net/gce.sh | 2 ++ net/scripts/install-nodejs.sh | 21 +++++++++++++++++++++ net/scripts/install-redis.sh | 7 +++++++ 3 files changed, 30 insertions(+) create mode 100755 net/scripts/install-nodejs.sh create mode 100755 net/scripts/install-redis.sh diff --git a/net/gce.sh b/net/gce.sh index cfd0f6d692..c3de8a7caf 100755 --- a/net/gce.sh +++ b/net/gce.sh @@ -431,6 +431,8 @@ $( add-solana-user-authorized_keys.sh \ install-earlyoom.sh \ install-libssl-compatability.sh \ + install-nodejs.sh \ + install-redis.sh \ install-rsync.sh \ network-config.sh \ remove-docker-interface.sh \ diff --git a/net/scripts/install-nodejs.sh b/net/scripts/install-nodejs.sh new file mode 100755 index 0000000000..c936f1821d --- /dev/null +++ b/net/scripts/install-nodejs.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# +# Reference: https://github.com/nodesource/distributions/blob/master/README.md#deb +# +set -ex + +[[ $(uname) = Linux ]] || exit 1 +[[ $USER = root ]] || exit 1 + +# Install node/npm +curl -sL https://deb.nodesource.com/setup_10.x | bash - +apt-get install -y nodejs +node --version +npm --version + +# Install yarn +curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list +apt-get update -qq +apt-get install -y yarn +yarn --version diff --git a/net/scripts/install-redis.sh b/net/scripts/install-redis.sh new file mode 100755 index 0000000000..263d998c4a --- /dev/null +++ b/net/scripts/install-redis.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -ex + +[[ $(uname) = Linux ]] || exit 1 +[[ $USER = root ]] || exit 1 + +apt-get --assume-yes install redis