Skip to content

Installation on VPS/Dedicated Server

This comprehensive guide covers installing OmniSuite CMS on a VPS or dedicated server, including LAMP/LEMP stack setup, manual installation, and server configuration.


Table of Contents

  1. Prerequisites
  2. Step 1: Server Initial Setup
  3. Step 2: Install LAMP/LEMP Stack
  4. Step 3: Install Additional Software
  5. Step 4: Create Database
  6. Step 5: Deploy Application
  7. Step 6: Configure Web Server
  8. Step 7: Set Permissions
  9. Step 8: Run Installation
  10. Step 9: Configure Services
  11. Step 10: Security Hardening
  12. Troubleshooting

Prerequisites

Before starting, ensure you have:

  • ✅ Root or sudo access to server
  • ✅ Fresh Ubuntu 20.04+, Debian 11+, or CentOS 8+ server
  • ✅ SSH access configured
  • ✅ Domain name pointing to server IP (or use IP address)
  • ✅ Basic Linux command line knowledge
  • ✅ Reviewed System Requirements

Step 1: Server Initial Setup

Update System

Ubuntu/Debian:

bash
sudo apt update
sudo apt upgrade -y

CentOS/RHEL:

bash
sudo yum update -y
# or for newer versions:
sudo dnf update -y

Install Basic Tools

Ubuntu/Debian:

bash
sudo apt install -y curl wget git unzip software-properties-common

CentOS/RHEL:

bash
sudo yum install -y curl wget git unzip epel-release

Configure Firewall

UFW (Ubuntu/Debian):

bash
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full'  # or 'Apache Full'
sudo ufw enable
sudo ufw status

Firewalld (CentOS/RHEL):

bash
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload

Step 2: Install LAMP/LEMP Stack

Option A: LAMP Stack (Apache)

Install Apache

Ubuntu/Debian:

bash
sudo apt install -y apache2
sudo systemctl start apache2
sudo systemctl enable apache2

CentOS/RHEL:

bash
sudo yum install -y httpd
sudo systemctl start httpd
sudo systemctl enable httpd

Install MySQL/MariaDB

Ubuntu/Debian:

bash
sudo apt install -y mysql-server
sudo mysql_secure_installation

CentOS/RHEL:

bash
sudo yum install -y mariadb-server mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation

Install PHP

See Step 3 for PHP installation.

Option B: LEMP Stack (Nginx)

Install Nginx

Ubuntu/Debian:

bash
sudo apt install -y nginx
sudo systemctl start nginx
sudo systemctl enable nginx

CentOS/RHEL:

bash
sudo yum install -y nginx
sudo systemctl start nginx
sudo systemctl enable nginx

Install MySQL/MariaDB

Same as LAMP stack above.

Install PHP-FPM

See Step 3 for PHP-FPM installation.


Step 3: Install Additional Software

Install PHP 8.2+

Ubuntu 22.04+:

bash
sudo apt install -y php8.2 php8.2-fpm php8.2-cli libapache2-mod-php8.2

Ubuntu 20.04:

bash
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install -y php8.2 php8.2-fpm php8.2-cli libapache2-mod-php8.2

CentOS/RHEL:

bash
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo yum module reset php
sudo yum module enable php:remi-8.2
sudo yum install -y php php-fpm php-cli

Install PHP Extensions

Ubuntu/Debian:

bash
sudo apt install -y \
    php8.2-mysql \
    php8.2-pgsql \
    php8.2-sqlite3 \
    php8.2-mbstring \
    php8.2-xml \
    php8.2-curl \
    php8.2-intl \
    php8.2-zip \
    php8.2-gd \
    php8.2-bcmath \
    php8.2-opcache

CentOS/RHEL:

bash
sudo yum install -y \
    php-mysqlnd \
    php-pgsql \
    php-sqlite3 \
    php-mbstring \
    php-xml \
    php-curl \
    php-intl \
    php-zip \
    php-gd \
    php-bcmath \
    php-opcache

Configure PHP

Edit php.ini:

bash
sudo nano /etc/php/8.2/apache2/php.ini
# or for Nginx: sudo nano /etc/php/8.2/fpm/php.ini
# or for CentOS: sudo nano /etc/php.ini

Update settings:

ini
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
date.timezone = UTC

Restart services:

bash
# For Apache
sudo systemctl restart apache2

# For Nginx + PHP-FPM
sudo systemctl restart php8.2-fpm
sudo systemctl restart nginx

Install Composer

bash
cd /tmp
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer
composer --version

Install Node.js and NPM

Using NodeSource:

bash
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs

Or using NVM:

bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.bashrc
nvm install 18
nvm use 18

Verify:

bash
node --version
npm --version

Step 4: Create Database

MySQL/MariaDB Setup

Login to MySQL:

bash
sudo mysql -u root -p

Create Database and User:

sql
CREATE DATABASE omnisuite_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'omnisuite_user'@'localhost' IDENTIFIED BY 'strong_password_here';
GRANT ALL PRIVILEGES ON omnisuite_db.* TO 'omnisuite_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Test Connection:

bash
mysql -u omnisuite_user -p omnisuite_db

Step 5: Deploy Application

bash
cd /var/www
sudo git clone [your-repository-url] omnisuite
cd omnisuite

Option B: Upload and Extract

bash
cd /var/www
sudo mkdir omnisuite
cd omnisuite
# Upload ZIP file via SCP/SFTP, then:
sudo unzip omnisuite.zip

Install Dependencies

bash
cd /var/www/omnisuite
composer install --no-dev --optimize-autoloader
npm install
npm run build

Set Ownership

bash
sudo chown -R www-data:www-data /var/www/omnisuite
# or for CentOS: sudo chown -R apache:apache /var/www/omnisuite

Step 6: Configure Web Server

For Apache

Create Virtual Host:

bash
sudo nano /etc/apache2/sites-available/omnisuite.conf

Configuration:

apache
<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/omnisuite/public

    <Directory /var/www/omnisuite/public>
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/omnisuite_error.log
    CustomLog ${APACHE_LOG_DIR}/omnisuite_access.log combined
</VirtualHost>

Enable site and mod_rewrite:

bash
sudo a2ensite omnisuite.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

For Nginx

Create Configuration:

bash
sudo nano /etc/nginx/sites-available/omnisuite

Configuration:

nginx
server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;
    root /var/www/omnisuite/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Content-Type-Options "nosniff";

    index index.php;

    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

Enable site:

bash
sudo ln -s /etc/nginx/sites-available/omnisuite /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Step 7: Set Permissions

Set Directory Permissions

bash
cd /var/www/omnisuite
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;

Set Writable Directories

bash
sudo chmod -R 775 storage bootstrap/cache
sudo chown -R www-data:www-data storage bootstrap/cache

Set Executable

bash
sudo chmod +x artisan

Step 8: Run Installation

  1. Navigate to: http://yourdomain.com/install
  2. Follow Web Installer Guide

Option B: Manual Installation

Create .env File

bash
cd /var/www/omnisuite
cp .env.example .env
php artisan key:generate

Edit .env

bash
nano .env

Configure:

env
APP_NAME="OmniSuite"
APP_URL=http://yourdomain.com
APP_ENV=production

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=omnisuite_db
DB_USERNAME=omnisuite_user
DB_PASSWORD=your_password

Run Migrations

bash
php artisan migrate --force

Seed Database

bash
php artisan db:seed --force

Create Admin User

bash
php artisan tinker

Then:

php
$user = new App\Models\User();
$user->first_name = 'Admin';
$user->last_name = 'User';
$user->email = 'admin@example.com';
$user->password = Hash::make('your_password');
$user->email_verified_at = now();
$user->save();

$role = App\Models\Role::where('name', 'admin')->first();
$user->assignRole($role);
exit

Step 9: Configure Services

Set Up Cron Jobs

Edit crontab:

bash
sudo crontab -e -u www-data

Add:

* * * * * cd /var/www/omnisuite && php artisan schedule:run >> /dev/null 2>&1

Set Up Queue Worker

Using Supervisor:

  1. Install Supervisor:
bash
sudo apt install -y supervisor
  1. Create Config:
bash
sudo nano /etc/supervisor/conf.d/omnisuite-worker.conf
  1. Add Configuration:
ini
[program:omnisuite-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/omnisuite/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/omnisuite/storage/logs/worker.log
stopwaitsecs=3600
  1. Start Supervisor:
bash
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start omnisuite-worker:*

Set Up SSL (Let's Encrypt)

Install Certbot:

bash
# For Apache
sudo apt install -y certbot python3-certbot-apache

# For Nginx
sudo apt install -y certbot python3-certbot-nginx

Obtain Certificate:

bash
# For Apache
sudo certbot --apache -d yourdomain.com -d www.yourdomain.com

# For Nginx
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

Auto-Renewal:

bash
sudo certbot renew --dry-run

Step 10: Security Hardening

Server Security

Disable Root Login

bash
sudo nano /etc/ssh/sshd_config

Set:

PermitRootLogin no
PasswordAuthentication no  # Use SSH keys only

Restart SSH:

bash
sudo systemctl restart sshd

Fail2Ban

Install:

bash
sudo apt install -y fail2ban

Configure:

bash
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.local

Start:

bash
sudo systemctl start fail2ban
sudo systemctl enable fail2ban

Application Security

File Permissions

bash
cd /var/www/omnisuite
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;
sudo chmod 600 .env
sudo chmod 755 artisan

Hide Sensitive Files

Ensure .env and other sensitive files are not web-accessible.

Regular Updates

bash
# Set up automatic security updates
sudo apt install -y unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades

Troubleshooting

Common Issues

See Troubleshooting Guide for detailed solutions.

Check Logs

Application Logs:

bash
tail -f /var/www/omnisuite/storage/logs/laravel.log

Web Server Logs:

bash
# Apache
tail -f /var/log/apache2/error.log

# Nginx
tail -f /var/log/nginx/error.log

PHP Logs:

bash
tail -f /var/log/php8.2-fpm.log

Performance Optimization

PHP OPcache

Enable in php.ini:

ini
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=2

Database Optimization

MySQL Configuration:

bash
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

Optimize settings for your server resources.


Next Steps

  1. Review Post-Installation Setup
  2. Configure General Settings
  3. Set up Email Settings
  4. Read Getting Started Guide

Last Updated: [Date will be updated during final review]

Released under the MIT License.