Before you can install ZFlow make sure you have Tomcat and MySQL installed and running.
We recommend using the following instructions from Digital Ocean to install Tomcat
We recommend using the following instructions from Digital Ocean to install MySQL.
We highly recommend using Mysql version 5.7 for this process.
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'; mysql> FLUSH PRIVILEGES;
It is likely that tomcat is running. Use the command before proceeding to install zflow
sudo systemctl stop tomcat
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
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 ZFlowConfig.properties
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
DB_USER=userforzflowdatabase DB_URL=jdbc:mysql://localhost:3306/databaseforzflow DB_PASSWD=password_for_zflowdbuser
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
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 https://dev.mysql.com/downloads/connector/j/
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