Last active
February 20, 2024 08:15
-
-
Save crappyrules/5087dd1485064620dcc97420e7af8f84 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# This script will install all needed dependencies to run the backend for a public node. | |
# The script is designed to work on Debian 9 stretch | |
# If you do not have a github account, create one to simplify the install process | |
# First fork this repo https://github.com/crappyrules/turtlecoind-ha/tree/script then edit index.js line 67 to add your wallet address and 68 for set your node fee | |
# Then fork this gist https://gist.github.com/crappyrules/5087dd1485064620dcc97420e7af8f84/forks. Edit line 21 to point to your github and not mine | |
# so it would be git clone -b script https://github.com/YOURGITHUBNAME/turtlecoind-ha.git | |
# after you've forked and edited the script on github, click the Raw button at the top of the code. copy that URL | |
# go to your bash prompt and type | |
# sudo apt update && sudo apt install -y wget && wget URL TO YOUR GIST GOES HERE | |
# then type chmod +x trtlnode.sh && ./trtlnode.sh | |
# once the script is done running, turtlecoind-ha will be syncing the chain inside a screen session. You can check the status of it by typing screen -r | |
# to exit the screen and keep it running, type CTRL A then d | |
# to stop it type screen -r then CTRL C | |
# to restart the process inside a screen session after a reboot of if you disconnected by accident paste this into your bash shell | |
# cd ~ && cd turtlecoin-v0.8.3/turtlecoind-ha && screen -d -m -S TurtleNode bash -c 'node service.js' | |
# Update apt | |
sudo apt update | |
# Now we set up 2gb of swap space to ensure we do not run out of memory while compiling or running the daemon under normal load. | |
sudo apt install -y dphys-swapfile | |
# Set size of swap file and setup swapfile | |
sudo su -c 'echo "CONF_SWAPSIZE=2048" > /etc/dphys-swapfile' | |
sudo dphys-swapfile setup | |
# Then we enable the new swapfile | |
sudo dphys-swapfile swapon | |
# These are the dependencies to run the daemon, wallets and a few other necesseties thrown in for good measure | |
sudo apt install -y build-essential python-dev cron gcc g++ git cmake libboost-all-dev curl nano nginx unzip screen | |
# Installation of Nodejs and NPM | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
# Grab the latest release of TurtleCoin from github and extract it | |
wget https://github.com/turtlecoin/turtlecoin/releases/download/v0.8.3/turtlecoin-v0.8.3-linux.tar.gz | |
tar xvf turtlecoin-v0.8.3-linux.tar.gz | |
cd turtlecoin-v0.8.3 | |
# You need to fork this repo, and edit | |
git clone -b script https://github.com/crappyrules/turtlecoind-ha.git | |
cp TurtleCoind turtlecoind-ha | |
cd turtlecoind-ha | |
wget https://github.com/turtlecoin/checkpoints/raw/master/checkpoints.csv | |
npm i | |
screen -d -m -S TurtleNode bash -c 'node service.js' | |
#just a little extra to let you know I care! | |
wget https://gist.githubusercontent.com/crappyrules/dd8152f43ec920d3feebba1454879043/raw/db292e59bbd505ce5eb94fad7ff2e04ed1810c44/motd | |
sudo rm /etc/motd | |
sudo mv motd /etc/motd | |
echo "TurtleCoin is now installed and ready!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment