Appearance
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
- Prerequisites
- Step 1: Server Initial Setup
- Step 2: Install LAMP/LEMP Stack
- Step 3: Install Additional Software
- Step 4: Create Database
- Step 5: Deploy Application
- Step 6: Configure Web Server
- Step 7: Set Permissions
- Step 8: Run Installation
- Step 9: Configure Services
- Step 10: Security Hardening
- 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 -yCentOS/RHEL:
bash
sudo yum update -y
# or for newer versions:
sudo dnf update -yInstall Basic Tools
Ubuntu/Debian:
bash
sudo apt install -y curl wget git unzip software-properties-commonCentOS/RHEL:
bash
sudo yum install -y curl wget git unzip epel-releaseConfigure Firewall
UFW (Ubuntu/Debian):
bash
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full' # or 'Apache Full'
sudo ufw enable
sudo ufw statusFirewalld (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 --reloadStep 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 apache2CentOS/RHEL:
bash
sudo yum install -y httpd
sudo systemctl start httpd
sudo systemctl enable httpdInstall MySQL/MariaDB
Ubuntu/Debian:
bash
sudo apt install -y mysql-server
sudo mysql_secure_installationCentOS/RHEL:
bash
sudo yum install -y mariadb-server mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installationInstall 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 nginxCentOS/RHEL:
bash
sudo yum install -y nginx
sudo systemctl start nginx
sudo systemctl enable nginxInstall 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.2Ubuntu 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.2CentOS/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-cliInstall 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-opcacheCentOS/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-opcacheConfigure 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.iniUpdate settings:
ini
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
date.timezone = UTCRestart services:
bash
# For Apache
sudo systemctl restart apache2
# For Nginx + PHP-FPM
sudo systemctl restart php8.2-fpm
sudo systemctl restart nginxInstall 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 --versionInstall Node.js and NPM
Using NodeSource:
bash
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejsOr 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 18Verify:
bash
node --version
npm --versionStep 4: Create Database
MySQL/MariaDB Setup
Login to MySQL:
bash
sudo mysql -u root -pCreate 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_dbStep 5: Deploy Application
Option A: Git Clone (Recommended)
bash
cd /var/www
sudo git clone [your-repository-url] omnisuite
cd omnisuiteOption B: Upload and Extract
bash
cd /var/www
sudo mkdir omnisuite
cd omnisuite
# Upload ZIP file via SCP/SFTP, then:
sudo unzip omnisuite.zipInstall Dependencies
bash
cd /var/www/omnisuite
composer install --no-dev --optimize-autoloader
npm install
npm run buildSet Ownership
bash
sudo chown -R www-data:www-data /var/www/omnisuite
# or for CentOS: sudo chown -R apache:apache /var/www/omnisuiteStep 6: Configure Web Server
For Apache
Create Virtual Host:
bash
sudo nano /etc/apache2/sites-available/omnisuite.confConfiguration:
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 apache2For Nginx
Create Configuration:
bash
sudo nano /etc/nginx/sites-available/omnisuiteConfiguration:
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 nginxStep 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/cacheSet Executable
bash
sudo chmod +x artisanStep 8: Run Installation
Option A: Web Installer (Recommended)
- Navigate to:
http://yourdomain.com/install - Follow Web Installer Guide
Option B: Manual Installation
Create .env File
bash
cd /var/www/omnisuite
cp .env.example .env
php artisan key:generateEdit .env
bash
nano .envConfigure:
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_passwordRun Migrations
bash
php artisan migrate --forceSeed Database
bash
php artisan db:seed --forceCreate Admin User
bash
php artisan tinkerThen:
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);
exitStep 9: Configure Services
Set Up Cron Jobs
Edit crontab:
bash
sudo crontab -e -u www-dataAdd:
* * * * * cd /var/www/omnisuite && php artisan schedule:run >> /dev/null 2>&1Set Up Queue Worker
Using Supervisor:
- Install Supervisor:
bash
sudo apt install -y supervisor- Create Config:
bash
sudo nano /etc/supervisor/conf.d/omnisuite-worker.conf- 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- 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-nginxObtain 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.comAuto-Renewal:
bash
sudo certbot renew --dry-runStep 10: Security Hardening
Server Security
Disable Root Login
bash
sudo nano /etc/ssh/sshd_configSet:
PermitRootLogin no
PasswordAuthentication no # Use SSH keys onlyRestart SSH:
bash
sudo systemctl restart sshdFail2Ban
Install:
bash
sudo apt install -y fail2banConfigure:
bash
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.localStart:
bash
sudo systemctl start fail2ban
sudo systemctl enable fail2banApplication 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 artisanHide 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-upgradesTroubleshooting
Common Issues
See Troubleshooting Guide for detailed solutions.
Check Logs
Application Logs:
bash
tail -f /var/www/omnisuite/storage/logs/laravel.logWeb Server Logs:
bash
# Apache
tail -f /var/log/apache2/error.log
# Nginx
tail -f /var/log/nginx/error.logPHP Logs:
bash
tail -f /var/log/php8.2-fpm.logPerformance 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=2Database Optimization
MySQL Configuration:
bash
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnfOptimize settings for your server resources.
Next Steps
- Review Post-Installation Setup
- Configure General Settings
- Set up Email Settings
- Read Getting Started Guide
Last Updated: [Date will be updated during final review]