-
Notifications
You must be signed in to change notification settings - Fork 125
Windows R2 Installation Guide
- Java 7
- Tomcat 7
- MySQL (optional, highly recommended)
- Download and install the latest JDK for Windows x64. [here] (www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
- Update your path and create a new JAVA_HOME environment variable.
- Download and run the Tomcat 7 Windows Service Installer located here.
Register Tomcat to run as a service.
- Open a power shell
- Run the following command from your Tomcat 'bin' directory.
tomcat7 //IS//Tomcat7 --DisplayName="Apache Tomcat 7" --Install=“<Tomcat_Directory>\bin\Tomcat7.exe" --Jvm=auto -StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopClass=org.apache.catalina.startup.Bootstrap —StopParams=stop
For more information visit the reference link here.
You can verify that Tomcat is running as a service by opening your Services Window.
Tomcat Configuration
- Run the 'Monitor Tomcat' application that was installed with Tomcat.
- Right click on the feather and cog icon that appears in your taskbar and select 'configure'.
- Click on the 'Java' tab and make sure that the Java Classpath matches the location of where you have previously installed Java 7.
- In this tab you can change your memory options for Tomcat. We recommend a minimum of 4GB (4096MB).
- Download and install the latest version of MySQL.
- After the installation is complete create a new user for ThreadFix. We do not recommend, for security reasons, that root credentials are used for ThreadFix.
Create a new user by using the following commands.
CREATE USER ‘threadfix’@‘localhost’ IDENTIFIED BY ‘tfpass’;
CREATE USER ‘threadfix’@‘%’ IDENTIFIED BY ‘tfpass’;
GRANT ALL PRIVILEGES ON threadfix.* TO ‘threadfix’@‘localhost’ IDENTIFIED BY ‘tfpass’;
GRANT ALL PRIVILEGES ON threadfix.* TO ‘threadfix’@‘%’ IDENTIFIED BY ‘tfpass’;
FLUSH PRIVILEGES;
Change 'threadfix' and 'tfpass' to a more secure username and password
More information on creating users and their permissions in MySQL can be found here.
MySQL does not, by default, support the full Unicode character set. ThreadFix requires the MySQL character set to updated to utf8mb4. Set by step instructions on that process can be found here.
If you have the ‘Monitor Tomcat’ application running you can right click on the icon in the taskbar and stop the service.
- Copy the threadfix.war file to the 'webapps' folder of Tomcat.
*Start the Tomcat service by right clicking on the 'Monitor Tomcat' icon in the taskbar and selecting the 'Start service' option. Starting Tomcat will explode the threadfix.war file.
For Enterprise Customers
After the WAR has been exploded navigate to the 'classes' folder, located: <Tomcat_Directory>/webapps/threadfix/WEB-INF/classes
, and copy your ThreadFix license to this folder.
Database Configuration
Now that the license file has been added to the correct location we need to set the database to create. Use your preferred text editor and modify the file “jdbc.properties”. (<Tomcat_Directory>/webapps/threadfix/WEB-INF/classes/jdbc.properties
).
NOTE: After ThreadFix has started successfully change the option back to ‘update’! If the ‘create’ option is still in place the database will be scratched each time ThreadFix is started.
HSQL:
- Simply change the
hibernate.hbm2ddl.auto
fromupdate
tocreate
.
MySQL:
If you are planning on using a MySQL database you will need to take a few more steps. First, create a backup of the current jdbc.properties. After you have created a backup copy of the properties, rename the jdbc.properties.mysql to jdbc.properties.
Fields that require modification:
- jdbc.url(If your MySQL instance is on the same machine as Tomcat leave as localhost, otherwise modify to the correct url)
- jdbc.username(MySQL username)
- jdbc.password(MySQL password)
- hibernate.hbm2ddl.auto(
update
tocreate
)
NOTE: After ThreadFix has started successfully change the option back to ‘update’! If the ‘create’ option is still in place the database will be scratched each time ThreadFix is started.
Logging Configuration
You change to location of where ThreadFix logs by using your preferred text editor and modifying the correct parameter in the 'log4j.xml' file. Located: <Tomcat_Directory>/webapps/threadfix/WEB-INF/classes
<param name="file" value="LOG LOCATION" />
- Stop and restart the Tomcat service using the 'Monitor Tomcat' application.
- Wait for ThreadFix to start completely. (“INFO: Server startup in Xms” will appear in the logs.)
Now that ThreadFix is started open your web browser and navigate to http://localhost:8080/threadfix
The ThreadFix login page will appear. Change the default login credentials as soon as possible.
- Username: user
- Password: password