Table of Contents
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:| Requirement | Minimum | Recommended |
| ------------- | --------- | ------------- |
| PHP Version | 8.2+ | 8.2 or higher |
| MySQL Version | 5.7+ | 8.0+ |
| Web Server | Apache/Nginx | Apache 2.4+ |
| RAM | 2GB | 4GB+ |
| Disk Space | 5GB | 20GB+ |
| Composer | Latest | Latest |
Required PHP Extensions
- OpenSSL
- PDO
- Mbstring
- Tokenizer
- XML
- Ctype
- JSON
- Fileinfo
Database Requirements
- Create an empty database
---
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
`bash
cp .env.example .env
`.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
---
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
File Permissions
- [ ] Storage directory writable
- [ ] Cache directory writable
Configuration
- [ ] Application key generated
- [ ] .env file properly configured
Web Server
- [ ] Site accessible via browser
- [ ] Clean URLs working
---
2.4 First-Time Setup Wizard
After installation, complete these steps:
Step 1: Welcome Screen
- Select your language
Step 2: School Information
Enter your school details:| Field | Description | Example |
| ------- | ------------- | --------- |
| School Name | Full school name | Sunshine International School |
| School Tagline | Short tagline | Excellence in Education |
| Contact email | info@school.edu | |
| Phone | Contact number | +1 234 567 890 |
| Address | Full address | 123 Education Lane, City |
Step 3: Academic Year
Create your first academic year:| Field | Description | Example |
| ------- | ------------- | --------- |
| Year Name | Academic year label | 2025-2026 |
| Start Date | Year start date | 2025-01-01 |
| End Date | Year end date | 2025-12-31 |
| Is Current | Set as active year | Yes ✓ |
Step 4: Administrator Account
Create the main admin account:| Field | Description | Example |
| ------- | ------------- | --------- |
| Name | Full name | John Smith |
| Login email | admin@school.edu | |
| Password | Account password | ** |
| Confirm Password | Confirm password | ** |
Step 5: Configuration
Set basic preferences:| Setting | Options |
| --------- | --------- |
| Currency | USD, EUR, KHR, etc. |
| Date Format | DD/MM/YYYY, MM/DD/YYYY |
| Time Format | 12-hour, 24-hour |
| Timezone | Select appropriate timezone |
Step 6: Complete
- Review your settings
- Click "Complete Setup"
---
2.5 Logging In for the First Time
Admin Login
https://yourdomain.com/loginAfter Login
- You will see the admin dashboard
- All menu items should be accessible
---
2.6 Troubleshooting Installation Issues
Common Problems and Solutions
#### Problem: "No connection to database" Solution:
.env file- Ensure MySQL service is running
- Check database user has proper permissions
#### 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:
.env file existsindex.php:`php
error_reporting(E_ALL);
ini_set('display_errors', 1);
`
---
2.7 Upgrading the System
Before upgrading:
Upgrade Steps
`bash
Pull latest changes
git pull origin mainUpdate dependencies
composer update --no-devRun migrations
php artisan migrateClear cache
php artisan optimize:clear`---
2.8 Installation Complete
Next Steps
- Configure user roles and permissions (Chapter 4)
Support
If you encounter issues not covered here:- Check the FAQ section
- Review server error logs
---
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
| File | Purpose |
| ------ | --------- |
.env | Environment configuration |
config/app.php | Application settings |
config/database.php | Database settings |
---
© 2026 School Management System. All rights reserved.