merge gists

This commit is contained in:
openoms
2019-03-17 09:43:22 +00:00
parent 3c98f3b66b
commit 8813c3044c
5 changed files with 131 additions and 26 deletions

View 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"

View 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

View File

@@ -1,41 +1,27 @@
# on the RaspiBlitz
go run openbazaard.go stop
rm -r /home/admin/.openbazaar
https://github.com/OpenBazaar/openbazaar-go/blob/master/docs/install-linux.md
cd $GOPATH/src/github.com/OpenBazaar/openbazaar-go
go run openbazaard.go init
go run openbazaard.go setapicreds
go run openbazaard.go start
go run $GOPATH/src/github.com/OpenBazaar/openbazaar-go/openbazaard.go start
https://api.docs.openbazaar.org/
### To restore your OpenBazaar node only from the backup seed:
# on the linux desktop:
echo "Type the LAN IP ADDRESS of your RaspiBlitz followed by [ENTER]:"
read RASPIBLITZ_IP
scp -r ~/.openbazaar admin@$RASPIBLITZ_IP:/home/admin/
# To restore your OpenBazaar node only from the backup seed:
root@DietPi:~# go run $GOPATH/src/github.com/OpenBazaar/openbazaar-go/openbazaard.go restore -d /root/.openbazaar -m "word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12"
https://openbazaar.zendesk.com/hc/en-us/articles/360002820331-How-do-I-restore-my-OpenBazaar-wallet-from-seed-
Restore your shop from a backup copy your existing .openbazaar dir to /root/.openbazaar
# Restore your shop from a backup copy your existing .openbazaar dir to /root/.openbazaar
fdisk -l
mount /dev/sda1 /mnt/usbdrive
cp -R /mnt/usbdrive/OpenBazaar2.0/* /root/.openbazaar/
https://openbazaar.zendesk.com/hc/en-us/articles/360002820331-How-do-I-restore-my-OpenBazaar-wallet-from-seed-
Install on your desktop:
https://openbazaar.org/download/
# links and paths for DietPi
sudo nano /mnt/dietpi_userdata/openbazaar/config
sudo nano /root/.openbazaar/config
cd /mnt/dietpi_userdata/go/src/github.com/OpenBazaar/openbazaar-go/
https://freedomnode.com/blog/80/how-to-install-and-configure-new-openbazaar-2-0-on-linux-and-mac-os-x
root@DietPi:/mnt/dietpi_userdata/go/src/github.com/OpenBazaar/openbazaar-go# go run openbazaard.go -h
@@ -62,4 +48,3 @@ Available commands:
stop shutdown the server and disconnect

View File

@@ -0,0 +1,7 @@
# Install openbazaar client (https://github.com/OpenBazaar/openbazaar-desktop)
# https://freedomnode.com/blog/80/how-to-install-and-configure-new-openbazaar-2-0-on-linux-and-mac-os-x
git clone https://github.com/OpenBazaar/openbazaar-desktop
npm install
npm start

View File

@@ -0,0 +1,33 @@
# https://www.zokos.com/blog/site/public/2019/01/12/Self-Host%20your%20Own%20OpenBazaar%20Store/
# https://github.com/OpenBazaar/openbazaar-go/blob/master/docs/install-linux.md
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install build-essential git -y
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=/usr/local/gocode
export PATH=$PATH:$GOPATH/bin
go get github.com/OpenBazaar/openbazaar-go
cd /usr/local/gocode/src/github.com/OpenBazaar/openbazaar-go
go run openbazaard.go init
# Generating Ed25519 keypair...Done
# 2019/03/09 10:57:29 Initializing OpenBazaar node at /home/admin/.openbazaar
# OpenBazaar repo initialized at /home/admin/.openbazaar
go run openbazaard.go setapicreds
# Enter username:
# Enter a veerrrry strong password:
# Confirm your password:
cd $HOME/.openbazaar
sed -i -- 's/127.0.0.1/0.0.0.0/g' config
cd /usr/local/gocode/src/github.com/OpenBazaar/openbazaar-go
sudo ufw allow 4002
go run openbazaard.go start &
# https://api.docs.openbazaar.org/