LucidDbGettingStarted

From Eigenpedia

Jump to: navigation, search

This page is a step-by-step guide to setting up and running a LucidDB binary distribution on Linux. For Windows, everything is pretty much the same except the archive comes in a zipfile, and the scripts are .bat files instead of shell scripts. (Cygwin users, note this mailing list thread.)

Contents

Install

To get started, you must obtain and unpack an archive of the binary distribution. The archive will be named something like luciddb-bin-linux-0.6.0.tar.bz2, and can be unpacked with:

tar xjf luciddb-bin-linux-0.6.0.tar.bz2

This will create a directory luciddb-0.6.0, which we will refer to as the LucidDB home directory. The next step is to run a one-time installation script. Before you do this, you must first export environment variable JAVA_HOME to reference the installed location of your Java runtime environment. This environment variable needs to be set permanently, so it's best to put it in your login script. For example, if you are using bash as your shell, add the following line to ~/.bash_profile, using the correct location for your JRE (make sure it's Java 1.5), and then re-login:

export JAVA_HOME=/usr/java/j2sdk

Now, run the installation script:

cd luciddb-0.6.0/install
./install.sh

If you didn't set JAVA_HOME correctly, you should get a corresponding error message. Otherwise, if all goes well, you'll see a lot of script output, ending with the following line:

echo $LOCALCLASSPATH >$BIN_DIR/classpath.gen

This saved the classpath needed at runtime, so now you should be ready to go.

Start the server

To start the server, run these commands:

cd ../bin
./lucidDbServer

You should see the following message in the same console:

Server personality:  LucidDB
Loading database...
Starting network...
Server now listening for RMI connections on port 5434; enter !quit to stop

While the server is running, the console in which it started is tied up waiting for the !quit command.

(If you get an error about libaio, follow the instructions in the FAQ to fix the problem.)

Connect from a client

Start another shell and run the command-line JDBC client to test out a SQL connection to the server:

cd luciddb-0.6.0/bin
./sqllineClient

You should see a prompt like this:

Connecting to jdbc:luciddb:rmi://localhost
Connected to: LucidDB (version 0.6.0)
Driver: LucidDbJdbcDriver (version 0.6)
Autocommit status: true
Transaction isolation: TRANSACTION_REPEATABLE_READ
sqlline version 1.0.2-jvs by Marc Prud'hommeaux
0: jdbc:luciddb:rmi://localhost>

(If you have problems here, it's probably because RMI is very sensitive to /etc/hosts configuration; see the Eigenbase wiki for help.)

Execute SQL

Enter a query at the prompt:

select schema_name from sys_root.dba_schemas;

You should get a result set like this:

0: jdbc:luciddb:rmi://localhost> select schema_name from sys_root.dba_schemas;
+---------------------+
|     SCHEMA_NAME     |
+---------------------+
| SYS_BOOT            |
| JDBC_METADATA       |
| MGMT                |
| SQLJ                |
| INFORMATION_SCHEMA  |
| APPLIB              |
| SYS_ROOT            |
+---------------------+

Congratulations! LucidDB is up and running.

Shut down

Enter !quit in the client window to close the connection, and then !quit in the server console to shut down LucidDB.

What next?

If you get tired of sqlline, you might want to try setting up a GUI client. LucidDbSquirrel tells how.

LucidDbDocs has more documentation for learning about the rest of the system. You might want to start with the LucidDbEtlTutorial, and then try loading up some of your own data and running queries against it. Or set up Mondrian for multi-dimensional analysis as described in LucidDbOlap.

If you encounter problems, check the LucidDbUserFaq, and if you still can't figure it out, try the mailing list (luciddb-users at lists.sf.net; you may be able to find a solution to your problem by reading the archives).

Personal tools