Advanced Osclass Installation - Cloud, AWS, Ubuntu

Introduction

In this guide, we focus on advanced scenarios for installing Osclass. While a standard installation on shared hosting (or simple VPS) typically involves uploading files, creating a database, and running the web-based installer, large-scale or specialized environments (like cloud platforms, Ubuntu-based servers with Nginx, or Kubernetes clusters) require additional steps. This article combines standard installation concepts with instructions for IBM Cloud and Ubuntu (Nginx & Let’s Encrypt) to help you deploy Osclass in more robust settings.


System Requirements (Recap)

  • Server OS: Linux/Unix-based distributions (Ubuntu, Debian, CentOS, etc.) or Windows-based systems with PHP support.
  • Web Server: Apache, Nginx, or any server that supports PHP.
  • PHP Version: 7.4 or higher (8.x recommended).
  • Database: MySQL or MariaDB with MySQLi/PDO extension.
  • Extensions: GD (images), cURL, OpenSSL, and optionally ImageMagick for advanced image processing.

For large-scale setups, confirm you have enough CPU, RAM, and storage to handle potentially thousands or millions of listings.


1. Standard Installation (Local/Shared Hosting)

The following steps summarize a classic Osclass setup, typically used on simpler environments or shared hosting:

Step 1: Download and Upload Files

  1. Download the latest Osclass ZIP from its official website.
  2. Unzip locally, then upload the extracted files to your server via FTP or file manager (e.g., /public_html).

Step 2: Web Installer Initialization

  1. Open http://yourdomain.com in a browser. Osclass will prompt you to run the installer.
  2. Click the link or button to begin installation.

Step 3: Requirements Check

  • Osclass checks your environment (PHP version, MySQL availability, and PHP extensions).
  • If any requirement is missing, fix it at your hosting or server level.

Step 4: Enter Database Details

  • Host, Database name, Username, Password, optional table prefix.

Step 5: Configure Site & Admin

  • Create an admin user and password, set your site name, admin email, and optionally import location data.

Step 6: Complete Installation

  • Final step writes config data. Keep your admin credentials safe.
  • Access the backoffice at yourdomain.com/oc-admin.

2. IBM Cloud Installation

IBM Cloud offers a more enterprise-ready environment for running Osclass with Kubernetes clusters, block storage, and integrated Helm charts. Below is an outline:

Step 1: Provision Kubernetes Cluster

  1. From IBM Cloud Dashboard, search “Kubernetes Service.”
  2. Create a cluster using either the “Free” plan for testing or the “Standard” plan (Multi-Zone, specific CPU/RAM allocations) if you need production-scale resources.
  3. Wait for the cluster to provision.

Step 2: Deploy IBM Cloud Block Storage Plugin

  1. Search “Block Storage” in IBM Cloud catalog, click “Create.”
  2. Select your location (e.g., Europe > London > LON02), billing method, size (e.g., 20GB), and OS type “Linux.”
  3. Accept terms and conditions, then create the block storage resource.

Step 3: Deploy Osclass

  1. Search for “Osclass” in IBM Cloud. Click to open the Helm chart deployment page.
  2. Fill in details: target cluster, namespace, resource group, etc.
  3. Agree to terms and click “Install.” Helm will handle pulling the Osclass container image and scheduling pods.
  4. Wait until all pods start successfully.

Step 4: Verify Installation

  1. Go to IBM Cloud Kubernetes Dashboard, find your cluster (e.g., “mycluster-free”).
  2. Open “Actions” > “Web terminal” to see logs or run commands like kubectl get pods -n osclass.
  3. Once the pods are running, Osclass should be accessible via the load balancer or Ingress URL assigned by IBM Cloud.

After reaching the public URL, complete the web installer steps to finalize your Osclass environment on IBM Cloud.


3. Installing on Ubuntu (Nginx & Let’s Encrypt)

For advanced users self-hosting on Ubuntu, we can install Osclass with an Nginx web server and secure it using Let’s Encrypt SSL.

Step 1: Install LEMP Stack

sudo apt-get update
sudo apt-get install nginx mariadb-server \
     php7.4 php7.4-fpm php7.4-mysql php7.4-gd php7.4-xml \
     curl unzip -y

Adjust PHP version or package names as required (e.g., php8.x).

Step 2: Create a Database & User

sudo mysql

CREATE DATABASE osclass;
GRANT ALL PRIVILEGES ON osclass.* \
       TO 'osclass'@'localhost' IDENTIFIED BY 'yourpassword';
FLUSH PRIVILEGES;
EXIT;

Step 3: Download and Extract Osclass

cd /var/www/html
sudo mkdir osclass
cd osclass
sudo wget https://github.com/Dis555/Osclass/releases/download/4.2.0/Osclass-Evolution4.2.0.zip
sudo unzip Osclass-Evolution4.2.0.zip
sudo chown -R www-data:www-data /var/www/html/osclass
sudo chmod -R 755 /var/www/html/osclass

Step 4: Configure Nginx

sudo nano /etc/nginx/sites-available/osclass.conf

Add a server block like:

server {
  listen 80;
  server_name yourdomain.com;
  root /var/www/html/osclass;
  index index.php index.html;

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

  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
  }
}

Enable and restart Nginx:

sudo ln -s /etc/nginx/sites-available/osclass.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

Step 5: Secure with Let’s Encrypt SSL

sudo apt-get install python3-certbot-nginx -y
sudo certbot --nginx -d yourdomain.com

Follow prompts, agree to terms, and choose whether to redirect HTTP to HTTPS. Once done, your site will have a valid SSL certificate and be served over HTTPS.

Step 6: Finalize Osclass Setup

  1. Browse to https://yourdomain.com.
  2. Click “INSTALL” when prompted; confirm requirements are met.
  3. Enter database credentials created earlier, then proceed.
  4. Create an admin account and optional extra settings.
  5. Log in to https://yourdomain.com/oc-admin to manage your classifieds.

Additional Tips and Best Practices

  • Performance & Caching: For heavy traffic, configure caching plugins or server-level caching (e.g., Nginx FastCGI cache).
  • Security: Use secure passwords, keep software updated, enable auto-updates or cron-based checks for new Osclass releases.
  • Backups & Snapshots: Regularly back up the database and oc-content folder. Cloud providers often offer snapshot features or scheduled backups.
  • Load Balancing: In advanced cloud setups (AWS, IBM, Google Cloud), consider load balancers or multi-node Kubernetes deployments for HA (High Availability).

Conclusion

Whether deploying Osclass on a straightforward shared hosting plan or leveraging IBM Cloud Kubernetes or an Ubuntu server with Nginx and Let’s Encrypt, the process is flexible. The standard installation procedure remains the same: place files on the server, configure a database, and finalize settings via the web-based installer. For more complex environments, you’ll incorporate container orchestration, specialized block storage, advanced SSL, or manual LEMP configuration to ensure top performance and security.