Installation Guide
This guide will walk you through the complete installation process of SLAED CMS.
Table of Contents
System Requirements
Before starting, ensure your server meets the system requirements:
Minimum Requirements
- PHP: 8.0+ with extensions: mysqli, gd, zip, mbstring, json, curl
- Database: MySQL 5.7+ or MariaDB 10.3+
- Web Server: Apache 2.4+ with mod_rewrite OR Nginx 1.14+
- Memory: 128MB RAM for PHP
- Disk Space: 50MB
Recommended Setup
- PHP: 8.1+ with OPcache enabled
- Database: MySQL 8.0+ or MariaDB 10.6+
- Memory: 256MB+ RAM for PHP
- Storage: SSD storage
- SSL: SSL certificate for HTTPS
Download and Extract
Download the latest release from GitHub and extract to your web server directory:
# Download
wget https://github.com/your-repo/slaed-cms/archive/main.zip
# Extract
unzip main.zip -d /var/www/html/
cd /var/www/html/slaed-cms-main/
Database Setup
Create a database and user for SLAED CMS:
CREATE DATABASE slaed_cms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'slaed_user'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON slaed_cms.* TO 'slaed_user'@'localhost';
FLUSH PRIVILEGES;
Configuration
Edit the configuration file:
cp config/config_db.php.example config/config_db.php
Configure database settings in config/config_db.php
:
<?php
if (!defined('FUNC_FILE')) die('Illegal file access');
$confdb = array();
$confdb['host'] = "localhost"; // Database host
$confdb['uname'] = "slaed_user"; // Database username
$confdb['pass'] = "your_secure_password"; // Database password
$confdb['name'] = "slaed_cms"; // Database name
$confdb['type'] = "mysqli"; // Database type
$confdb['engine'] = "InnoDB"; // Storage engine
$confdb['charset'] = "utf8mb4"; // Character set
$confdb['collate'] = "utf8mb4_unicode_ci"; // Collation
$confdb['prefix'] = "slaed"; // Table prefix
$confdb['sync'] = "0"; // Time sync
$confdb['mode'] = "0"; // Strict mode
$prefix = "slaed"; // Table prefix (duplicate)
$admin_file = "admin"; // Admin file name
?>
File Permissions
Set correct file permissions:
# Basic permissions
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
# Writable directories
chmod -R 777 config/
chmod -R 777 uploads/
chmod -R 777 storage/
# Secure configuration
chmod 600 config/config_db.php
Run Installation Wizard
Open your web browser and navigate to: http://yoursite.com/setup.php
Follow the installation wizard steps:
- System Check - Verify PHP version and extensions
- Database Setup - Confirm database settings
- Administrator Account - Create admin username and password
- Basic Configuration - Site name and description
- Completion - Remove installation files
Web Server Configuration
Apache Configuration
Create or update .htaccess
file:
# Security settings
Options -Indexes -ExecCGI
ServerSignature Off
# Protect sensitive files
<FilesMatch "\.(conf|log|ini|sql|php~|bak)$">
Require all denied
</FilesMatch>
# Protect config directory
<Files "*.php">
<RequireAll>
Require all denied
Require local
</RequireAll>
</Files>
# URL Rewriting for SEO
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?go=$1 [QSA,L]
# Security headers
<IfModule mod_headers.c>
Header always set X-Content-Type-Options nosniff
Header always set X-Frame-Options SAMEORIGIN
Header always set X-XSS-Protection "1; mode=block"
</IfModule>