Skip to main content

Guide to Install Quizix on Linux

This guide will help you to install Quizix on your Linux machine. Quizix has two parts: the front end and the back end. The front end is a web application which is built using Next.js, and the back end is a server that handles the database and API requests which is built using Laravel.

To install Quizix on your Linux machine, you will need to follow these steps:

  1. Install XAMPP
  2. Install Composer
  3. Install Node.js
  4. Install Our Admin Project
  5. Install Our Client Project
  6. Configure Environment Variables
  7. Start the Frontend and Backend Servers

Prerequisites​

Before you start, make sure you have the following installed on your Linux machine:

Please follow the below steps,

  1. Extract the quizix package that you download from CodeCanyon.
  2. After that you see two zip files called 'core.zip', 'deployment.zip' and 2 folders local_deployment, documentation.
  3. Now extract the core.zip file to the core folder.
  4. now you'll get three zip files called admin.zip and standalone-client.zip on core folder.

As You can see the folder structure like below,

quizix
├── documentation
├── core
│ ├── admin.zip
│ ├── standalone-client.zip
│ └── static-client.zip
├── local_deployment
└── deployment.Zip

Step 1: If you don't have Apache then Install Apache​

  1. Install Apache using the package manager for your Linux distribution. For example, on Ubuntu, you can install Apache using the following command:
sudo apt-get update
sudo apt-get install apache2
  1. Start the Apache service and enable it to start on boot:
sudo systemctl start apache2
sudo systemctl enable apache2
  1. Verify that Apache is running by visiting http://localhost/ in your web browser.

Step 2: Install MySQL​

  1. Install MySQL using the package manager for your Linux distribution. For example, on Ubuntu, you can install MySQL using the following command:
sudo apt-get install mysql-server
  1. Start the MySQL service and enable it to start on boot:
sudo systemctl start mysql
sudo systemctl enable mysql
  1. (Optional) Secure your MySQL installation by running the following command:
sudo mysql_secure_installation
  1. Create a new MySQL database for your Laravel project:

  2. Open a terminal window.

  3. Run the following command to log in to MySQL:

mysql -u root -p
  1. Enter your MySQL root password when prompted.
  2. Create a new database Laravel project:
CREATE DATABASE quizix_db;
  1. Create a new user:
CREATE USER 'quizix_user'@'localhost' IDENTIFIED BY 'password';
  1. Grant the user all privileges on the database:
GRANT ALL PRIVILEGES ON quizix_db.* TO 'quizix_user'@'localhost';
  1. Flush the privileges to ensure that the changes take effect:
FLUSH PRIVILEGES;
  1. Exit the MySQL shell by running the following command:
EXIT;

Step 3: Install PHP​

  1. Install PHP and the required PHP extensions using the package manager for your Linux distribution. For example, on Ubuntu, you can install PHP using the following command:
sudo apt install php8.3 php8.3-curl php8.3-fileinfo php8.3-gd php8.3-bcmath php8.3-gettext php8.3-mbstring php8.3-bcmath php8.3-exif php8.3-mysqli php8.3-pdo php8.3-zip -y
  1. Restart the Apache service to apply the changes:
sudo systemctl restart apache2
  1. Verify that PHP is installed by creating a phpinfo.php file in the Apache web root directory:
echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/phpinfo.php
  1. Visit http://localhost/phpinfo.php in your web browser to view the PHP information.

Step 4: Install Composer​

  1. Download and install Composer by running the following commands:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer

or

 sudo apt-get install composer
  1. Verify that Composer is installed by running the following command:
composer --version

Step 5: Install Node.js​

  1. Install Node.js using the package manager for your Linux distribution. For example, on Ubuntu, you can install Node.js using the following command:
sudo apt-get install nodejs
  1. Verify that Node.js is installed by running the following command:
node --version
  1. Install the Node.js package manager (npm) by running the following command:
sudo apt-get install npm
  1. Verify that npm is installed by running the following command:
npm --version

Step 6: Setup our Quizix Project​

  1. Extract the project files to the directory then in this folder have 2 folder documentation and core folder. Now copy the core folder to the root folder.

Note: If you are a developer please follow the below steps to install our Quizix project. If you are not a developer please don't use the below steps, only follow GUI steps.

  1. Navigate to the project directory and install the project dependencies using Composer:
cd ~/Downloads/quizix-project
  1. Comment the below line on /public/index.php file:
 if (! file_exists(__DIR__.'/../storage/installed')) {
header('Location: /installer/index.php');
exit;
}
// to

// if (! file_exists(__DIR__.'/../storage/installed')) {
// header('Location: /installer/index.php');
// exit;
// }
composer install
  1. Create a copy of the .env.example file and rename it to .env:
cp .env.example .env
  1. Generate an application key by running the following command:
php artisan key:generate
  1. Run the following command to migrate the database:
php artisan migrate
  1. Generate the application storage link by running the following command:
php artisan storage:link
  1. Generate dummy data for testing:
php artisan db:seed
  1. Start the Laravel development server:
php artisan serve
  1. Also start the npm server by running the following command:
npm run dev
  1. Open a web browser and navigate to http://localhost:8000 to view the Admin project.

Step 7: Install Our Client Project​

  1. Extract the client project files to the directory standalone-client.zip on core folder and unzip the file.
  2. Open a command prompt and navigate to the project directory.
  3. Run the following command to install the project dependencies:
npm install --force
  1. copy the .example.env file and rename it to .env.local and update the values in the .env.local file.

Step 8: Configure Environment Variables​

cp .env.example .env.local
NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8000
NEXT_PUBLIC_TOKEN_NAME=token
NEXT_PUBLIC_BASE_URL=http://localhost:3000

Step 9: Start the Frontend​

npm run dev

Now you can access the frontend at http://localhost:3000

Conclusion​

Congratulations! You have successfully installed quizix on your Linux machine. You can now start customizing your application. If you have any questions, feel free to reach out to our support team. 🚀