University of Michigan Interface A - Windows Install


1. Java EE 5 SDK

a) Download and install Java EE 5 SDK Update 2 (with JDK) java_ee_sdk-5_02-windows.exe

- change HTTP and HTTPS Ports to different values than default
- Uncheck Application Server registration
- Uncheck "Start Server"

b) Create JAVA_HOME environment var that points to the sdk\jdk directory under the java directory installed.

c) Add %JAVA_HOME%\bin to the beginning of the PATH environment var

2. Ant

a) Download and install apache-ant-1.7.0-bin.zip

b) Add the path to apache-ant-1.7.0\bin to the PATH environment var

3. Tomcat

a) Download and install apache-tomcat-5.5.23.zip

b) Create CATALINA_HOME environment var that points to the tomcat install dir

c) Edit %CATALINA_HOME%\conf\tomcat-users.xml to add a 'manager' role and a new user with that role:

<user username="tomcat_manager_username" password="tomcat_manager_password" roles="manager" />

d) Launch Tomcat :

C:\> cd %CATALINA_HOME%
C:\> bin\startup.bat (Execute as indicated here, do not launch startup script from the bin directory)

e) Open a web browser at http://localhost:8080/manager/html

(enter tomcat_manager_username and tomcat_manager_password)

4. MySQL

a) Download and install MySQL Community Server 5.0.41

- Custom installation
- Standard Configuration
- Enter new root password
- if pb: Control Panel->Windows Firewall->Exceptions->Add Port:

name: mysql
Port number: 3306
TCP

(if already exists, edit and modify name for example and then back to the original name, mysql, to be able to resubmit change)


Then resume configuration.

b) Mysql should be started, and should start at every Windows startup. If not :

C:\>MySQL Server 5.0\bin\mysqld.exe -u root

c) Enter Mysql:

C:\>MySQL Server 5.0\bin\mysql mysql -u root -p (Enter root password set during installation)

d) Create new DB and secure Mysql: (replace ROOT_PSSWD, USER_PSSWD and USER by your choice, and IP_ADDRESS by the IP address of the user who wants to connect remotely -other than localhost- if any)

mysql> create database interfaceA_UM;
mysql> delete from user where User='';
mysql> grant all privileges on *.* to 'root'@'localhost' identified by 'ROOT_PSSWD' with grant option;
mysql> grant all privileges on *.* to 'root'@'IP_ADDRESS' identified by 'ROOT_PSSWD' with grant option;
mysql> grant all privileges on interfaceA_UM.* to 'USER'@'localhost' identified by 'USER_PSSWD' with grant option;
mysql> grant all privileges on interfaceA_UM.* to 'USER'@'IP_ADDRESS' identified by 'USER_PSSWD' with grant option;
mysql> exit;

e) Test:

C:\>MySQL Server 5.0\bin\mysql interfaceA_UM -u USER -p
(Enter USER_PSSWD)

If you get a mysql prompt then it means step d) was successful.

mysql> exit;

5. TortoiseSVN

a) Download and install TortoiseSVN-1.4.4.9706-win32-svn-1.4.4.msi

b) Anywhere you want on the filesystem, create a directory called InterfaceA_UM. Right click on the newly created dir and select SVN Checkout in the context menu ...

In the URL of repository field, enter https://semi1588.svn.sourceforge.net/svnroot/semi1588, then click on OK.

This should download the current sources in the InterfaceA_UM directory, called the Working Directory. Every changes made on the files in the working directory can then be Commited back on the SourceForge SVN Repository using the right click context menu.

6. Eclipse

a) Download, install and launch Eclipse 3.3.0

b) File->Import...

- choose General -> Existing Projects into Workspace, click on Next
- Select root directory: choose the InterfaceA_UM Working Directory created at setp 5). Leave Copy projects into workspace unchecked and click on Finish

c) Edit build.properties and change:

- appserver.home to your tomcat installation path (forward slashes '/' for directory separation)
- tomcat.manager.password to the tomcat_manager_password set in step 3.c)

d) Edit war/WEB-INF/properties/log4j.properties and modify the value of the attribute log4j.appender.logfile.File to reflect your Tomcat installation dir.

e) In Eclipse, call ant with targets clean, gensrc, jspc and build in that order (right click on build.xml)

f) (This part is done already: Paste gen-src/*.cfg.xml content into war/WEB-INF/xml/hibernate/hibernate_with_db_param.cfg.xml).

g) Edit war/WEB-INF/classes/hibernate.cfg.xml, then under Database connection settings find connection.username and connection.password
and change it with the value of USER and USER_PSSWD that where defined in step 4.d)

h) In eclipse, call ant with target schemaexport

i) Call ant with targets deploy, start

7. Interface A

a) Go back to the Tomcat Application Manager page and click on the List Applications link to refresh the page. A new application called InterfaceA should appear. Click on it to launch it. You should now see the Simulation Controller web page.

That's it!