INSTALL.md 2.1 KB

Installation Guide

Quick Setup

1. Prerequisites

  • PHP 7.4+ with extensions: PDO, PDO_MySQL, mbstring, LDAP (optional)
  • MariaDB 10.3+ or MySQL 5.7+
  • Web server (Apache, Nginx, or PHP built-in server)

2. Database Setup

CREATE DATABASE webpub;
CREATE USER 'webpub_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON webpub.* TO 'webpub_user'@'localhost';
FLUSH PRIVILEGES;

3. Web Server Setup

Place files in web directory:

/var/www/html/website/

4. Run Setup Wizard

  1. Navigate to: http://your-domain.com/setup/
  2. Follow the installation steps
  3. Configure database and authentication (optional LDAP)
  4. Complete installation

5. Secure Installation

rm -rf /var/www/html/website/setup/
chmod 755 /var/www/html/website/
chmod 644 /var/www/html/website/includes/config.php

Access Points

  • Public Site: http://your-domain.com/public/
  • Admin Panel: http://your-domain.com/admin/
  • Login: http://your-domain.com/admin/login.php

LDAP Configuration (Optional)

During setup, enable LDAP authentication with these settings:

Active Directory Example

LDAP Server Host: ad.example.com
LDAP Port: 389
LDAP Base DN: dc=example,dc=com
User Search Filter: (sAMAccountName={username})
Email Attribute: mail
Name Attribute: cn

OpenLDAP Example

LDAP Server Host: ldap.example.com
LDAP Port: 389
LDAP Base DN: ou=users,dc=example,dc=com
User Search Filter: (uid={username})
Email Attribute: mail
Name Attribute: cn

Troubleshooting

Common Issues

  1. Database Connection: Check credentials and server status
  2. File Permissions: Ensure web server can write to includes/ directory
  3. LDAP Connection: Test with external LDAP tools first
  4. PHP Errors: Check error logs for detailed messages

Debug Mode

Add to top of files for debugging:

ini_set('display_errors', 1);
error_reporting(E_ALL);

Security Notes

  • Delete setup directory after installation
  • Use HTTPS in production
  • Secure LDAP connections with LDAPS
  • Regular updates of PHP and database
  • Monitor authentication logs