Toggle navigation

Osclass Image Guide

Version 3.7.0

Websoft9 Osclass is a pre-configured, ready to run image for running Osclass on Alibaba Cloud.

osclass is an open source project that allows you to easily create a classifieds site without any technical knowledge. This project began in Barcelona in early 2011 and since then hundreds of people have generously collaborated.With osclass you can build your own website and start advertising real estate, jobs or whatever you want- in minutes.

Software Version: Osclass3.7.0
Software directory: /data/wwwroot/default/osclass

Basic software environment: LAMP
PHP Configuration File: /usr/local/php/etc/php.ini
Virtual host Configuration File directory: /usr/local/apache/conf/vhost
Virtual host Configuration Command: /root/oneinstack/

Database install directory: /usr/local/mysql
Database data directory: /data/mysql
Database Configuration File: /etc/my.cnf

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address/
  • If verify successfully,you can enter the boot page of Websoft9 below
  • If no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

This Image use MySQL for database

#default user/password:root/123456

MySQL User Guide: Click here

Step1. Create a database

1.login in MySQL:

Method 1:Use following URL to open phpMyAdmin page: http://< Public net IP >/phpMyAdmin

Method 2:Use SSH command to login in.

mysql -uroot –p                                #enter mysql console

 #default user/password:root/123456            More MySQL User Guide: Click here


2.create a database:

MySQL [(none)]> create database mydbname;

MySQL [(none)]> show databases;


3.Create a Database User and grants permissions to the User:

MySQL [(none)]> grant all privileges on mydbname.* to username@'localhost' identified by 'userpassword';

MySQL [(none)]> flush privileges;

MySQL [(none)]> exit;


Step2. Add a virtual host

Use SSH Command to Add a virtual host:

[root@iZbp1i4rjdsy216yq7lgucZ ~]# cd /root/oneinstack
[root@iZbp1i4rjdsy216yq7lgucZ oneinstack]# ./

Step3. Install Osclass

Open your domain name via browser:
1.  Click “Install”;

2.  Click “Run the install”;

3.  Fill in your database information, Click “Next”;

4.  Set admin account, Click “Next”;

5.  Osclass has been installed. Click “Finish and go to the administration panel”;

6. You can now log in to Osclass (using your admin account ), Click “log in”;

7. This is the admin page:

Use http://<domain name>/  to go to your index page.

Backup is very import for using any CMS,Osclass have the backup and restore interface in backend


  1. Login as admin, on the left panel,go to Showmore->tools->Backup Data
  2. You can backup Database and Files on server
  3. You can download the backup from /data/wwwroot/default/osclass

  1. Login as admin, on the left panel,go to Showmore->tools->ImportData
  2. Upload .sql file and click the button “Import data”

Osclass Upgrade is very easy,you can use the automatic upgrade interface of Osclass.You should backup Osclass before upgrade

  1. Login as admin, on the left panel,go to Showmore->tools->Upgrade Osclass
  2. Your Osclass installation can be auto-upgraded,click the button “Upgrade”
  3. then you can see the succesful informaiton of upgrade,e.g “Everything looks good! Your Osclass installation is up-to-date”

In version 3.0, we introduced an auto-upgrade system for plugins and themes, along with some neat features. To make your plugins and themes able to use this new feature, you need to use the Update URI param on the description of your creations. The Update URI should be unique per theme/plugin and reply a JSON response with the following format:

dt_mod_date: "YYYY-MM-DD HH:MM:SS",
dt_pub_date: "YYYY-MM-DD HH:MM:SS",
e_type: "{TYPE}",
i_total_downloads: "XYZ",
s_banner: "banner.jpg",
s_banner_path: "http://www.domain.tld/path/to/banner/",
s_compatible: "2.3,2.4,3.0,3.1,3.1.1,3.1.2",
s_contact_name: "My name",
s_description: "My description, HTML accepted",
s_source_file: "http://www.domain.tld/path/to/",
s_title: "Title",
s_update_url: "http://www.domain.tld/path/to/update/cheker.php",
s_version: "A.B.C",

s_version: Any alphanumeric string is ok, but we encourage only-numeric ones to be able to check is a version is greater or not than the installed one, preferred A.B.C style, as “1.0.2” or “2.1.0”
e_type: e_type has to be one of these options THEME or PLUGIN or “LANGUAGE”

Under Plugins > Manage Plugins you could add new plugin and manage all the available plugins

Under Appearance > Manage Themes you could add new theme and manage all the available themes

Under General Settings > Locations you could install new locations (countries, regions and cities).

You can use the manually location setting for it:

Installing new locations could be a very-long process due to the big amount of data being transferred. You could raise your max_execution_limit on the PHP.ini file or install new locations manually.

  • Download the .sql you want to from
  • Change /*TABLE_PREFIX*/ for whatever your prefix is. (If using the OSClass’ import functionality it’s not needed to modify anything)
  • Import it to your database (via OSClass’ import system -Admin panel > Tools > Import-, phpMyAdmin, command line,… )

Note: If you already installed a country or a region you should not installed it again.

Under General Settings > Languages you could manage Languages

The PHP configuration file allows you to configure the modules enabled, the email settings or the size of the upload files. It is located at /usr/local/php/etc/php.ini.

There are some PHP settings that need to be sufficient for Oslass to install.

The values for PHP.ini below are suggested values only.

  • memory_limit – Minimum: 64M Recommended: 128M or better
  • upload_max_filesize – Minimum: 20M
  • post_max_size – Minimum: 20M
  • max_execution_time: At Least 120 Recommended: 300

After modifying the PHP configuration file, restart both Apache and PHP-FPM for the changes to take effect:

# service httpd restart


Modify the  /usr/local/php/etc/php.ini file to increase the allowed size for uploads:

; Maximum size of POST data that PHP will accept.
post_max_size = 16M
; Maximum allowed size for uploaded files.
upload_max_filesize = 16M

then,restart the apache

# service httpd restart

If you receive the message “Maximum execution time of 30 seconds exceeded”.You may also like to extend the max_execution_time for PHP and you can modify it by two methods below

Method one: edit your  /usr/local/php/etc/php.ini

; Maximum execution time of each script, in seconds
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 90
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.

Method two: edit your .htaccess:

<IfModule mod_php5.c>
php_value max_execution_time 90

Websoft9 Osclass Image have installed the phpMyadmin

phpMyAdmin install directory: /data/wwwroot/default/phpMyAdmin


Following is the step for access phpMyadmin

  1. Open Chrome or Firefox on your local PC
  2. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  3. select you language,Username:root,Password:123456
  4. Click the button “Go”


Following is the step for access phpMyadmin

  1. User Remote Desktop Connection of Window to connect to you ECS
  2. Install a Chrome or Firefox browser on you ECS
  3. Open Chrome or Firefox on your ECS
  4. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  5. select you language,Username:root,Password:123456
  6. Click the button “Go”

Under Show More > User > Administrator you could manage admin

When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644, folder 755 ,Permissions Users and groups www
If there is a file permissions problem, execute the following three commands:

chown -R www.www /data/wwwroot/default/osclass
find /data/wwwroot/default/osclass -type d -exec chmod 755 {} \;
find /data/wwwroot/default/osclass -type f -exec chmod 644 {} \;

Released with version 2.3, the OSC_MEMORY_LIMIT option allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary when you see a message such as “Allowed memory size of X bytes exhausted”.

This setting increase PHP memory for OSClass, so it wouldn’t affect other applications. By default, the memory allocated is set to 32MB. If PHP has been allocated 128MB, there is no need to set this value to 128M because OSClass checks if PHP has been allocated more memory than the entered value.

This setting may not work if your host doesn’t allow for increasing the PHP memory limit. In that case, contact your host to increase the PHP memory limit.

Increase PHP Memory to 128MB (add this define constant in config.php)

define('OSC_MEMORY_LIMIT', '128M') ;

NOTE: before enabling cache make sure you have installed and enabled the cache extension.


You need to edit your config.php file and the following line

   define('OSC_CACHE', 'apc');