In this tutorial I will show you how to install CUBRID Database Server together with Apache Web server and PHP on Ubuntu Desktop 10.4+. This will be the easiest and fastest way to get all the applications installed on your system.

Install CUBRID

CUBRID can be installed directly from Launchpad repository for Ubuntu. I will assume that you would like to install the latest version of CUBRID.

Frist, we need to add CUBRID's repository so that Ubuntu knows where to download the packages from, and then tell the OS to update its indexes.

sudo add-apt-repository ppa:cubrid/cubrid
sudo apt-get update

Now install CUBRID. This will install the latest version of CUBRID.

sudo apt-get install cubrid

If you want to install older versions, indicate the version as shown below. CUBRID 8.3.1+ is available from this repository.

sudo apt-get install cubrid-8.3.1

Install Apache Web Server

Install Apache by typing the following command in the terminal.

sudo apt-get install apache2

When you install Apache Web server, it will be automatically started. To manually restart the Web server (or stop/start) type:

sudo /etc/init.d/apache2 restart

In the new versions of Ubuntu, you can use Apache service to stop/start/restart the Web server like:

sudo service apache2 restart

Check if Apache has been successfully installed. Open http://localhost/ in your browser. You should see the following message if succeeded.

Resolving Apache Warnings

Even if you have got Apache working, on your terminal you might have been receiving the following warning:

Installing PHP

When you install PHP, it will automatically set up libapache2-mod-php5 module necessary to marry Apache and PHP. Now you need to restart the Apache Web server to load PHP module.

Install CUBRID PHP Driver

CUBRID PHP Driver is also available from Launchpad repository. Since we have already added CUBRID's repository information to Ubuntu when we were installing CUBRID Server, we can directly install the PHP driver. Type:

sudo apt-get install php5-cubrid

To install earlier version, indicate the version as:

sudo apt-get install php5-cubrid-8.3.1

This will copy cubrid.so library to /usr/lib/php5/2009* and add the following configuration lines to /etc/php5/apache2/php.ini:

[PHP_CUBRID]
extension=cubrid.so

After installation restart Apache Web server in order for PHP to reload the new driver: