forked from lamat1111/QuilibriumScripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
installer
35 lines (29 loc) · 1.7 KB
/
installer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Step 1: Update package lists
echo "Updating package lists..."
apt-get update || { echo "Failed to update package lists! Exiting..."; exit 1; }
# Step 2: Install required packages
echo "Installing required packages..."
apt-get install -y curl wget git tmux nano unzip || { echo "Failed to install required packages! Exiting..."; exit 1; }
# Step 3: Install Rust
echo "Installing Rust..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y || { echo "Failed to install Rust! Exiting..."; exit 1; }
echo 'source $HOME/.cargo/env' >> $HOME/.profile
source $HOME/.profile
# Step 4: Download and install Go
echo "Installing Go..."
wget https://go.dev/dl/go1.20.11.linux-amd64.tar.gz || { echo "Failed to download Go! Exiting..."; exit 1; }
tar -C /usr/local -xzf go1.20.11.linux-amd64.tar.gz || { echo "Failed to extract Go! Exiting..."; exit 1; }
echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.profile
source $HOME/.profile
# Step 4.1: Configure UFW (Uncomplicated Firewall)
echo "Configuring UFW..."
echo "y" | ufw enable || { echo "Failed to enable UFW! Exiting..."; exit 1; }
ufw allow 22 || { echo "Failed to allow SSH port 22! Exiting..."; exit 1; }
ufw allow 8336 || { echo "Failed to allow port 8336! Exiting..."; exit 1; }
ufw allow 443 || { echo "Failed to allow HTTPS port 443! Exiting..."; exit 1; }
ufw status || { echo "Failed to get UFW status! Exiting..."; exit 1; }
# Step 5: Clone ceremonyclient repository
echo "Cloning ceremonyclient repository..."
git clone https://github.com/QuilibriumNetwork/ceremonyclient /ceremonyclient || { echo "Failed to clone repository! Exiting..."; exit 1; }
cd /ceremonyclient/node/ || { echo "Failed to change directory! Exiting..."; exit 1; }