Installation on Linux and Mac
Only manual install is available, sorted by components.
Postgresql
Download sources and unpackage them to /usr/share
. This should create
/usr/share/pgsql
directory which we will rename to postgres
:
$>sudo mv /usr/share/pgsql /usr/share/postgres
Now, create a user postgres
with home set to directory just renamed:
$> sudo groupadd postgres
$> sudo useradd postgres -g postgres -d /usr/share/postgres
$> sudo passwd -l postgres
The second command 'locks' the account so it can only be accessed via sudo su postgres
.
Now, make postgres
owner of the software:
$> sudo chown -R postgres:postgres /usr/share/postgres
Now we can become postgres to do more things.
$> sudo su postgres
$> cd
Create the database:
$> bin/initdb -D data
Database startup will be a common task, so a script was prepared to simplify the task.
Copy it to the bin
directory. Then we start the database:
$> cd bin
$> wget http://www-f9.ijs.si/~studen/labkey/startup.sh
$> cd ..
$> chmod u+x bin/startup.sh
$> mkdir log
$> bin/startup.sh
The same should be done for the shutdown script.
$> cd bin
$> wget http://www-f9.ijs.si/~studen/labkey/shutdown.sh
$> chmod u+x shutdown.sh
$> cd ..
Java
Although the system installation of Java RE could be used, we will provide an official one anyway.
Get the binaries and unpack them at an arbitrary location (/usr/share/java
or ~/java/
are OK).
No further steps are needed. For a more recent version of the Java server RE go to the official page.
Tomcat8
Similarly to postgres, Tomcat sources should be unpacked to /usr/share
. Normally, directory
apache-tomcat-N.X.Y
is created where N.X.Y is the tomcat version. Move that directory to tomcatN
where N is the version number and create a user at home at that directory. I'll use N=8, but change if other version is used. Make the account locked:
$>sudo mv /usr/share/tomcat-N.X.Y /usr/share/tomcat8
$> sudo groupadd tomcat8
$> sudo useradd tomcat8 -g tomcat8 -d /usr/share/tomcat8
$> sudo passwd -l tomcat8
$> sudo chown -R tomcat8:tomcat8 /usr/share/tomcat8
$> sudo su tomcat8
$> cd
Configure Tomcat to use your recently installed java by editing (and creating if not available) file
bin/setenv.sh
and placing:
export JAvA_HOME=[path/to/installed/java/jdk/directory]
export PATH=$PATH:/usr/share/postgres/bin
export CATALINA_OPTS="-Duser.language.en -Duser.region=US"
into the file
Start tomcatN
to check if things are running by:
$> bin/startup.sh
and opening your favorite browser to http://localhost:8080
. A page about Tomcat software should open.
Since we have to add Labkey, stop the tomcat server by doing
$> bin/shutdown.sh
Labkey
Prepare environment:
sudo mkdir /usr/share/labkeyFiles
sudo chown tomcat8:tomcat8 /usr/share/labkeyFiles
Unpack Labkey to an arbitrary location. Copy installation script to $HOME/scripts
and
make it executable:
chmod u+x $HOME/scripts/labkeyUpgrade.sh
Edit the environmental variables in the script:
SRC_DIR=[path/to/installed/Labkey]
SRC_VER=X.Y # set to the one in the file name, typically LabkeyX.Y-
TOMCAT_DIR=/usr/share/tomcat8 #should be OK
LABKEY_BASE=/usr/share #OK
TOMCAT_USER=tomcat8 #OK
Run the script.
The only missing piece is the configuration file. Use configuration file and copy it to
/usr/share/tomcat8/conf/Catalina/localhost/labkey.xml
. More data on configuration can be found here
Then you should start the tomcat server again, and on http://localhost:8080/labkey
a Labkey instance should appear.
Initial settings
At the first log-in the Labkey will ask you to create the administrator user by providing your email address and a password. After that you are the administrator of your labkey copy.
On Settings -> Site -> Admin Console under Admin Console Links/Configuration/File check location of your data files. It is probably something like /usr/share/labkey/files
or something similar.