Beagle Logo

Installation

[Home] [Documentation] [Download] [Features] [History]

1) Make sure you have flex 2.5.4 or higher installed. If you're not sure which version you're using run the following command:

     $ flex --version
If you need to install or upgrade flex you can download it from ftp://ftp.gnu.org/ or try one of the GNU mirrors.

2) Create a user accout for the database administrator called 'beagle'. Log in as 'beagle' and unpack the distribution in this home directory. Your directory structure should look something like this:

     /home/beagle
     /home/beagle/src
     /home/beagle/data
     /home/beagle/bin
If you do not have root access or you just want to make a different login the database administrator, edit auth.c and change #define BG_ADMIN "beagle" to reflect the login name you want.

3) After unpacking the distribution, go to the src directory and run the configure script to create the Makefile and config.h for your system then execute make. Note that you may need to change the CC variable in the generated Makefile. The default is CC=gcc.

     $ ./configure
     $ make clean ; make

4) You need to set up two environment variables BG_DATA and BG_PATH in your login profile. BG_DATA is the full path of the directory where BeagleSQL will store data. BG_PATH is the full path of the directory where Beagle executables are kept. Also include BG_PATH in your PATH. In ou example, these variables would be setup as follows

     BG_DATA=/home/beagle/data
     BG_PATH=/home/beagle/bin
     PATH=$PATH:$BG_PATH
     export PATH BG_DATA BG_PATH
If you're running Perl clients you must also set an environment variable called BG_HOST containing the client's hostname. This is a kludge that will be fixed eventually.

5) You'll need to setup an entry in you /etc/services file. Here's Mine:

     beagle          4567/tcp                # Beagle SQL daemon

6) Next, to run the test you'll need to start the postmaster process beagled with the optional [port] number. The port defaults to the services entry 'beagle' If you used

    $ start-beagled.sh

7) Before using beagle you must create a database to work in. The run the demo.sql program, this database is called 'test':

     $ createdb.sh test

8) From the src directory execute the interactive monitor and run the demo.sql script. The demo script creates a couple of tables, an index, does some selects, a delete and shows the contents of the system tables.

        $ isql
        Connecting to localhost...

        isql--> \l demo.sql
9) Try the PERL demo client as well. First, find where your perl 5 interpretor is installed and make sure the first line in demo.pl reflects this. Then from the src directory execute the perl demo client
        $ ./demo.pl