From aec7f6eff7c379e265dea6d4dc7654ea32dfc432 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Wed, 29 Jan 2020 15:46:44 -0500 Subject: [PATCH] Add setup script --- bashrc | 1 - setup.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100755 setup.sh diff --git a/bashrc b/bashrc index 2834d407..e9a3ddf0 100644 --- a/bashrc +++ b/bashrc @@ -111,5 +111,4 @@ if ! shopt -oq posix; then . /etc/bash_completion fi fi -export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/skynet/go/bin diff --git a/setup.sh b/setup.sh new file mode 100755 index 00000000..d0f65031 --- /dev/null +++ b/setup.sh @@ -0,0 +1,38 @@ +#! /usr/bin/env bash +set -e + +# Copy over basic configuration files. +cp ./tmux.conf ~/.tmux.conf +cp ./bashrc ~/.bashrc +source ~/.bashrc + +# Nodejs install prerequisite. From official documentation. +curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash - + +# Yarn install prerequisite. +curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + +# Apt installations. +sudo apt-get update +sudo apt-get -y install tmux htop nload nginx nodejs gcc g++ make yarn git + +# Install pm2 +sudo npm i -g pm2 + +# terminfo for alacritty terminal via ssh +wget -c https://raw.githubusercontent.com/alacritty/alacritty/master/extra/alacritty.info +sudo tic -xe alacritty,alacritty-direct alacritty.info +rm alacritty.info + +# Install Go 1.13.7. +wget -c https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.13.7.linux-amd64.tar.gz +rm go1.13.7.linux-amd64.tar.gz + +# Sanity check that will pass if go installed correctly. +go version + +# Install Sia +git clone https://gitlab.com/NebulousLabs/Sia +cd Sia && git checkout viewnode && make