Skip to content

Instantly share code, notes, and snippets.

@TestingCrypto
Last active November 8, 2018 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save TestingCrypto/df99a664fef4219cdb6b755c7d949e28 to your computer and use it in GitHub Desktop.
Save TestingCrypto/df99a664fef4219cdb6b755c7d949e28 to your computer and use it in GitHub Desktop.
Node / Iquidus Explorer Setup Guide
FIRE Crypto is used in this example.
This Tutorial is going to create a Daemon (node) and install Explorer.
THIS IS NOT GOING TO CREATE A GUI CLIENT.
Follow the instructions in [whatever coin name] docs folder Unix build - some builds are different.
//Testing Linux Mint 18.3 64bit
I setup this up on both Ubuntu 15.10 and 16.04 with no issues.
******************************************
*** Change Password / Update System
******************************************
Change passwords
# sudo passwd //change root password
Update Packages
# sudo apt-get update
# sudo apt-get upgrade -y
Install git and nano
# sudo apt-get install nano git -y
******************************************
*** Installing Pulse Node
******************************************
Get the Source Code
Basic packages to build the coin
# sudo apt-get install build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev miniupnpc libminiupnpc-dev autoconf pkg-config libtool autotools-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev automake -y
Create a Swap File - Low Ram Servers
# sudo fallocate -l 8G /swapfile
# sudo chmod 600 /swapfile
# sudo mkswap /swapfile
# sudo swapon /swapfile
# sudo nano /etc/fstab
Add to fstab file
/swapfile none swap sw 0 0
Adding the Coin
# sudo git clone https://github.com/techcoincommunity/firecoin.git
Change Directories to src/
# cd Firecoin/src/
Compile the code with flags
# sudo make -f makefile.unix USE_UPNP=1
# sudo strip Firecoind
Stat the file with daemon flag so that you can create a config file
# sudo ./Firecoind -daemon
Create a conf file in .Firecoin/Firecoin.conf
# cd
# sudo nano .Firecoin/Firecoin.conf
rescan=1
server=1
txindex=1
daemon=1
listen=1
maxconnections=32
rpcuser=Change2YourUserName
rpcpassword=Change2YourUserPassword
rpcallowip=127.0.0.1
rpcconnect=127.0.0.1
addnode=50.83.11.14
addnode78.46.92.72
addnode=[2604:2d80:4407:85dc:1]
*make sure to set the file to read only.
# sudo chmod 400 .Firecoin/Firecoin.conf
# cd Firecoin/src
# sudo ./Firecoind -daemon -txindex
Check it daemon has started. If it returns information, the daemon is working!
# sudo ./Firecoind getinfo
Stopping the daemon
# sudo ./Firecoind stop
******************************************
*** Setting up the Explorer
*** https://github.com/iquidus/explorer
******************************************
Install MongoDB Community Edition
https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
# echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
# sudo apt-get update
# sudo apt-get install -y mongodb-org
# Reboot your system
# sudo reboot
# sudo service mongod start
Running MongoDB - reference
# sudo service mongod start
# sudo service mongod stop
# sudo service mongod restart
Installing Nodejs
# sudo apt-get update
# sudo apt-get install nodejs nodejs-legacy -y
# sudo apt-get install npm -y
Creating a MongoDB Database
# sudo mongo
> use explorerdb
> db.createUser( { user: "Testing", pwd: "Applications", roles: [ "readWrite" ] } )
> exit
Installing the Explorer
# cd /home/
# git clone https://github.com/iquidus/explorer explorer
# cd explorer && npm install --production
# cp ./settings.json.template ./settings.json
Modify the Settings File
# sudo nano settings.json
See if it's working
# npm start
Update the databases
# sudo node scripts/sync.js index update
# sudo node scripts/peers.js index update
# sudo node scripts/banchmark.js index update
Install Forever to keep the js running
# sudo npm install forever -g
# sudo npm install forever-monitor
Start the Explorer
# forever start bin/cluster
******************************************
*** Installing Cron
*** https://help.ubuntu.com/community/CronHowto
******************************************
# sudo apt-get install gnome-schedule -y
Editing Cron
# sudo crontab -e
Add Cron to File to update the explorer
*/1 * * * * cd /path/to/explorer && /usr/bin/nodejs scripts/sync.js index update > /dev/null 2>&1
*/2 * * * * cd /path/to/explorer && /usr/bin/nodejs scripts/sync.js market > /dev/null 2>&1
*/5 * * * * cd /path/to/explorer && /usr/bin/nodejs scripts/peers.js > /dev/null 2>&1
Add Cron to make sure the Pulsed runs (NOT WORKING)
If anyone has a good reboot for this, please post in the comments.
@reboot cd /root/Pulse/src ./pulsed -daemon -txindex
@reboot cd /root/explorer forever start bin/cluster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment