Skip to main content

installation

Installation Guide This guide explains how to install TadreebLMS on a fresh Ubuntu server.

Recommended OS: Ubuntu 20.04 / 22.04 Web Server: Apache 2.x PHP Version: 8.2 Composer Version: 2.7.8

  1. Update Server
sudo apt update && sudo apt upgrade -y
  1. Install Apache
sudo apt install apache2 -y
sudo systemctl enable apache2
sudo systemctl start apache2
  1. Install PHP 8.2
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install php8.2 php8.2-cli php8.2-common php8.2-mbstring php8.2-xml php8.2-curl php8.2-zip php8.2-mysql php8.2-bcmath php8.2-gd -y
  1. Install Composer
cd /tmp
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --version=2.7.8
sudo mv composer.phar /usr/local/bin/composer
composer --version
  1. Clone TadreebLMS
cd /var/www
sudo git clone https://github.com/Tadreeb-LMS/tadreeblms.git
sudo chown -R www-data:www-data /var/www/tadreeblms
cd tadreeblms
  1. Setup Storage & Cache
sudo mkdir -p bootstrap/cache
sudo mkdir -p storage/framework/views storage/framework/cache/data storage/framework/sessions storage/logs
sudo chown -R www-data:www-data storage bootstrap/cache public
sudo chmod -R 775 storage bootstrap/cache public
  1. Install & Configure MySQL
sudo apt install mysql-server -y
sudo mysql
CREATE DATABASE laravel_db;
CREATE USER 'laravel'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON laravel_db.* TO 'laravel'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Update .env with database credentials.

  1. Apache Virtual Host
sudo nano /etc/apache2/sites-available/tadreeblms.conf
<VirtualHost *:80>
ServerName YOUR_DOMAIN
DocumentRoot /var/www/tadreeblms/public

<Directory /var/www/tadreeblms/public>
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/tadreeblms_error.log
CustomLog ${APACHE_LOG_DIR}/tadreeblms_access.log combined
</VirtualHost>
sudo a2enmod rewrite
sudo a2ensite tadreeblms.conf
sudo systemctl reload apache2
  1. Access Application

Open in browser:

http://YOUR_DOMAIN

Complete the web-based onboarding to finish setup.