Skip to content

Instantly share code, notes, and snippets.

@v3rlly
Last active May 26, 2022 19:12
Show Gist options
  • Save v3rlly/cf159193c2925d0343c02c9a2f253fe2 to your computer and use it in GitHub Desktop.
Save v3rlly/cf159193c2925d0343c02c9a2f253fe2 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Install required packages for Blockscout
#
# Tested on: Debian 11 Bullseye
#
set -eu;
# create temporary working directory
mkdir -p /tmp/temp_blockscout && pushd /tmp/temp_blockscout;
# Download Erlang compatible version
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && dpkg -i erlang-solutions_2.0_all.deb && rm erlang-solutions_2.0_all.deb;
# install packages
apt update;
apt install -y curl wget build-essential;
apt install -y erlang;
apt install -y elixir;
apt install -y postgresql postgresql-contrib;
apt install -y automake;
apt install -y libtool;
apt install -y inotify-tools;
apt install -y gcc g++;
apt install -y libgmp-dev;
apt install -y make;
# Install NVM / NodeJS
if [[ ! $(command -v node) ]]
then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash;
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Install NodeJS LTS Version
nvm install --lts;
fi
# Install Rust / Cargo
if [[ ! $(command -v cargo) ]]
then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh;
fi
# Finish.
popd;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment