-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.sh
More file actions
32 lines (25 loc) · 1.24 KB
/
Copy pathserver.sh
File metadata and controls
32 lines (25 loc) · 1.24 KB
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
#!/usr/bin/env bash
# Install and run a basiccoin node on a linux machine
set -ex
# Get curl and git
sudo apt-get update
sudo apt-get install -y curl git
# Get golang
curl -LO https://go.dev/dl/go1.20.5.linux-amd64.tar.gz
tar xvf go1.20.5.linux-amd64.tar.gz
sudo chown -R root:root ./go
sudo mv go /usr/local
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.bashrc
# shellcheck disable=SC1090
source ~/.bashrc
# Get basiccoin
git clone https://github.com/Levilutz/basiccoin.git
cd basiccoin
go build -o bcnode ./cmd/bcnode
# Run server
ufw allow 21720/tcp
ufw reload
nohup ./bcnode --new-network=true --listen=true --addr=coin1.levilutz.com:21720 --miners=1 --payout=eeeeeed6bdacc4d88f6e07ba9070a3bcc1d1648cb8393ecb47bbe02235e48a5a --http-wallet --save-dir=/root/chain > ~/basiccoin.out 2> ~/basiccoin.err &
# nohup ./bcnode --listen=true --addr=coin2.levilutz.com:21720 --miners=1 --payout=eeeeeed6bdacc4d88f6e07ba9070a3bcc1d1648cb8393ecb47bbe02235e48a5a --save-dir=/root/chain > ~/basiccoin.out 2> ~/basiccoin.err &
# nohup ./bcnode --listen=true --addr=coin3.levilutz.com:21720 --miners=1 --payout=eeeeeed6bdacc4d88f6e07ba9070a3bcc1d1648cb8393ecb47bbe02235e48a5a --save-dir=/root/chain > ~/basiccoin.out 2> ~/basiccoin.err &
tail --follow ~/basiccoin.out