Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

How to Build CUBRID from Source on Ubuntu


Prerequisites

To install the required packages, simply run the command below:

sudo apt-get install openjdk-6-jdk ant texinfo make-doc libncurses5-dev libtool flex autoconf automake g++ libelf-dev

Noteopenjdk-7-jdk must be used on Ubuntu 12.10 and above instead of openjdk-6-jdk.

Set the JAVA Environment Path:

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-i386

Make sure the path corresponds to your installation.


Building CUBRID

Generate the configure script according to your environment:

./autogen.sh

 

Run configure with --prefix specifying the location where you want CUBRID to be built. On 64 bit systems, you must add --enable-64-bit parameter.

./configure --prefix=/opt/cubrid

(or ./configure --prefix=/opt/cubrid --enable-64-bit for 64 bit systems)

Run  make and make install (for make install sudo access may be required to copy files to /opt/cubrid.

make
sudo make install

All the files are installed in the prefix directory (in this case /opt/cubrid).

The files are owned by root. If you want to edit the owner run:

sudo chown -R user:user /opt/cubrid

The username and group in our example is user.

In order to set the CUBRID enviroment variables, you can use this cubrid.sh file. If you install CUBRID in a different directory, replace /opt/cubrid in the file with the path where you have installed CUBRID.

You have 2 options on how to use the cubrid.sh file: 

1. copy it to /etc/profile.d/cubrid.sh and this way it will be loaded automatically

2. copy it to any location you want and load it using the command:

. /home/user/cubrid.sh

Make sure to leave a space between the "." and the cubrid.sh file. We assumed that /home/user is the directory where you copied the cubrid.sh file.

 

Create the databases folder and databases.txt file:

mkdir -p /opt/cubrid/databases
touch /opt/cubrid/databases/databases.txt

 

Then, you can start and use cubrid:

cubrid service start

If you encounter any issue, post it on our forum or post a question in our Q&A section.

comments powered by Disqus
Page info
viewed 1232 times
translations en
Author
posted last year by
CUBRID
Contributors
updated last year by
View revisions
Share this article