In this guide we will set up sessions folder and give them the right permissions to handle sessions during runtime.
1. Create sessions directory
Navigate to the home folder with the following command:
Create admin sessions directory with the following command:
This will create a directory called admin_sessions in the home directory. Similarly create a frontend sessions directory with the following command:
This will create a directory called frontend_sessions in the home directory.
2. Give permission to the above created sessions directory
Type the following command to give the directory we just created the required persmissions:
sudo chmod -R 777 admin_sessions/ frontend_sessions/
3. Setup cron
Next, we need to set up cron. Enter the following command in your terminal:
you will be prompted the below options as in screenshot
Select Option 2 in the above options
A file will open. Got to the end of the file and copy paste the below lines:
0 0 1 * * /usr/bin/php /var/www/html/cron/monthly_stats.php 0 0 * * * /usr/bin/php /var/www/html/cron/daily_stats.php */10 * * * * /usr/bin/php /var/www/html/cron/get_stats.php */5 * * * * /usr/bin/php /var/www/html/cron/maintenance.php */1 * * * * /var/www/html/cron/process_bitcoin.sh
Save the file by pressing Control + O.
Next, press Enter.
Exit the file by pressing Control + X.
Then, restart cron by using the following command:
sudo service cron restart
4. Go to admin.yourexchangedomain.com
If you have pointed your exchange with IP address instead of domain name you will find your installed exchange admin dashboard from - http://ipaddress/admin
By default the username is admin123 and password is xchange@123
Once you login, go to status -> App Configuration.
Scroll down to Frontend Config and update your Base URL and Dir Root.
Similarly, scroll down to API Config and update your Dir Root.
Next, scroll down to Cron config and update you Dir Root.
Finally, scroll down to Third Party API key section and update the Google reCAPTCHA keys. To know how to generate reCAPTCHA keys visit this guide.
If you have pointed your exchange with IP address instead of domain name you will find your installed exchange from - http://ipaddress/frontend/htdocs
You have now successfully installed the cryptocurrency exchange script. Next step is to install the cryptocurrency wallet.