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:
- Install XAMPP
- Install Composer
- Install Node.js
- Install Our Admin Project
- Install Our Client Project
- Configure Environment Variables
- 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,
- Extract the quizix package that you download from CodeCanyon.
- After that you see two zip files called 'core.zip', 'deployment.zip' and 2 folders local_deployment, documentation.
- Now extract the core.zip file to the core folder.
- now you'll get three zip files called
admin.zip
andstandalone-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
- 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
- Start the Apache service and enable it to start on boot:
sudo systemctl start apache2
sudo systemctl enable apache2
- Verify that Apache is running by visiting http://localhost/ in your web browser.
Step 2: Install MySQL
- 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
- Start the MySQL service and enable it to start on boot:
sudo systemctl start mysql
sudo systemctl enable mysql
- (Optional) Secure your MySQL installation by running the following command:
sudo mysql_secure_installation
-
Create a new MySQL database for your Laravel project:
-
Open a terminal window.
-
Run the following command to log in to MySQL:
mysql -u root -p
- Enter your MySQL root password when prompted.
- Create a new database Laravel project:
CREATE DATABASE quizix_db;
- Create a new user:
CREATE USER 'quizix_user'@'localhost' IDENTIFIED BY 'password';
- Grant the user all privileges on the database:
GRANT ALL PRIVILEGES ON quizix_db.* TO 'quizix_user'@'localhost';
- Flush the privileges to ensure that the changes take effect:
FLUSH PRIVILEGES;
- Exit the MySQL shell by running the following command:
EXIT;
Step 3: Install PHP
- 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
- Restart the Apache service to apply the changes:
sudo systemctl restart apache2
- 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
- Visit http://localhost/phpinfo.php in your web browser to view the PHP information.
Step 4: Install Composer
- 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
- Verify that Composer is installed by running the following command:
composer --version
Step 5: Install Node.js
- 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
- Verify that Node.js is installed by running the following command:
node --version
- Install the Node.js package manager (npm) by running the following command:
sudo apt-get install npm
- Verify that npm is installed by running the following command:
npm --version
Step 6: Setup our Quizix Project
- 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.
- Navigate to the project directory and install the project dependencies using Composer:
cd ~/Downloads/quizix-project
- 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
- Create a copy of the
.env.example
file and rename it to.env
:
cp .env.example .env
- Generate an application key by running the following command:
php artisan key:generate
- Run the following command to migrate the database:
php artisan migrate
- Generate the application storage link by running the following command:
php artisan storage:link
- Generate dummy data for testing:
php artisan db:seed
- Start the Laravel development server:
php artisan serve
- Also start the npm server by running the following command:
npm run dev
- Open a web browser and navigate to http://localhost:8000 to view the Admin project.
Step 7: Install Our Client Project
- Extract the client project files to the directory
standalone-client.zip
on core folder and unzip the file. - Open a command prompt and navigate to the project directory.
- Run the following command to install the project dependencies:
npm install --force
- copy the
.env.example
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. 🚀