Jun 302013
Article E-Commerce

OSClass is one of the most popular applications for the implementation of a classifieds web site. This post goes through the procedure to install this application on a Linux (Debian, Ubuntu) system.


OSClass is a typical LAMP (Linux, Apache, MySQL & PHP) application. The osclass.org home page lists the following pre-requisites:

  • PHP version: 5.x or newer
  • MySQL database (or access to create one)
  • MySQLi module for PHP
  • GD module for PHP

The installation described in this post is done on a Linux Debian 7 (Wheezy) system. The following packages are already installed on it:

  • Apache 2.2.22 (Debian)
  • MySQL Ver 14.14 Distrib 5.5.28, for debian-linux-gnu (x86_64) using readline 6.2
  • PHP 5.4.4-14

Download of the OSClass installation package

In the osclass.org home page, click on the “Download” button. The file downloaded is named “osclass.3.1.2.zip” and is 4.761.598 bytes ( ~4.7 MB) in size.



The first step is creating a log folder “/log/classifieds”, and a database “classifieds”.

Next, the installation file downloaded is uncompressed under the root folder of the web server ( the DocumentRoot defined in the configuration of the VirtualHost: “/web/classifieds”) that will be created (see below) to host the classifieds site. The owner of the files needs to be changed to the user that runs the web server processes (The default user is www-data in an apache-on-linux installation):

Next, the definition of the VirtualHost “classifieds.example.com” is written to a file “/etc/apache2/sites-enabled/001-classifieds”:

Finally, the DNS service must be configured to resolve the domain name “classifieds.example.com” into the IP address of our server. Alternatively, while we are testing the site, we can edit the “/etc/hosts” file in our local computer to set up there the correspondence between the IP address of the server and the domain name.

Having done that, we can finally enter in our browser the url “http://classifieds.example.com”. After the first screen, when the “Install” button is clicked OSClass will run a compatibility check on our server and will present the result on the screen:




If there are no compatibility issues, the installation can proceed by clicking on the “Run the install” button. A form will be presented to enter the contact information and other basic settings of the installation:



After filling the first form and clicking on “Next”, the second form requests information about the site target users, at the country, region and city levels.



In the country selection drop-down box, one of the possible choices is “skip location”, in case we don’t want to target our site to a given country. In the same way, we can select “All regions” and “All cities” in the other two drop-down boxes, if our web site is targeted to users in all regions and cities of a given country, or the whole world.

And this ends the basic installation. The last screen is a confirmation that the installation has finished successfully, and includes a link to the administration panel:



Pointing the browser to the home page of the site, we can see how it looks initially:



Adding a language

In our example installation, we will be adding the spanish language. We do this by accessing the OSClass language downloads page at sourceforge, and downloading the file lang_es_ES_3.0.x.zip.

Then, in the OSClass admin panel we choose “Settings > Languages” y and click on “Add new”.

Once a new language has been installed, in the same page we can choose which languages will be available for users, and which ones will be available in the administration interface.



Besides, we must select “Settings > General” in the left menu to set the default language, as well as other configuration optiones related to the language and the country being targeted, such as:

  • Default currency (Euro, Dollar, Sterling pound,…)
  • Time zone
  • Date and time formats
  • etc.

Next steps

  • Once the installation is done, there are still several tasks to do to make the site fully operational. Among them:
  • Change the site logo
  • Define the available categories (Motor, Real Estate, Jobs,…) and sub-categories for the ads.
  • Add plugins that implement data types specific to some categoríes (ie., Brand and model in the Motor category, square meters and number of rooms in Real Estate, etc…)
  • Add plugins with some additional functionality required or desirable:  Google Analytics tracking code, Google Maps,…
  • etc.

The details of each of these steps will be explained in coming posts in this series.

 Posted by at 11:07 am

 Leave a Reply