Installing ZFlow on Ubuntu

Before you can install ZFlow make sure you have Tomcat and MySQL installed and running.

Tomcat Installation

We recommend using the following instructions from Digital Ocean to install Tomcat

How to install Tomcat on Ubuntu



MySQL Installation

We recommend  using the following instructions from Digital Ocean to install MySQL.

We highly recommend using Mysql version 5.7 for this process.

How to install MySQL on Ubuntu



Creating database for ZFlow in MySQL

The next step is to create a database for ZFlow in MySQL. We are assuming that you have admin privileges to create the database in ZFlow, create a user has appropriate privileges to manage the ZFlow database.


Create zflow database. In the example below we will use ‘zflow’ as the name of the data

mysql> create database zflow;


Create a user for the zflow database. Pick an appropriate user (instead of zflowusr) and a strong password (not ‘password’). Please remember the user and password details since we will use those values for configuration properties.

mysql> CREATE USER 'zflowusr'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON zflow.* TO 'zflowusr'@'localhost';



Stop Tomcat

It is likely that tomcat is running. Use the command before proceeding to install zflow

sudo systemctl stop tomcat


Installing ZFlow


Go to the home directory of ec2-user and download ZFlow with the commands below


Please send us an email or contact us for ZFlow distribution. ZFlow distribution is a tar file (zflow.tar.gz) that you can unzip and untar using the commands below

gunzip zflow.tar.gz

tar -xvf zflow.tar

You should have the zflow directory with related application files listed


Move zflow directory to the webapps directory

sudo mv zflow /opt/tomcat/webapps/

Change directory to webapps folder

cd /opt/tomcat/webapps/

Change group and user ownership of zflow to tomcat

sudo chown -R tomcat:tomcat zflow

Zflow config file is in the folder below

sudo cd /opt/tomcat/webapps/zflow/WEB-INF/classes/cfg


Use an editor (like vi or vim) to edit database configuration properties in the Configuration file

sudo vim

Change the values of the database config properties as shown below. Use the actual names of the database user, database name and database password that you created in the MySQL section. Save changes to the file





Once the above is done, Add the following line to /opt/tomcat/conf/context.xml

<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />


Would look like this once done.


Save it once you’ve entered the given line



Under /opt/tomcat/webapps/zflow/WEB-INF/lib

Replace the older mysql-connector-java.jar file to the latest version only if you’re not using MYSQL 5.7.

The default connector is of mysql 5.7 and only needs to be changed if a different version is being used.

Looks something like this


Can be found at


Once this step is finished you can go back to the home directory and start tomcat server

sudo systemctl start tomcat


Use http://ipaddress:8080/zflow to access zflow on your browser window.


You can view logs at

journalctl -f -u tomcat