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
Note: openjdk-7-jdk must be used on Ubuntu 12.10 and above instead of openjdk-6-jdk.
Set the JAVA Environment Path:
Make sure the path corresponds to your installation.
Generate the configure script according to your environment:
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.
(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:
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