mirror of
https://github.com/openoms/bitcoin-tutorials.git
synced 2025-12-23 22:54:19 +01:00
merge gists
This commit is contained in:
42
electrs/electrs_install_on_RaspiBlitz.sh
Normal file
42
electrs/electrs_install_on_RaspiBlitz.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
# Download this script to your RaspiBlitz:
|
||||
# $ wget https://gist.github.com/openoms/8d365f330f5e1288933e0f4874b56dbd/raw/2cf47bf5cc629e861540f4dd5fa525fd157fc341/electrs_install_on_RaspiBlitz.sh
|
||||
# make it executable:
|
||||
# $ sudo chmod +x install_electrs_on_RaspiBlitz.sh
|
||||
# and run:
|
||||
# $ ./install_electrs_on_RaspiBlitz.sh
|
||||
|
||||
# https://github.com/romanz/electrs/blob/master/doc/usage.md
|
||||
echo""
|
||||
echo"***"
|
||||
echo " Installing Rust - press 1 and [ENTER] when prompted"
|
||||
echo"***"
|
||||
curl https://sh.rustup.rs -sSf | sh
|
||||
|
||||
source $HOME/.cargo/env
|
||||
sudo apt update
|
||||
sudo apt install -y clang cmake # for building 'rust-rocksdb'
|
||||
|
||||
echo""
|
||||
echo"***"
|
||||
echo "Downloading and building electrs. This will will take ~ 30 minutes" # ~ 33 min on an Odroid HC1
|
||||
echo"***"
|
||||
echo""
|
||||
git clone https://github.com/romanz/electrs
|
||||
cd electrs
|
||||
cargo build --release
|
||||
|
||||
echo""
|
||||
echo"***"
|
||||
echo "The electrs database will be built in /mnt/hdd/electrs/db. Takes ~ 18 hours and ~38Gb diskspace"
|
||||
echo"***"
|
||||
echo""
|
||||
|
||||
sudo mkdir /mnt/hdd/electrs
|
||||
sudo chown -R admin:admin /mnt/hdd/electrs
|
||||
sudo ufw allow 50001
|
||||
|
||||
echo "Type the PASSWORD B of your RaspiBlitz followed by [ENTER]:"
|
||||
read PASSWORD_B
|
||||
|
||||
# Run with password B filled in:
|
||||
cargo run --release -- -vvvv --index-batch-size=10 --jsonrpc-import --db-dir /mnt/hdd/electrs/db --cookie="raspibolt:$PASSWORD_B" --electrum-rpc-addr="0.0.0.0:50001"
|
||||
38
electrs/electrum_install_config_and_run.sh
Normal file
38
electrs/electrum_install_config_and_run.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
# Download this script to your linux desktop:
|
||||
# $ wget https://gist.github.com/openoms/8d365f330f5e1288933e0f4874b56dbd/raw/2cf47bf5cc629e861540f4dd5fa525fd157fc341/electrum_install_config_and_run.sh
|
||||
# make it executable:
|
||||
# $ sudo chmod +x electrum_install_config_and_run.sh
|
||||
# and run:
|
||||
# $ ./electrum_install_config_and_run.sh
|
||||
|
||||
# https://electrum.org/#download
|
||||
# Install dependencies:
|
||||
sudo apt-get install python3-pyqt5
|
||||
# Download package:
|
||||
wget https://download.electrum.org/3.3.4/Electrum-3.3.4.tar.gz
|
||||
#Verify signature:
|
||||
wget https://download.electrum.org/3.3.4/Electrum-3.3.4.tar.gz.asc
|
||||
gpg --verify Electrum-3.3.4.tar.gz.asc
|
||||
# Run without installing: tar -xvf Electrum-3.3.4.tar.gz
|
||||
# python3 Electrum-3.3.4/run_electrum
|
||||
# Install with PIP:
|
||||
sudo apt-get install python3-setuptools python3-pip
|
||||
python3 -m pip install --user Electrum-3.3.4.tar.gz[fast]
|
||||
|
||||
echo "Type the PASSWORD B of your RaspiBlitz followed by [ENTER]:"
|
||||
read PASSWORD_B
|
||||
echo "Type the LAN IP ADDRESS of your RaspiBlitz followed by [ENTER]:"
|
||||
read RASPIBLITZ_IP
|
||||
|
||||
# Make Electrum config persist (editing ~/.electrum/config)
|
||||
# sudo nano ~/.electrum/config
|
||||
# "oneserver": true,
|
||||
# "rpcpassword": "$PASSWORD_B",
|
||||
# "rpcuser": "raspibolt",
|
||||
# "server": "192.168.1.239:50001:t",
|
||||
electrum setconfig oneserver true
|
||||
electrum setconfig rpcpassword $PASSWORD_B
|
||||
electrum setconfig rpcuser raspibolt
|
||||
electrum setconfig server $RASPIBLITZ_IP:50001:t
|
||||
|
||||
electrum --oneserver --server=$RASPIBLITZ_IP:50001:t
|
||||
Reference in New Issue
Block a user