You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 5
Next »
Using Apache Derby Database
Prerequisites
You should have installed:
- JDK (it is maybe possible to work with jre only)
Downloading and Setting Up the Database for VCL
- Download Apache Derby and install it.
cd ~
wget http://apache.g5searchmarketing.com/db/derby/db-derby-10.5.1.1/db-derby-10.5.1.1-bin.tar.gz
tar -xzf db-derby-10.5.1.1-bin.tar.gz
mkdir /opt/Apache
mv db-derby-10.5.1.1-bin /opt/Apache/derby
export DERBY_HOME="/opt/Apache/derby"
export CLASSPATH="${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${CLASSPATH}"
PATH="$DERBY_HOME/bin:$PATH"
- Create a database in Apache Derby. The database has to be placed in the path "/opt/".
Replace 'vcluser' and 'vcluserpassword' with the user and password you want.
cd /opt/
ij
connect 'jdbc:derby:vcl1;create=true;user='vcluser';password='vcluserpassword';';
exit;
- Download 'vcl.sql' file and the 'derby-parser.pl'.
The 'derby-parser.pl' can be found as an attachment to this page and 'vcl.sql' fron repositories.
Edit the file 'derby-parser.pl'. the variables corresponding to the 'user' and 'password' should match your database.
svn export https://svn.apache.org/repos/asf/incubator/vcl/trunk/mysql/vcl.sql
chmod a+x derby-parser.pl
./derby-parser.pl
- Import vcl-derby.sql file into database. It is a good idea to direct the output to file and check if there were any errors.
ij vcl-derby.sql > import.log