Installation & Setup

Chapter 2: Installation & Setup

This chapter covers the complete installation process for the School Management System.

---

2.1 Pre-Installation Requirements

Server Requirements

Before installing, ensure your server meets these requirements:

RequirementMinimumRecommended
-----------------------------------
PHP Version8.2+8.2 or higher
MySQL Version5.7+8.0+
Web ServerApache/NginxApache 2.4+
RAM2GB4GB+
Disk Space5GB20GB+
ComposerLatestLatest

Required PHP Extensions

  • OpenSSL
  • PDO
  • Mbstring
  • Tokenizer
  • XML
  • Ctype
  • JSON
  • Fileinfo
  • curl
  • Database Requirements

    • Create an empty database
  • Note the database credentials (host, username, password, database name)
  • ---

    2.2 Installation Methods

    Method A: Manual Installation (Recommended)

    #### Step 1: Download Source Code `bash git clone https://github.com/your-repo/school-management-system.git cd school-management-system `

    #### Step 2: Install Dependencies `bash composer install `

    #### Step 3: Configure Environment

  • Copy the example environment file:
  • `bash cp .env.example .env `

  • Edit .env file with your database credentials:
  • `env DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=school_db DB_USERNAME=root DB_PASSWORD=your_password `

    #### Step 4: Generate Application Key `bash php artisan key:generate `

    #### Step 5: Run Migrations `bash php artisan migrate `

    #### Step 6: Seed Initial Data (Optional) `bash php artisan db:seed `

    #### Step 7: Set Permissions `bash

    Linux/Mac

    chmod -R 755 storage/ chmod -R 755 bootstrap/cache/ chown -R www-data:www-data storage/ `

    #### Step 8: Configure Web Server

    For Apache (.htaccess): Ensure the public/.htaccess file is properly configured.

    For Nginx: Add server block: `nginx server { listen 80; server_name yourdomain.com; root /path/to/public; index index.php index.html; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; } location /storage { alias /path/to/storage/app/public; } } `

    #### Step 9: Complete Installation

    • Open your browser and navigate to your domain
    • Follow the on-screen installation wizard
    • Create your admin account
  • Complete initial configuration
  • ---

    Method B: Using Install Script

    #### Step 1: Upload Files Upload all files to your server's web directory (public_html or www or htdocs).

    #### Step 2: Set Permissions Ensure the following folders are writable:

  • /storage
  • /bootstrap/cache
  • /public/uploads
  • #### Step 3: Run Installation Script Navigate to: https://yourdomain.com/install

    Note: The install script may already be included in your package.

    ---

    2.3 Post-Installation Checklist

    After successful installation, verify these items:

    Database

    • [ ] Database connection established
    • [ ] All tables created
  • [ ] Initial data seeded (if selected)
  • File Permissions

    • [ ] Storage directory writable
    • [ ] Cache directory writable
  • [ ] Upload directory writable
  • Configuration

    • [ ] Application key generated
    • [ ] .env file properly configured
  • [ ] Debug mode disabled (production)
  • Web Server

    • [ ] Site accessible via browser
    • [ ] Clean URLs working
  • [ ] Assets loading correctly
  • ---

    2.4 First-Time Setup Wizard

    After installation, complete these steps:

    Step 1: Welcome Screen

    • Select your language
  • Click "Continue"
  • Step 2: School Information

    Enter your school details:

    FieldDescriptionExample
    -----------------------------
    School NameFull school nameSunshine International School
    School TaglineShort taglineExcellence in Education
    EmailContact emailinfo@school.edu
    PhoneContact number+1 234 567 890
    AddressFull address123 Education Lane, City

    Step 3: Academic Year

    Create your first academic year:

    FieldDescriptionExample
    -----------------------------
    Year NameAcademic year label2025-2026
    Start DateYear start date2025-01-01
    End DateYear end date2025-12-31
    Is CurrentSet as active yearYes ✓

    Step 4: Administrator Account

    Create the main admin account:

    FieldDescriptionExample
    -----------------------------
    NameFull nameJohn Smith
    EmailLogin emailadmin@school.edu
    PasswordAccount password**
    Confirm PasswordConfirm password**

    Step 5: Configuration

    Set basic preferences:

    SettingOptions
    ------------------
    CurrencyUSD, EUR, KHR, etc.
    Date FormatDD/MM/YYYY, MM/DD/YYYY
    Time Format12-hour, 24-hour
    TimezoneSelect appropriate timezone

    Step 6: Complete

    • Review your settings
    • Click "Complete Setup"
  • You will be redirected to the login page
  • ---

    2.5 Logging In for the First Time

    Admin Login

  • Navigate to: https://yourdomain.com/login
  • Enter your admin credentials:
  • - Email: admin@school.edu (or your configured email) - Password: Your chosen password
  • Click "Login"
  • After Login

    • You will see the admin dashboard
    • All menu items should be accessible
  • You can now begin configuring the system
  • ---

    2.6 Troubleshooting Installation Issues

    Common Problems and Solutions

    #### Problem: "No connection to database" Solution:

  • Verify database credentials in .env file
    • Ensure MySQL service is running
    • Check database user has proper permissions
  • Verify database host is correct (localhost or IP)
  • #### Problem: "Class 'Illuminate\Foundation\Application' not found" Solution: `bash composer install --no-dev composer dump-autoload `

    #### Problem: "Permission denied" errors Solution: `bash

    Linux

    chmod -R 755 storage bootstrap/cache chown -R www-data:www-data . `

    #### Problem: Assets not loading (CSS/JS) Solution: `bash php artisan config:clear php artisan cache:clear php artisan view:clear npm run build # If using mix `

    #### Problem: Blank white screen Solution:

  • Check .env file exists
  • Enable error reporting in index.php:
  • `php error_reporting(E_ALL); ini_set('display_errors', 1); `
  • Check server error logs
  • ---

    2.7 Upgrading the System

    Before upgrading:

  • Backup your database and files
  • Check release notes for breaking changes
  • Test in staging environment first
  • Upgrade Steps

    `bash

    Pull latest changes

    git pull origin main

    Update dependencies

    composer update --no-dev

    Run migrations

    php artisan migrate

    Clear cache

    php artisan optimize:clear `

    ---

    2.8 Installation Complete

    Next Steps

  • Continue to Chapter 3: Initial Configuration to complete system setup
    • Configure user roles and permissions (Chapter 4)
  • Add your first classes and students
  • Support

    If you encounter issues not covered here:
    • Check the FAQ section
    • Review server error logs
  • Contact system administrator
  • ---

    Quick Reference

    Essential Commands

    `bash composer install # Install dependencies php artisan migrate # Run database migrations php artisan db:seed # Seed initial data php artisan cache:clear # Clear application cache php artisan config:clear # Clear config cache `

    Important Files

    FilePurpose
    ---------------
    .envEnvironment configuration
    config/app.phpApplication settings
    config/database.phpDatabase settings

    ---

    © 2026 School Management System. All rights reserved.