How to install the Decentralized Exchange SCRIPT?

Instructions to get your Decentralized Exchange script up and running
Post Reply
blockchainscripts
Site Admin
Posts: 184
Joined: Tue Apr 03, 2018 2:12 pm

How to install the Decentralized Exchange SCRIPT?

Post by blockchainscripts »

The Decentralized Exchange script allows you to start an ERC20 Token based system.

NODE Installation:

- Login to the server
- Run the following commands on terminal

Code: Select all

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
Mongo Installation:

Import the public key used by the package management system.

The Ubuntu package management tools (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command to import the MongoDB public GPG Key:

Code: Select all

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv
9DA31620334BD75D9DCB49F368818C72E52529D4
Create a list file for MongoDB. Create the /etc/apt/sources.list.d/mongodb-org-4.0.list list file using the command appropriate for your version of Ubuntu:
Ubuntu 14.04

Code: Select all

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu
trusty/mongodb-org/4.0 multiverse" | sudo
tee/etc/apt/sources.list.d/mongodb-org-4.0.list
Ubuntu 16.04

Code: Select all

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu
xenial/mongodb-org/4.0 multiverse" | sudo tee
/etc/apt/sources.list.d/mongodb-org-4.0.list
Reload local package database. Issue the following command to reload the local package database:

Code: Select all

sudo apt-get update
Install the MongoDB packages
Issue the following command:

Code: Select all

sudo apt-get install -y mongodb-org
DEX-BACKEND Installation

● Login to the server
● Paste the dex-back-end ​code in server
● Run

Code: Select all

 sudo apt install build-essential
● Run the following commands to open the ports.

Code: Select all

ufw allow 9000
ufw allow 22
ufw allow 80
ufw enable
If you face a issue while running, run the commands with sudo
PS:​ for amazon ubuntu you need to open the ports using amazon aws console.
● CD into the directory
Enter the following command

Code: Select all

npm install
● Configure the fields in config.js
● Run

Code: Select all

npm start
● Open your_domain_name.com:9000​ or your_ip_address:9000 ​in the browser

● To View admin panel your_domain_name.com:9000/admin/login​ or
your_ip_address:9000/admin/login ​in the browser

● If everything is fine. Configure the url in dex-front-end​ config.js

● To run the dex-back-end ​in the background

Code: Select all

npm install -g pm2
○ CD into the dex-back-end ​directory

Code: Select all

Run pm2 start app.js
DEX-FRONTEND Installation

● Login to the server
● Run

Code: Select all

sudo apt install apache2
● Paste the content of the dex-front-end​ code in /var/www/html​(Don’t move the folder.
Just content alone)
● CD into the /var/www/html
● Configure the your_domain_name.com:9000​ or your_ip_address:9000 ​in apiServer
field of config.js
● Configure the other fields in config.js

Code: Select all

Run npm install -g browserify
Run chmod +x browserify.sh
Run ./browserify.sh
.
● Open your_domain_name.com​ or your_ip_address ​in the browser
Post Reply

Return to “Installation Guide”