Skip to content

Instantly share code, notes, and snippets.

@ethicnology
Last active July 9, 2022 07:23
Show Gist options
  • Save ethicnology/d6359fb0ca8c98477443cbe23160e84c to your computer and use it in GitHub Desktop.
Save ethicnology/d6359fb0ca8c98477443cbe23160e84c to your computer and use it in GitHub Desktop.
wget, chmod +x and execute
#!/bin/bash
echo Setup bitcoin full node.
echo Specify bitcoin version, e.g. 22.0:
read version
echo Install bitcoin-core version $version
#Download bitcoin-core:
wget https://bitcoincore.org/bin/bitcoin-core-$version/bitcoin-$version-x86_64-linux-gnu.tar.gz
#Download the list of cryptographic checksums:
wget https://bitcoincore.org/bin/bitcoin-core-$version/SHA256SUMS
#Download the signatures attesting to validity of the checksums:
wget https://bitcoincore.org/bin/bitcoin-core-$version/SHA256SUMS.asc
#Verify that the checksum of the release file is listed in the checksums file using the following command:
sha256sum --ignore-missing --check SHA256SUMS
#In the output produced by the above command, you can safely ignore any warnings and failures, but you must ensure the output lists "OK" after the name of the release file you downloaded. For example: bitcoin-22.0-x86_64-linux-gnu.tar.gz: OK
#untar
tar -xvf bitcoin-$version-x86_64-linux-gnu.tar.gz
#install
/usr/bin/sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-$version/bin/*
#run
bitcoind -daemon
#test
sleep 5s; bitcoin-cli getnetworkinfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment