Download and install Java SDK 1.6 (aka Java 6), available from
Download and install Apache Tomcat 6.0.20 or later, available
Unless you have manually downloaded and installed JAI (Java Advanced Imaging) native acceleration libraries (see https://jai.dev.java.net/) it is also a good idea to disable the native acceleration of JAI.
All of the above is done by setting Java startup options for
Tomcat in the
CATALINA_OPTS environment variable.
Basically add the next line (as a single line) close to the top of
catalina.sh script that comes
CATALINA_OPTS="-Xmx500m -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dcom.sun.media.jai.disableMediaLib=true"
For more information about Tomcat options see
Download and install MySQL (tested with version
5.0), available from
not be used. The InnoDB
table engine is also needed, so do not disable them
(not that you would) but you may want to tune the
InnoDB behaviour before creating BASE
databases. BASE comes pre-configured for MySQL so
there is no need to change database settings in the
BASE configuration files.
PostgreSQL 8.2 seems to be working very well with
BASE and Hibernate. Download and install PostgreSQL,
file. Uncomment the settings for PostgreSQL and
comment out the settings for MySQL.
PostgreSQL versions prior to 8.2 have a non-optimal solution for locking rows in certain situations. This may cause two seemingly independent transactions to lock if they just reference a common database row. This may happen, for example, when importing raw data that have references to the same reporters. The problem has been solved in PostgreSQL 8.2.
BASE and unpack the downloaded file,
tar zxpf base-...tar.gz. If you
prefer to have the bleeding edge version of BASE, perform
a checkout of the source from the subversion repository
(subversion checkout instructions at
If you choose to download the binary package, skip to the
next item. The rest of us, read on and compile BASE. If
you downloaded a source distribution, unpack the
base-...src.tar.gz, or you may have performed a
subversion checkout. Change to the 'root' base2
directory, and issue
package.bin. This will create a binary package
in the base2 'root' directory. Unpack this new package
(outside of the source file hierarchy), and from now on
the instructions are the same irrespective where you got
the binary package.
This section is intended for advanced users and programmers only. In cases when you want to change the BASE code and try out personalized features it may be advantageous to run the tweaked BASE server against the development tree. Instructions on how to accomplish this is available in the building BASE document. When you return back after compiling in the subversion tree you can follow the instruction here (with obvious changes to paths).
Instructions for MySQL and PostgreSQL are available below. The database names (base2 and base2dynamic is used here), the db_user, and the db_password can be changed during the creation of the databases. It is recommended to change the db_password, the other changes can be made if desired. The database names, the db_user, and the db_password are needed in a later step below when configuring BASE.
|Note that the db_user name and db_password set here is used internally by BASE in communication with the database and is never used to log on to the BASE application.|
|The database must use the UTF-8 character set|
Otherwise there will be a problem with storing values that uses characters outside the normal Latin1 range, for example unit-related such as µ (micro) and Ω (ohm).
Create a new database for BASE, and add a db_user with at least SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, and ALTER permission for the new database. To do this, connect to your MySQL server and issue the next lines:
CREATE DATABASE base2 DEFAULT CHARACTER SET utf8; CREATE DATABASE base2dynamic DEFAULT CHARACTER SET utf8; GRANT ALL ON base2.* TO db_user@localhost IDENTIFIED BY 'db_password'; GRANT ALL ON base2dynamic.* TO db_user@localhost;
file contains the above statements and can be used
mysql command-line tool
(remember to edit
and the database names in the script file before
executing the command):
mysql -uroot -p
< ./misc/sql/createdb.mysql.sql. The
header in the script file contains further
information about the script.
Create a new database for BASE, and add a db_user with the proper privileges. To do this, log in as your PostgreSQL user and issue these lines (omit comments):
createuser db_user -P # this will prompt for an password for the new user, and issue two # more question that should be answered with character 'n' for no. createdb --owner db_user --encoding UTF8 base2 psql base2 # this will start the psql command line tool. Issue the next line # within the tool and quit with a '\q'. CREATE SCHEMA "dynamic" AUTHORIZATION "db_user";
file contains the above statements and can be used
psql command-line tool:
psql -f ./misc/sql/createdb.posgres.sql
template1 The header in the script file
contains further information about the script.
An area for file storage must be setup. Create an empty directory in a proper location in your file system, and set the owner to be the same as the one that the Tomcat server will be running as. Remember this location for later use.
Basic BASE configuration is done in
See the Appendix C, base.config reference for more
information about the settings in
Optional but recommended. You may want
to modify extended properties to fit your needs. Extended
properties are defined in
There is an
discussing extended properties available. If you
plan to perform a migration of a BASE version 1.2 database you
should probably not remove any extended properties
columns (this is not tested so the outcome is currently
undefined). However, adding columns does not affect
Change directory to
and execute the following commands:
./initdb.sh [base_root_login] base_root_password ./updateindexes.sh
The second command is important for PostgreSQL users since the Hibernate database initialisation utility is not able to create all indexes that are required. BASE will still work without the indexes but performance may suffer.
The base_root_login and
base_root_password you use here
is given to the BASE web application root user account.
The base_root_login is optional. If
If the initialisation script fail, it is most probably a problem related to the underlying database. Make sure that the database accepts network connection and make sure that db_user has proper credentials.
Either move the
to the Tomcat
directory or create a symbolic link from the Tomcat
webapps directory to
cd /path/to/tomcat/webapps ln -s /path_to_base/www base2
If you plan to install extensions you should make sure that
directory is writable by the user account Tomcat is running as.
Start/restart Tomcat, and try http://hostname:8080/base2 (change hostname to your hostname) in your favourite browser. The BASE log-in page should appear after a few seconds.
This step is optional.
If you want run the Tomcat server through the Apache web server, you need to install the Apache version 2 web server, available from http://www.apache.org/, and a apache-tomcat connector, available from http://jakarta.apache.org/tomcat/connectors-doc/index.html. So, we got you there;-) To be honest, this step is not really well documented since we previously used SuSE 9.3 on our demo/test server, and apache/tomcat/mod_jk comes pre-installed. The current server does not use the apache/tomcat connector. What you need to do is something like this
workers.propertiesfile in the Tomcat
basedirectory (commonly copied from a template).
jk.conffile in the apache
confdirectory (commonly copied from a template), and make sure that jk is added to the modules to be loaded when apache starts.
jk.confadd the lines below and change paths appropriately.
# The following lines makes apache aware of the location of # the /base2 context Alias /base2 "/srv/www/tomcat6/base/webapps/base2" <Directory "/srv/www/tomcat6/base/webapps/base2"> Options Indexes FollowSymLinks allow from all </Directory> # The following lines mounts all base2 jsp files to Tomcat JkMount /base2 ajp13 JkMount /base2/* ajp13 # The following lines prohibits users from directly accessing WEB-INF <Location "/base2/WEB-INF/"> AllowOverride None deny from all </Location>
You must restart the Apache and the Tomcat server after above steps.
Happy BASEing. Now you can log on to your BASE server as user root (use the base_root_password from the database initialization step above). You should begin with creating a couple user accounts, for more information on how to create user accounts please refer to Chapter 24, Account administration.
If you are planning to perform a migration of data from BASE version 1.2.x please perform the steps in Section 21.5, “Migration instructions” before doing anything else with your new BASE installation.