Application Installation - accubits/smart-kyc GitHub Wiki

Install Apache

To install apache run the following command

sudo apt-get install apache2

To check the apache version run the following command

apache2 -v

Install PHP

If you want to deploy your application based on the LAMP stack, usually, you can install the below packages after installing Apache

sudo apt-get install -y apache2 sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip

Alternatively, if you want to deploy your application based on the LEMP stack, you can install the following packages after installing Nginx:

sudo apt-get install -y nginx sudo apt-get install -y php7.0 php7.0-fpm php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip

After the installation, you can confirm that with: php -v

Restart Server

To restart the server run the following command sudo /etc/init.d/apache2 restart

Install MysqlDB

To install mysql run the following command

sudo add-apt-repository -y ppa:ondrej/mysql-5.6 sudo apt-get update sudo apt-get install mysql-server-5.6

To check the version of mysql run the following command mysql --version

Install Redis

Run the following commands to install redis

sudo apt-get install redis-server sudo apt-get install php-redis

To check the redis version run the following command redis-server --version

Update config.php

After creating the database, DB configuration and other details in the config.php file inside config folder.

Now run the init.php inside config folder

The application should be running now.

Update js/config.js

Once the backend configurations are ready, connect the frontend to the backend by changing the ServerApi variable to the project root.

Add Admin

Use the API http://yourip/users/addAdmin.php for adding a new admin. Please find the parameters for the API below

userRegistration_username userRegistration_email userRegistration_password

This will create a new admin account in the system.

IMPORTANT: remove this API once you are deploying it in production.