Installation Steps
Installation Methods
Please note that we provide a one-time free first time installation service with your purchase. You can make use of this service if you are not technical or experience any difficulties following these steps. You can request the service at https://zentutor.pro/#free-installation-service
Depending on your hosting environment, follow the appropriate steps:
- Shared Hosting (cPanel) – For users with cPanel-based shared hosting.
- Self-Hosting (VPS/Dedicated Server) – For users with full control over their servers.
- Docker-Based Deployment – For users who prefer containerized deployment.
Shared Hosting (cPanel)
Step 1: Prepare Your cPanel Account
- Log in to your cPanel account.
- Go to MySQL Databases and create a new database (e.g.,
zen_teacher_db
). - Create a database user and assign it to the database with All Privileges.
- Note down the database name, user, and password for later use.
Step 2: Upload Files
For Main Domain Installation:
-
In cPanel, open File Manager.
-
Navigate to your home directory (not inside
public_html
). -
Upload the ZenTutor Pro
.zip
file and extract it. -
Rename the extracted folder to
zentutor
. -
Make note of the full path (e.g.,
/home/username/zentutor
). -
Now you need to link the project's public directory to your public_html:
# Backup existing public_html if needed
mv public_html public_html_backup
# Create symbolic link
ln -s /home/username/zentutor/public public_htmlYou can use ssh connection or terminal menu in cpanel to perform step 6.
For Subdomain Installation:
- In cPanel, go to Subdomains and create a new subdomain (e.g.,
app.yourdomain.com
). - Open File Manager and navigate to the subdomain's directory (usually in a format like
app.yourdomain.com
). - Upload the ZenTutor Pro
.zip
file to this directory and extract it. - Modify the subdomain's document root to point to the
public
folder inside your extracted directory.- Go to Domains > find your subdomain > click Manage.
- Change the document root to include
/public
at the end (e.g.,/home/username/app.yourdomain.com/public
). - Save changes.
Step 3: Configure Environment File
- In the project directory (
zentutor
for main domain or subdomain directory), locate the.env.example
file. - Make a copy of this file and rename it to
.env
(or use File Manager to copy and rename). - Edit the
.env
file and update the database details:DB_DATABASE=zen_teacher_db
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password - Update other settings as needed (APP_URL, etc.).
- Save the file.
Step 4: Set Up Application
-
Open cPanel Terminal or use SSH to connect to your server.
-
Navigate to your project directory:
# For main domain
cd /home/username/zentutor
# For subdomain
cd /home/username/app.yourdomain.com -
Run the following commands:
php artisan key:generate
php artisan migrate --seed
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan storage:link -
Set file permissions:
chmod -R 775 storage bootstrap/cache
Step 5: Configure Cron Jobs
-
Go to Cron Jobs in cPanel.
-
Add the following cron job to run every minute:
# For main domain
* * * * * cd /home/username/zentutor/ && php artisan schedule:run >> /dev/null 2>&1
* * * * * cd /home/username/zentutor/ && php artisan queue:work --queue=default --stop-when-empty >> /dev/null 2>&1
* * * * * cd /home/username/zentutor/ && php artisan queue:work --queue=emails --stop-when-empty >> /dev/null 2>&1
# For subdomain
* * * * * cd /home/username/app.yourdomain.com/ && php artisan schedule:run >> /dev/null 2>&1
* * * * * cd /home/username/app.yourdomain.com/ && php artisan queue:work --queue=default --stop-when-empty >> /dev/null 2>&1
* * * * * cd /home/username/app.yourdomain.com/ && php artisan queue:work --queue=emails --stop-when-empty >> /dev/null 2>&1
Replace /home/username/
with your actual home directory path.
Step 6: Access Your Application
Visit your domain or subdomain URL to access ZenTutor Pro:
- Main domain:
https://yourdomain.com
- Subdomain:
https://app.yourdomain.com
Self-Hosting (VPS/Dedicated Server)
Step 1: Server Preparation
Ensure your server meets the requirements.
1. Update Server Packages
Run the following commands to update your system:
sudo apt update && sudo apt upgrade -y
2. Install Required Software
sudo apt install -y nginx mysql-server php8.1 php8.1-cli php8.1-fpm php8.1-mbstring php8.1-xml php8.1-curl php8.1-zip php8.1-bcmath php8.1-gd php8.1-mysql unzip git redis
Step 2: Set Up Database
# Secure MySQL installation
sudo mysql_secure_installation
# Access MySQL
sudo mysql
# Create database and user
CREATE DATABASE zentutor_db;
CREATE USER 'zentutor_user'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON zentutor_db.* TO 'zentutor_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 3: Upload the Project
- Upload the ZenTutor Pro package to your server
- Extract it to
/var/www/zentutor
Step 4: Configure Environment Variables
Copy the example environment file and update it:
cp .env.example .env
nano .env
Edit the following fields:
APP_NAME="ZenTutor Pro"
APP_URL=https://yourdomain.com
DB_DATABASE=zentutor_db
DB_USERNAME=zentutor_user
DB_PASSWORD=your_secure_password
Save and exit (CTRL+X
, then Y
, then Enter
).
Step 5: Install Dependencies
# Install Composer if not already installed
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
# Install PHP dependencies
cd /var/www/zentutor
composer install --no-dev --optimize-autoloader
# Install and build frontend assets (if needed)
npm install && npm run build
Step 6: Set Up Application
Run the migrations and seed the database:
php artisan key:generate
php artisan migrate --seed
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan storage:link
Step 7: Set File Permissions
sudo chown -R www-data:www-data /var/www/zentutor
sudo chmod -R 775 /var/www/zentutor/storage /var/www/zentutor/bootstrap/cache
Step 8: Configure Web Server (Nginx)
Create a new Nginx configuration file:
sudo nano /etc/nginx/sites-available/zentutor
Paste the following:
server {
listen 80;
server_name yourdomain.com;
root /var/www/zentutor/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
Save and exit. Then enable the configuration:
sudo ln -s /etc/nginx/sites-available/zentutor /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
Step 9: Set Up Cron Job
sudo crontab -e
Add the following line:
* * * * * cd /var/www/zentutor && php artisan schedule:run >> /dev/null 2>&1
* * * * * cd /var/www/zentutor && php artisan queue:work --queue=default --stop-when-empty >> /dev/null 2>&1
* * * * * cd /var/www/zentutor && php artisan queue:work --queue=emails --stop-when-empty >> /dev/null 2>&1
Step 10: Configure SSL (Recommended)
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com
Docker-Based Deployment
This method is recommended only for users who is experienced in docker based deployment. If you are faimiliar with deploying Laravel apps with docker then you could follow this step.
Step 1: Install Docker & Docker Compose
Ensure Docker and Docker Compose are installed:
# For Ubuntu/Debian
sudo apt update
sudo apt install -y docker.io docker-compose
# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker
# Add your user to the docker group (optional, for convenience)
sudo usermod -aG docker $USER
# Log out and log back in for this to take effect
Step 2: Prepare Project Files
# Create project directory
mkdir -p ~/zentutor
cd ~/zentutor
# Download or clone the project
git clone https://github.com/your-repo/zentutor-pro.git .
# OR upload your project files to this directory
Step 3: Create Environment File
cp .env.example .env
nano .env
Update the environment settings for Docker:
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=zentutor
DB_USERNAME=zentutor
DB_PASSWORD=your_secure_password
Step 4: Create Docker Compose File
Create or edit docker-compose.yml
:
nano docker-compose.yml
Add the following content:
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: zentutor-app
restart: unless-stopped
volumes:
- ./:/var/www/html
networks:
- zentutor-network
depends_on:
- db
- redis
nginx:
image: nginx:latest
container_name: zentutor-nginx
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./:/var/www/html
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
networks:
- zentutor-network
depends_on:
- app
db:
image: mysql:8.0
container_name: zentutor-db
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
volumes:
- zentutor-db-data:/var/lib/mysql
networks:
- zentutor-network
redis:
image: redis:alpine
container_name: zentutor-redis
restart: unless-stopped
networks:
- zentutor-network
networks:
zentutor-network:
driver: bridge
volumes:
zentutor-db-data:
driver: local
Step 5: Create Dockerfile and Nginx Config
Create the necessary Docker configuration files:
# Create directories
mkdir -p docker/nginx
# Create Dockerfile
nano Dockerfile
Add the following content to Dockerfile
:
FROM php:8.1-fpm
# Install dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
libzip-dev \
zip \
unzip
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY . /var/www/html
# Set file permissions
RUN chown -R www-data:www-data /var/www/html
# Expose port 9000
EXPOSE 9000
# Start PHP-FPM server
CMD ["php-fpm"]
Create Nginx configuration:
nano docker/nginx/default.conf
Add the following content:
server {
listen 80;
index index.php index.html;
server_name localhost;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
Step 6: Run the Application
Build and start the containers:
docker-compose up -d
Step 7: Set Up the Application
Run the necessary Laravel commands:
docker-compose exec app composer install --optimize-autoloader --no-dev
docker-compose exec app php artisan key:generate
docker-compose exec app php artisan migrate --seed
docker-compose exec app php artisan config:cache
docker-compose exec app php artisan route:cache
docker-compose exec app php artisan view:cache
Step 8: Configure Cron Job
Set up a cron job on the host system:
crontab -e
Add the following line:
* * * * * cd /opt/zentutor && php artisan schedule:run >> /dev/null 2>&1
* * * * * cd /opt/zentutor && php artisan queue:work --queue=default --stop-when-empty >> /dev/null 2>&1
* * * * * cd /opt/zentutor && php artisan queue:work --queue=emails --stop-when-empty >> /dev/null 2>&1
Step 9: Access the Application
Visit http://localhost
or your server's IP address to access ZenTutor Pro.
🚀 Installation complete! You can now log in and start using ZenTutor Pro.
Troubleshooting
Common Issues and Solutions
-
500 Internal Server Error
- Check your
.env
file configuration - Verify file permissions on
storage
andbootstrap/cache
directories - Check the Laravel log file at
storage/logs/laravel.log
- Check your
-
Database Connection Errors
- Verify your database credentials in
.env
- Make sure your database server is running
- Check if the database user has proper permissions
- Verify your database credentials in
-
Blank Page After Installation
- Check if you've correctly linked the public directory
- Verify that your web server is properly configured
- Check your web server's error logs
If you encounter any other issues, please contact our support team or request our free installation service.