Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This page will guide you through the installation of Crater for Bahmni payments on your PC

You can install Crater via Bahmni docker-compose easily. This is the recommended approach. Please see this documentation. The below mentioned installation step is only in case someone wants to perform a direct install of crater on their machine.

Prerequisites

  • MySql( if not installed steps are given in database creation).

  • Apache2

Download Crater Zip.

1.Download the crater zip from the link given below
https://craterapp.com/downloads

2.Or run the command

wget https://craterapp.com/downloads/file/5.0.6 -O crater.zip

this will create a zip named crater.zip in your system

Unzip the folder.
Use commands mentioned below:-

apt install unzip -y
unzip crater.zip

At the end of this module you will be able to access crater and its database on your own PC .

Upload to Server

1.Install the apache web server

apt install apache2	-y

2.move crater folder to server or var folder present in computer

sudo mv crater /var/www/crater.abc.my.id

Do note to point the domain to the uploaded folder

Please note that, Crater must be installed on a primary domain or subdomain. Installing on a sub-folder will not work, for example:

Change permissions

In your crater root folder, run the command:

chmod -R 775 ./

and run these command to change read write permissions, for this you may need to be a root user so use sudo.

chown -R www-data:www-data /var/www/crater.abc.my.id
chmod 775 /var/www/crater.abc.my.id/storage/framework
chmod 775 /var/www/crater.abc.my.id/storage/logs
chmod 775 /var/www/crater.abc.my.id/bootstrap/cache

Add your site in Sites-available

Create virtual hosts file in side /etc/apache2/sites-available
for this you need to make a new file (u need to be a root) follow the steps given below

Copy the content of default-ssl.conf by-

sudo cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/crater.abc.my.id.conf

Edit its content according to your needs :-

sudo nano /etc/apache2/sites-available/abc.conf

Paste the content given below :-

<VirtualHost *:80>
    ServerName crater.abc.my.id    
    DocumentRoot /var/www/crater.abc.my.id/public

    <Directory /var/www/crater.abc.my.id/public>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    
    ErrorLog /var/log/apache2/crater.abc.my.id_error.log
    CustomLog /var/log/apache2/crater.abc.my.id_access.log combined
</VirtualHost>	

Now you need to Install SSL certbot ,follow the commands :-

apt install python3-certbot-apache -y	

SSL request for subdomain crater.abc.my.id.

certbot --non-interactive -m <validemailid> --agree-tos --no-eff-email --apache -d crater.abc.my.id --redirect

Try it now 👇

Now try running localhost or the domain which you are using

You will successfully be able to run installation wizard of crater in your own browser

But you are not done you still need to sync database to the crater

Sync Database-

Install Mysql in your system ;-

sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql.service

Change password for root user :-

sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
exit
sudo mysql_secure_installation

Enter into mysql root and create database named crater follow the steps mentioned below :-

mysql -u root -p
mysql>create database crater;
mysql>create user 'crater'@'localhost' identified by 'secret';
mysql>grant all privileges on crater.* to 'crater'@'localhost';
mysql>flush privileges;
mysql>exit

Use this username,database and password whenever prompted in installation wizard

Installation Wizard :-

Check requirements and permissions

Add database configrations like database name password when prompted

Verify the domain name .

Add the mail id and mail name

Add your information and you are all set to use crater.

Crater successfully installed

  • No labels