Last active
August 5, 2024 12:12
-
-
Save Pymmdrza/a58700208d74005dd2dd05c0aedf4d4d to your computer and use it in GitHub Desktop.
Install and Running Blockbook in Debian 11, 12 [Bitcoin Explorer Node]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# // ------------------------- [ Config Setup ] ------------------------ // | |
# set permission swapfile | |
chmod 600 /swapfile | |
# create new swapfile | |
mkswap /swapfile | |
# write and added swap file to etc section | |
echo ‘/swapfile none swap sw 0 0’ | tee -a /etc/fstab | |
# system resourse optimize | |
sysctl vm.swappiness=10 | |
echo “vm.swappiness = 10” >> /etc/sysctl.conf | |
# set size for swapfile | |
fallocate -l 8G /swapfile | |
# check swapfile | |
ls -lh /swapfile | |
# swap off | |
swapoff -v /swapfile | |
dd if=/dev/zero of=/swapfile bs=1G count=8 status=progress | |
fsck | |
# swap on | |
swapon /swapfile | |
# // ------------------------- [ Package & Install ] ------------------------ // | |
# update and upgrade | |
apt-get update&&apt-get upgrade -y | |
# install all package + docker from mmdrza.com | |
# if have not curl | |
apt install curl -y | |
# easy install all package requirements | |
curl -sSL https://mmdrza.com/packblockbook | sh | |
# easy install docker | |
curl -sSL https://mmdrza.com/docker | sh | |
# firewall for add port bitcoin process | |
ufw status | |
ufw disable | |
ufw allow 5223 | |
ufw allow 8333 | |
ufw allow 9130 | |
ufw allow 9030 | |
ufw allow 8030 | |
ufw allow 38330 | |
# // restart or reload ufw firewall | |
systemctl restart ufw | |
# // Clone from Github Pymmdrza/blockbook and change to directory blockbook | |
git clone https://github.com/Pymmdrza/blockbook &&cd blockbook | |
# // edit Makefile for set option cache and ... | |
# NO_CACHE = true | |
# TCMALLOC = true | |
# // now open bitcoin file option for edit param command edit. | |
# added option in additional_params : -dbcache=0 -workers=1 | |
# save and back blockbook main directory and run make command for bitcoin node | |
make all-bitcoin | |
cd build | |
# // permision add for apt install backend file and blockbook deb file | |
chown _apt /root/blockbook/build/backend-bitcoin_27.0-satoshilabs-1_amd64.deb | |
chgrp _apt /root/blockbook/build/backend-bitcoin_27.0-satoshilabs-1_amd64.deb | |
chown _apt /root/blockbook/build/blockbook-bitcoin_0.4.0_amd64.deb | |
chgrp _apt /root/blockbook/build/blockbook-bitcoin_0.4.0_amd64.deb | |
# !!! if have not _apt group added | |
groupadd _apt | |
# after add group | |
chmod +x /root/blockbook/build/backend-bitcoin_27.0-satoshilabs-1_amd64.deb | |
chmod +x /root/blockbook/build/blockbook-bitcoin_0.4.0_amd64.deb | |
# or | |
chmod o+r /root/blockbook/build/backend-bitcoin_27.0-satoshilabs-1_amd64.deb | |
chown _apt:_apt /root/blockbook/build/backend-bitcoin_27.0-satoshilabs-1_amd64.deb | |
# Install with apt | |
apt install ./blockbook-bitcoin_0.4.0_amd64.deb ./backend-bitcoin_26.0-satoshilabs-1_amd64.deb -y | |
# Start Backend Service (bitcoin core) | |
systemctl start backend-bitcoin | |
# running this after 30 sec in start backend-bitcoin | |
systemctl enable backend-bitcoin | |
# Start Blockbook Service | |
systemctl start blockbook-bitcoin | |
# running this after 30 sec in start blockbook-bitcoin | |
systemctl enable blockbook-bitcoin | |
# check Running Bitcoin core (backend service) | |
systemctl status backend-bitcoin | |
# Check Running Status Blockbook Service | |
systemctl status blockbook-bitcoin | |
# Wait for sync full data block with bitcoin core in system | |
# Show Log Sync Data Process Can Use Tail and read Log file bitcoin core . | |
tail -f /opt/coins/data/bitcoin/backend/debug.log | |
# Enjoy | |
# Mmdrza.Com - [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment