Installing Smart Report Maker via Composer

In this post, we will cover how to install Smart Report Maker via Composer. The process is divided into the following sections:

Smart Report Maker provides an installation script tailored for each environment, including Linux and Windows. It automates the setup process across various Linux distributions like Ubuntu, Fedora, Debian, Red Hat, and CentOS, with support for both Apache and Nginx as web servers.

Preparation for Smart Report Maker Installation

1- After purchasing and downloading the full version from our download area, navigate to the directory matching your server’s PHP version, where you will find the following files and directories:

  • The srm directory, which contains the system files.
  • install.sh, a shell script that automates Smart Report Maker installation on Linux systems.
  • install.ps1, a PowerShell script that automates Smart Report Maker installation on Windows systems.
File structure within the directory corresponding to your server’s PHP version

2- Upload only the “srm” directory and the correct installer script (for Linux or Windows) to your server, placing them in the desired location, referred to as the installation directory.

Ensure both the “srm” directory and the installer script are at the same level within the installation directory. For example, if you’re installing on a Linux server and using /var/www/html as the installation directory, place the “srm” folder at /var/www/html/srm and the installation script at /var/www/html/install.sh.

Smart Report Maker Installation on Linux

1- Ensure that all steps in the “Preparation for Smart Report Maker Installation” section have been successfully completed.

2- Open your terminal and navigate to the installation directory containing both the “srm” folder and the install.sh script. For example, if the installation directory is /var/www/html, run the following command:

cd /var/www/html

3- To grant execute permission to the install.sh script and set 755 permissions for the “srm” directory, use the following combined command:

sudo chmod +x install.sh && sudo chmod 755 -R srm

4- Verify that the “srm” directory and the install.sh script have the correct permissions by running the following command:

ls -ahl

5- Once you run the installer, it will perform the following tasks:

  • Check if Git is installed. If Composer is available, it will use it; otherwise, it will install Git and its dependencies.
  • Execute all necessary commands to install Smart Report Maker’s dependencies using Composer.
  • Create the necessary symbolic links (soft links).
  • Create a cron job for sending scheduled reports.
  • Adjust the directory permissions as required.

To run the installer, use this command:

./install.sh

6- Installation Execution

  • For Apache Users: The installer will complete all tasks mentioned in step 5 and display a success message with zero errors.
  • For Nginx Users:
    • The installer will complete all tasks listed in Step 5.
    • If both Nginx and Apache are detected on the server, the installer will prompt you to choose which web server to use.
    • If the script cannot locate the PHP-FPM (FastCGI Process Manager) path, it will ask you to provide it.
    • You may be asked to confirm the installation directory. For example, if your “srm” directory is located at /var/www/html/srm, your web root should be /var/www/html/.
    • The installer will generate an Nginx configuration file for Smart Report Maker and prompt you to review or modify it to avoid conflicts with existing sites.
    • You will be given the option to either manually copy the configuration file to the Nginx configuration directory (usually found at /etc/nginx/conf.d/) or let the installer copy it for you automatically.
    • The script will test the Nginx configuration and reload Nginx to apply the changes.

7- Once the installer finishes and displays a success message with zero errors, delete the installer script by running the following command:

rm -f install.sh

8- Open your preferred web browser and navigate to https://domain_name/path-to-installation-directory/srm/dashboard/setup if you’re using Apache, or https://domain_name/srm/dashboard/setup for Nginx. However, If Smart Report Maker is being installed locally on the same machine, use localhost or 127.0.0.1 instead of domain_name.

Note: If you encounter an error, try the following URL instead:
https://your_domain_name/path-to-your-Installation-Directory/srm/dashboard/public/index.php/setup

9- After successfully launching the web installer, click here to proceed with the installation. If you encounter any issues during the installation process, click here for assistance.

Smart Report Maker Installation on Windows

1-Ensure that all steps in the “Preparation for Smart Report Maker Installation” section have been successfully completed.

2- Run your PowerShell command prompt as an administrator by following these steps:

  • Press the Windows key and type “PowerShell.”
  • Right-click on Windows PowerShell from the search results.
  • Select Run as administrator from the context menu.

3- Change to the installation directory containing both the “srm” folder and the install.ps1 script:

cd "C:\path\to\installation\directory"

4- Set the PowerShell Execution Policy and run the script:

powershell -ExecutionPolicy Bypass -File .\install.ps1

Once you run the installer, it will perform the following tasks:

  • Search for the path to php.exe in common locations. If it’s not found, you will be prompted to manually enter the path.
  • Check if Composer is installed. If Composer is available, it will use it; otherwise, it will install Composer and its dependencies.
  • Create the necessary symbolic links (soft links).
  • Execute all necessary commands to install Smart Report Maker’s dependencies using Composer.
  • Adjust the directory permissions as required.

6- Once the installer finishes and displays a success message with zero errors, delete the installer script

Remove-Item -Path ".\install.ps1"

7- Open your preferred web browser and navigate to https://domain_name/path-to-srm/srm/dashboard/setup. If Smart Report Maker is being installed locally on the same machine, use localhost or 127.0.0.1 instead of domain_name.

Note: If you encounter an error, try the following URL instead:
https://your_domain_name/path-to-your-Installation-Directory/srm/dashboard/public/index.php/setup

8- After successfully launching the web installer, click here to proceed with the installation. If you encounter any issues during the installation process, click here for assistance.