This topic is under construction for the 19.1 release of LabKey Server. For current documentation of this feature, click here.
Before manually installing or upgrading LabKey Server, you'll need to install the correct versions of all of the required components.
We provide support only for the versions listed for each component
which have proven themselves over many months of testing and deployment. Some of these components may have more recent releases.
Create Folder Structure
For simplicity, we recommend using the directory structure described here, particularly whenever you are creating a new LabKey installation from scratch.
First create a "labkey" directory at the root level. On Windows, "C:\labkey"; on Mac or Linux, "/usr/local/labkey". Within this directory, create the following subdirectories:
- apps: This subfolder will hold the third party components: Tomcat, PostgreSQL, OpenJDK.
- labkey: This subfolder (i.e. C:\labkey\labkey) is where your actual LabKey installation will go.
- backups: This subfolder will store database and file backups as needed.
- src: This subfolder will house binaries and source code.
- src\labkey: Within the "src" directory, create another subdirectory "labkey". This where you will place the downloaded binaries for LabKey Server.
Install either OpenJDK 11
or JRE 8
OpenJDK 11 Option
- Download OpenJDK 11.
- On Windows:
- create the directory C:\Program Files\Java, if it doesn't already exist. Extract the downloaded zip file to this directory, resulting in the following path: C:\Program Files\Java\jdk-11.0.1
- Add the following directory to your PATH: C:\Program Files\Java\jdk-11\bin
- Set JAVA_HOME to C:\Program Files\Java\jdk-11
- On Linux:
- A common place to install the JDK is /usr/local/jdk<version>. We suggest creating a symbolic link from /usr/local/java to /usr/local/jdk<version>. This will make upgrading the JDK easier in the future.
JRE 8 Option
- Download the Server Java Runtime Environment (Server JRE) Version 8 from http://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK8. (The Server JRE is identical to the JRE, except all client side code (such as applets) has been removed making it far more secure and less memory intensive.)
- Install the Server JRE to the chosen directory.
- On Windows the default installation directory is C:\Program Files\Java\jre8
- On Linux a common place to install the Server JRE is /usr/local/jre<version>. We suggest creating a symbolic link from /usr/local/java to /usr/local/jre<version>. This will make upgrading the Server JRE easier in the future.
Install the Apache Tomcat Web Server
We recommend running LabKey Server with the latest version of Tomcat. For details, see Supported Tomcat Versions
- Install Tomcat. On Linux, install to /usr/local/apache-tomcat<version>, then create a symbolic link from /usr/local/tomcat to /usr/local/apache-tomcat<version>. We will call this directory <tomcat-home>. Note that if you were to install Tomcat using their package manager, files and directories such as lib may be placed in different locations.
- Configure Tomcat to use the Server JRE installed above. You can do this either by creating a JAVA_HOME environment variable under the user account that will be starting tomcat, or by adding that variable to the tomcat startup scripts, <tomcat-home>/bin/startup.sh on Linux or startup.bat on Windows. For example, on Linux add this line to the beginning of the tomcat's startup.sh file: Export JAVA_HOME=/usr/local/java.
- Start Tomcat. On Linux run <tomcat-home>/bin/startup.sh. If you want Tomcat to start up automatically when you restart your computer see the Tomcat documentation.
- Test your Tomcat installation by entering http://<machine_name or localhost or IP_address>:8080 in a web browser. If your Java and Tomcat installations are successful you will see the Tomcat success page.
Install the Database Server
Install one of the following database servers:
Platform-specific installation instructions:
Install the LabKey Server System Components
2. Unzip the LabKey Server components to a directory on your computer. On Linux or OSX systems, the command tar xfz LabKey Server-bin.tar.gz
will unzip and untar the archive. You will move these components later, so the directory you unpack them to is unimportant. After unpacking the directory should contain these files and directories:
- bin: Binary files required by LabKey Server (only in Windows distributions).
- labkeywebapp: The LabKey Server web application.
- modules: LabKey Server modules.
- pipeline-lib: Jars for the data processing pipeline.
- tomcat-lib: Required server library jars.
- labkey.xml: LabKey Server configuration file.
- manual-upgrade.sh: Manual upgrade script for OSX and non-supported Linux installations.
- README.txt: A file pointing you to this documentation.
- VERSION: A file containing the release number and build number.
After you've downloaded and installed all components, you'll configure the LabKey Server web application to run on Tomcat. See Configure the LabKey Web Application