Download and Unpack the Release Package
Copy the PhixFlow release package with a name matching phixflow-x.y.z-yyyymmdd.zip to the release area $RELEASE on the server. By default $RELEASE is at [c:]/opt/phixflow/release.
Unix
Change the owner and group of the release package to tomcat:cview:
chown phixflow-x.y.z-yyymmdd.zip tomcat:cview
Switch to the tomcat user (makes sure that login scripts are run. The syntax for this may vary between operating systems:
su -l tomcat
Change back to the release directory and unzip / unpack the release:
unzip phixflow-x.y.z-yyyymmdd.zip
This will create a release directories like:
phixflow-x.y.z-yyyymmdd
phixflow-x.y.z-yyyymmdd/schema
phixflow-x.y.z-yyyymmdd/webapps
Windows
Unzip the release package using WINZIP or similar.
phixflow-x.y.z-yyyymmdd
phixflow-x.y.z-yyyymmdd/schema
phixflow-x.y.z-yyyymmdd/webapps
Setting up the PhixFlow Database
The schema installation has 4 main steps, regardless of platform:
- Create the database user
- Create the tables required
- Populate them with initial configuration data
- Set the customer name
All of the commands below should be run from an operating system command window e.g. bash (Linux) or cmd (Windows), and the current directory should be set to that containing the installation instructions for the target platform.
E.g.
cmd> cd $RELEASE/phixflow-x.y.z-yyyymmdd/install/schema/$platform/install
where $platform is one of oracle, my_sql or sql_server, then follow the instructions in install_instructions.txt.
Create the database user
Creating the database user is heavily dependent on the database platform, and will often have to be varied to meet local requirements regarding naming and security. These example commands will be adequate for basic installations.
Platform | Create the database user |
Oracle: | This command will prompt for the name of the user to be created. cmd> sqlplus SYS/SYSPassword@SID as SYSDBA @create_user |
Sql Server: | This command required the name of the user to be created, the password, etc. to be provided as parameters cmd> sqlcmd -S localhost\myservice -i create_database_and_user.sql -v dbName="cview" dbLogin="cview" dbUser="cview" dbPassword="mypass" |
MySQL: | cmd> mysql –-user=myrootuser –-password |
Create the tables
Creating the database tables is the same regardless of platform, varying only in the URL used to reference the database.
cmd> java -jar ../../../bin/installer.jar
-url=jdbc:oracle:thin:@localhost:1521:cview -user=myuser -pass=mypass –install
See the appendices for how to specify URLs for the database platforms supported by PhixFlow.
Create the initial data
Creating the initial data uses the database-specific command-line utilities again:.
Database | Create initial data |
Oracle: | cmd> sqlplus myuser/mypass @populate_schema.sql |
Sql Server: | cmd> sqlcmd -S hostname\myservice -i populate_schema.sql -v dbName="cview" |
MySQL: | cmd> mysql --user=root –-password mysql> exit; |
Set the Customer Name in the Database
The customer name in the database must match the customer name used by PhixFlow Support to generate licence files.
Database | Create initial data |
Oracle: | cmd> sqlplus myuser/mypass |
Sql Server: | cmd> sqlcmd -S hostname\myservice –d cview |
MySQL: | cmd> mysql --user=root –-password –database=cview mysql> exit; |
Install the Webapp in the Tomcat application server
Copy or Move the PhixFlow web application into Tomcat
To install the PhixFlow web application into Tomcat:
Copy $RELEASE/webapps/phixflow to $TOMCAT/webapps/phixflow
Configure phixflow-datasource.xml
The PhixFlow webapp must be configured to give access to the database user that has been created to hold the PhixFlow data.
In $TOMCAT/webapps/phixflow/WEB-INF/classes, copy phixflow-datasource.xml.<database>.example to phixflow-datasource.xml and edit the properties for <bean id="dataSource"...., e.g.:
<property name="url">
<value>jdbc:oracle:thin:@[SERVER IP ADDRESS]:1521:[SID]</value>
</property>
<property name="username">
<value>[USERNAME]</value>
</property>
<property name="password">
<value>[PASSWORD]</value>
</property>
See the appendices for how to specify URLs for the database platforms supported by PhixFlow.
Configure phixflow-instance.xml
The PhixFlow webapp instance must be configured to identify the instance and set whether the instance is active on startup.
For a single instance, non-resilient configuration, simply copy the example file phixflow-instance.xml.example to phixflow-instance.xml.
Resilient Configuration
A resilient PhixFlow configuration consists of 2 or more web applications all connected to a common database and configured such that at any one time, only one is active; the other instances will monitor the first and one will take over if they detect that the first has failed.
In such a configuration, set the instance name and id for each PhixFlow webapp instance to unique values and set leaderOnStartup to “true” for an instance if it should become active immediately on startup.
e.g.:
<!-- The instance name must be different for each member of the cluster -->
<bean id="clusterInstance"
class="com.accipia.phixflow.service.cluster.main.ClusterInstance"
p:name="MAIN"
p:id=”1”
p:leaderOnStartup="true"
/>
See the appendices for more information on setting up a resilient configuration.
Configure phixflow-email.xml
The PhixFlow webapp must be configured to allow PhixFlow to poll an internal/external email server for incoming emails.
In $TOMCAT/webapps/phixflow/WEB-INF/classes, copy phixflow-email.xml.example to phixflow-email.xml and edit the properties for <bean id="emailConfiguration"...., e.g.:
<p:enabled="true">
<p:port="110">
<p:host="pop.your-mail-server.com">
<p:protocol="pop3">
<p:username="your username">
<p:password="your password">
Note that setting the enabled property to true will mean PhixFlow will poll the configured email server for incoming emails. Leave this value set to false if you do not require PhixFlow to process incoming emails.
Configure phixflow-domain.xml
The PhixFlow webapp can be configured to authenticate users’ usernames and passwords against an external Domain / Active Directory server.
If you don’t want want to enable domain logins, simply copy the example file provided.
For more information on how to configure for domain logins, see the PhixFlow ActiveDirectory Configuration userguide
Configure log4j.properties
To turn on PhixFlow logging, go to directory $TOMCAT/webapps/phixflow/WEB-INF/classes and copy log4j.properties.example to log4j.properties
This will give default logging for PhixFlow.
Multiple PhixFlow instances
To install multiple instances of PhixFlow on a single server, complete the installation steps above to create a first PhixFlow instance. Then install a further instance:
- Create a second database user to hold the data for the new instance.
- Copy the PhixFlow web application into the Tomcat again:
cp $RELEASE/webapps/phixflow to $TOMCAT/webapps/alternative_name
where “alternative_name” is the name of your test system.
- Be sure to set up a separate user and schema in the database for the new PhixFlow instance and to set phixflow-datasource.xml as needed.
- To ensure log messages are sent to a separate file, change the following line in log4j.properties
log4j.appender.myAppender.file=logs/ alternative_name.log
- To allow a user to view this instance of PhixFlow at the same time as the default instance, edit $TOMCAT/webapps/alternative_name/index.html:
Find the line containing the call to window.open and change the 2nd parameter from ‘PhixFlow’ to ‘alternative_name’