Hand/custom install

You may want to install Twproject by hand because of your network or server settings, or because you are using an operating system without the graphic interface.
There are two ways to complete the installation: copying an existing one (easier) or doing it completely by hand (much complex).

 

Copying a graphical installation

If possible, do the graphical installation on a client machine that can access the database server, so that the installer can configure for your db access, license, http port and the other settings; doing all this by hand can be not trivial; then copy on the server. This is the simplest way.

Manual installation covers different cases : one is that you have already a web server running and a Java 1.7 JDK installed, and you want to add Twproject as a web app. The simplest way is to install using the installer on a client machine, with access to real database, as the installer will:

  1. create the database tables
  2. fill sample data
  3. create a global.properties file with SMTP and similar settings
  4. create a config.properties with the JDBC connection parameters
  5. create a lic.properties file with the license data supplied

As all the files created are fine on any O.S., just copy the resulting webapp from webapps/ROOT in the webapp folder for Teamwork. Otherwise you will need to create all these by hand. A sample complete global.properties can be found as

webapps/ROOT/commons/settings/sampleGlobal.properties

Complete installation by hand

We assume that you have Java’s JDK 7 already installed, and also a Tomcat (7.0.78 or higher) running. If you don’t, download and install those first.

We are assuming that you are not deploying as an unpacked war, as the web app needs to write in its folders, so you must use a “unpacked” war.

  • Download and extract the archive version (zip, gz, or rpm)
  • Take the folder Teamwork, it contains subfolders:

applications commons mobile WEB-INF

plus a few root files. This is the web app you need to install. Now:

  • Copy the web application inside your Tomcat webapps, in a folder with the name you please, say “twproject”. You must ensure that it is using JDK 7.
  • In WEB-INF/config.properties you must write the JDBC connection data and other configurations, several example configs:

MySQL 5.6.23 and before:

user=root   
password=[yourpassword]    
url=jdbc:mySql://localhost/twproject
dialect=org.hibernate.dialect.MySQL5InnoDBUTF8Dialect   
driver=com.mysql.jdbc.Driver

MySQL 5.6.24 + :

user=root   
password=[yourpassword]    
url=jdbc:mySql://localhost/twproject
dialect=org.hibernate.dialect.MySQL57InnoDBUTF8Dialect
driver=com.mysql.jdbc.Driver

SQLServer 2005 with mixed authentication:

user=sa
password=[yourpassword]    
url=jdbc:jtds:sqlserver://myserver:1433/twproject
dialect=org.hibernate.dialect.SQLServer2005UnicodeDialect   
driver=net.sourceforge.jtds.jdbc.Driver

SQLServer 2008+ with mixed authentication:

user=sa
password=[yourpassword]    
url=jdbc:jtds:sqlserver://myserver:1433/twproject
dialect=org.hibernate.dialect.SQLServer2008UnicodeDialect
driver=net.sourceforge.jtds.jdbc.Driver

#if it is an instance:
url=jdbc:jtds:sqlserver://myserver:1433/twproject;instance=yourinstance

for the complete list of SQL Server options see http://jtds.sourceforge.net/faq.html

Oracle 10+:

schemaName=tw52setup
user=tw52setup
password=[yourpassword]    
url=jdbc:oracle:thin:@oldb02:1521:XE[ put your SID]    
dialect=org.hibernate.dialect.Oracle10gDialectDBText   
driver=oracle.jdbc.driver.OracleDriver

PostgreSQL 8+:

user=postgres
password=[yourpassword]    
url=jdbc:postgresql://localhost/twproject
dialect=org.hibernate.dialect.PostgreSQLDialectDBBlobs
driver=org.postgresql.Driver

For other databases / versions, please submit a ticket for updated connection strings. Again, actually the simplest way to be sure about Java connecting to the database is to do a graphical installation from a client and check the resulting config.properties file from there.

  • In WEB-INF you must also create a file lic.properties file in which you paste the evaluation license, for example
    # BEGIN TW6 ACTIVATION KEY - COPY FROM HERE ON
    version=6
    custCode=SAMPLE
    expires=21/07/2013
    licenses=30
    enterprise=no
    mobile=yes
    license=ZK7WT14AD0CEC46B8F337A0AFE41VIT750B6CE086860W8R
    # END ACTIVATION KEY - END COPY
    

Note: this is not a valid license, generate it here: https://twproject.com/on-your-server/

  • This done, you may launch the web app; if you did the deploy operations while Tomcat was running, you may need to restart the web app. If the JDBC configuration is correct (this is most frequent mistake), the application will start, create the tables and insert sample data.
  • DEBUG If the web application “started too soon”, and say the insertion of sample data failed, open Commons/settings/global.properties remove the lines
SETUP_DB_UPDATE_DONE=yes

And restart the web app.

  • Remember to set the repository, file storage, indexing etc . paths in the admin pages.

If you are deploying under JBoss, take care of the Hibernate (including Annotations and Search) version you are using, Teamwork provides its own, and it must be the same.