The FlexDeploy distribution for Tomcat includes the binaries for Tomcat, the FlexDeploy WAR, and the base configurations, leaving only a few simple steps to complete the install. The distribution contains the following components.
Adjust for Windows path if you are installing on Windows platform.
Step 1. Ensure Java 8 is installed on the server.
In this example, JAVA_HOME is /u01/java/jdk1.8.0_171 but it can be anything you want. If default java is not version 8, then we will need to adjust for it during Step 7 later.
Step 2. Extract the zip file in the desired location (referred to as "FlexDeploy Home" in this document). See example below, where zip was extracted in /u01/flexdeploy folder.
We recommend use of folder structure without any space in name. |
Here is how it will look like after unzip.
Step 3. Setup the database for FlexDeploy, if you not already done so.
Step 4. Modify Tomcat configuration file (context.xml) for database connectivity depending on your database type.
File - <FlexDeploy Home>/apache-tomcat-flexdeploy/conf/context.xml
|
<Resource name="jdbc/flexdbDS" auth="Container" type="oracle.ucp.jdbc.PoolDataSource" factory="oracle.ucp.jdbc.PoolDataSourceImpl" connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource" minPoolSize="0" maxPoolSize="100" initialPoolSize="0" autoCommit="false" inactiveConnectionTimeout="300" url="**CONNECT_STRING**" user="fd_admin" password="**FD_ADMIN_PASSWORD**" fastConnectionFailoverEnabled="true" validationQuery="select 1 from dual" testOnBorrow="true" useLocalSessionState="true" defaultAutoCommit="false"/> |
<Resource name="jdbc/flexdbDS" auth="Container" type="javax.sql.DataSource" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" driverClassName="org.postgresql.Driver" url="**CONNECT_STRING**" username="fd_admin" password="**FD_ADMIN_PASSWORD**" maxTotal="100" maxIdle="20" validationQuery="select 1" testOnBorrow="true" defaultTransactionIsolation="READ_COMMITTED" useLocalSessionState="true" defaultAutoCommit="false"/> |
Step 5. (Optional) Modify Tomcat server.xml for port if necessary.
File - <FlexDeploy Home>/apache-tomcat-flexdeploy/conf/server.xml
Step 6. (Optional) Modify Tomcat Environment script (setenvoverride.sh or setenvoverride.bat) for FlexDeploy server side directories.
If you are setting up FlexDeploy for Trial purposes, it is good idea to leave directories as default, but if you are setting up FlexDeploy for production use, then we recommend to modify to use directory structure outside of FlexDeploy installation. For previous FlexDeploy versions, these changes were directly done in setenv.sh or setenv.bat files. |
File - <FlexDeploy Home>/apache-tomcat-flexdeploy/bin/setenvoverride.sh (setenvoverride.bat on windows)
Below are default artifact and working directories created under FlexDeploy Home when you extracted zip file. If you want to use different directories then modify setenvoverride.sh or setenvoverride.bat file, otherwise skip this step.
Default setenvoverride.sh is shown below.
Here is example of setenvoverride.sh which is modified to use non-default folders.
Step 7. (Optional) Modify Tomcat Environment script (setenvoverride.sh or setenvoverride.bat) for JAVA_HOME.
File - <FlexDeploy Home>/apache-tomcat-flexdeploy/bin/setenvoverride.sh (setenvoverride.bat on windows)
If JAVA_HOME is already set in your environment, you can skip this step. Unix Example - JAVA_HOME=/u01/java/jdk1.8.0_121 Windows Example - set JAVA_HOME=c:/installs/Java/jdk1.8.0_121 |
If you were also setting JAVA_HOME, this file would look like this.
Step 8. (Only if using Oracle Database)
ojdbc8-full.tar.gz
.Be sure to download the JDBC driver matching your Oracle Database version and one which is compiled and compatible with JDK8. If you download the driver which is compiled with a newer JDK you will get errors on server startup similar to the following:
|
Copy all jar files (for example, ojdbc8.jar, ons.jar, ucp.jar and other jars) from downloaded archive ojdbc8-full.tar.gz to <FlexDeploy Home>/apache-tomcat-flexdeploy/libext.
This has changed with FlexDeploy 5.7.0.1. Please put any extra libraries required inside of <FlexDeploy Home>/apache-tomcat-flexdeploy/libext not <FlexDeploy Home>/apache-tomcat-flexdeploy/lib. You will need to create this directory. |
Step 9. (Linux only) - set the shell scripts executable with this command.
chmod +x <FlexDeploy Home>/apache-tomcat-flexdeploy/bin/*.sh chmod +x <FlexDeploy Home>/*.sh |
Step 10. Skip this step if you did not modify setenv.sh or setenv.bat to use non-default server side directories in Step 6.
If you are using non-default server side directories, then move all the jar files from <FlexDeploy Home>/application/plugins to FLEXDEPLOY_WORKING_DIR/plugins. At startup, FlexDeploy will load all the plugins.
Step 11. Start tomcat by running the following script.
File - <FlexDeploy Home>/StartFlexDeploy.sh(you can also use startup.sh or startup.bat scripts). If you want to use Windows service, see Install Windows Service for FlexDeploy Tomcat Server.
After starting your server, check the <FlexDeploy Home>/apache-tomcat-flexdeploy/logs/flexdeploy.0.log file for the following error message:
If present, increase the number of processes for the database
|
Step 12. Launch FlexDeploy in your browser.
Step 13. Go to Administration - Plugins on FlexDeploy. Verify that Plugins are loaded. You should not see any files remaining in FLEXDEPLOY_WORKING_DIR/plugins folder after few minutes.
Step 14. Now that you have installed FlexDeploy, let's get start with configuration. You can do this in matter of minutes by using Blueprints concept, which is very simple configuration wizard for most common usecases.