Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Install CUBRID with Apache and PHP on Ubuntu

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.

Apache Installation

Resolving Apache Warnings

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

* Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName

This is not a problem at all and may be ignored. But if you do not want to see this message any more, here is the solution.

  1. Open httpd.conf Apache Configuration file (default location: /etc/apache2/httpd.conf) in the text editor.
  2. Add the following line and save the file:
  3.   ServerName localhost
  4. Restart the Apache Web Server
  5.   sudo /etc/init.d/apache2 restart

Installing PHP

Install PHP by typing the following command in the terminal.

sudo apt-get install php5

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 library to /usr/lib/php5/2009* and add the following configuration lines to /etc/php5/apache2/php.ini:


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

 service apache2 restart

Getting Help

If you have any questions, feel free to ask at CUBRID Q&A site or post your issues at CUBRID Forum.

comments powered by Disqus
Page info
viewed 6335 times
translations en
posted 5 years ago by
updated 5 years ago by
View revisions
Share this article