9 1:Setting up a Production Environment using Tomcat 5.5
From Pnet-Community
[edit] Installing Project.net in a Production Environment Using Tomcat Application Server
This document guides a user through the process of installing Project.net, version 9.0, on a Tomcat application server. In addition to the application server, a Project.net installation will also require: web server, database server, mail (SMTP) server, document vault (file server) and LDAP server (optional).
[edit] Step 1: Review checklist of requirements
Please review the complete list of hardware and software requirements as described in [wiki:Production-SystemRequirements-8_3 Summary of Project.net 8.3 Deployment Requirements]. Make sure you can meet these requirements before installing Project.net. You will also need to read [wiki:Production-installRequirements Preparing to Install Project.net].
[edit] Step 2: Unpack the Project.net Installation Package
The installation package includes the Project.net software in a zip archive file. The first step to installing Project.net is to unpack the software onto an accessible file location.
- If it does not exist, create a temporary directory to unpack the installation package, suggested, C:\pnet. These instructions will refer to this location throughout the steps.
- Unzip the zip file from your download into the C:\pnet directory. Once unpacked, you will have c:\pnet\v9.0.0 directory.
[edit] Step 3: Install and configure the Oracle database server
Project.net requires an Oracle database server. Follow the instructions in this section to install and configure an Oracle database server, if one is not prepared.
[edit] Prerequisites
- A copy of Oracle as specified in the [wiki:Production-SystemRequirements-8_3 Summary of Project.net 8.3 Deployment Requirements].
- If you are installing on a system with a non-static IP address, served from a DHCP-server, you will need to install a Microsoft Loopback Adapter. Follow How to install the Microsoft Loopback adapter in Windows XP. When complete, open the new adapter’s properties and set its IP address to a non-routing address, like 192.168.x.x (where x is any number between 0 and 255). Also, set its Subnet mask to 255.255.255.0. Make note of this address, you will need it further in the installation.
[edit] Instructions
- Install Oracle 10.2 Enterprise or Express Edition.
[edit] Step 4: Create and configure the Project.net database
This section will guide you through the steps of creating the tables, stored procedures and such for the Project.net database.
[edit] Prerequisites
- An Oracle database server, installed as above.
- A working copy of sqlplus. Normally, this is installed with the Oracle database, but if not, the Oracle instant client is sufficient.
- The system password for the Project.net database instance.
- You will need to know the database server’s hostname.
[edit] Instructions
- Run the Oracle Database Configuration Assistant located in the Windows Start/Oracle/Configuration and Migration Tools menu to create a database instance for the Project.net application.
- Select Create a Database the click Next.
- Note the Global Database Name and SID that you use (Note: Oracle Express automatically sets the SID to XE).
- Choose your preferred management method. If unsure, chose the default.
- Note the password(s) you use for the various accounts.
- Select the appropriate storage mechanism for your installation. Again, if unsure, chose the default.
- Specify the storage location.
- And Recovery Configuration.
- Do not install the Sample Schemas.
- Select the remaining options, as appropriate to your installation, and create the database.
- Windows systems will need to add a listener using Oracle Net Configuration Assistant.
- Start / Programs / Oracle-!OraHome10g / Configuration and Migration tool / Net configuration assistant
- First screen - select Listener Configuration
- Second screen - select Add
- Third screen - enter listener name
- Fourth screen - keep default values (TCP)
- Fifth screen - keep default values (1521)
- Sixth screen - Select No (don’t configure another listener) and click Next.
- Click Next on the Listener configuration complete screen.
- Click Finish on the Welcome screen.
- CHECKPOINT: Ensure the Oracle Database listener services are running
- On Windows systems, run the command lsnrctl status in a command window and check the values for:
- -ALIAS
- -Listener Parameter File
- -Listening Endpoints Summary
- -ALIAS
- For both Windows and L*nux systems, check TNS connect identifier with tnsping <database SID>.
- Also, check that sqlplus system/<database admin password>@<database name> connects.
- Close the command window (Windows).
- On Windows systems, run the command lsnrctl status in a command window and check the values for:
- Change directory into the c:\pnet\v9.0.0\database\create-scripts\versions\9.0.0\new\ directory.
- Using the editor of your choice, edit the pnetMasterDBBuild.bat (or pnetMasterDBBuild.sh) file. Set the environment variables in this script to be appropriate for your installation. Further instructions are available in the file.
- Note:
- The PNET_BUILD_DB_SCRIPTS_PATH should be set to c:\pnet\v9.0.0\database\create-scripts\versions\9.0.0\new\ directory.
- If you are using Oracle Express set the PNET_BUILD_DB_DATABASE_NAME variable to the value XE.
- The directory specified for PNET_BUILD_DB_LOG_PATH must exist; create it if it does not. Suggested is c:\pnet\logs.
- The PNET_BUILD_DB_DATAFILE_PATH should be set to the directory where Oracle keeps the database - it will be in the oradata directory in the Oracle folder area (ex. /usr/lib/oracle/xe/oradata/XE)
- The database scripts were created on a Windows system. If you are installing on a Linux-based system you may need to convert the end-of-line characters from Windows-format to Linux-format so the scripts will run correctly. dos2unix is a handy utility to do this for you, it should be already installed on your Linux system.
- cd <Install package>/database
- find . -type f -exec dos2unix {} \;
- cd <Install package>/database
- Note:
- To start the database installation, run the batch command pnetMasterDBBuild.bat (or pnetMasterDBBuild.sh) from the database\create-scripts\versions\9.0.0\new directory. The script will take some time to run; you can monitor its progress by checking the log file you specified inside of pnetMasterDBBuild.
- When complete, check the log for errors. You will notice some errors in the logs about public synonym already existing, but there should be only about 55 lines in the log file with the word “ERROR”.
- If the script fails and you need to re-run it to clean everything up before trying again.
- a. Go to the database\create-scripts\tools folder
- b. Start Sqlplus with sqlplus pnet/<pnet password>@<database SID>
- c. Drop the existing database with @drop_pnet_and_user_schemas.sql
[edit] Step 5: Install and Update Java Runtime Environment
[edit] 5.1: Install the Java 5.0 Runtime Environment
[edit] Prerequisites
- A copy of Java Runtime Environment 5.0 Update 14 as specified in the [wiki:Production-SystemRequirements-8_3 Summary of Project.net 8.3 Deployment Requirements].
[edit] Instructions (Windows installations)
- Locate the Jave Runtime Environment installation package using Windows Explorer.
- Double-click on the file to initiate the installation.
[edit] Instructions (Linux installations)
The installation instructions for Linux systems will vary depending upon the version of Linux in question. Follow the installation instructions for your specific operating system
[edit] 5.2: Update the Java Security for Strong Encryption
[edit] Prerequisites
- Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 5.0 included in the installation package or downloaded from Sun Microsystems at: http://java.sun.com/javase/downloads/index_jdk5.jsp.
[edit] Instructions
- Copy c:/pnet/v9.0.0/lib/jce/*.jar to the jre/lib/security directory of the Java runtime location. For Windows, the likely location is C:\Program Files\Java\jre1.5.0_14\lib\security.
- Place the files directly into the security directory, overwriting any existing files that conflict.
[edit] Step 6: Install and Configure the Apache Tomcat Server
This section outlines the Apache Tomcat installation and configuration for a production deployment of the Project.net application.
[edit] 6.1: Install the Tomcat Application Server
[edit] Prerequisites
- A copy of Apache Tomcat as specified in the [wiki:Production-SystemRequirements-8_3 Summary of Project.net 8.3 Deployment Requirements].
- Java Runtime Environment 5.0 Update 14 http://java.sun.com/javase/downloads/index_jdk5.jsp
[edit] 6.1.1 Instructions (Windows installations)
- Install Apache Tomcat 5.5.* by running the installer apache-tomcat-5.5.23.exe (Windows service installer)
- Select the path that you want to install tomcat5.5 and click Next.
- Next Screen (Configuration Options)
- HTTP/1.1 Connector Port : 8080
- User Name : manager
- Password : <a secure password>
- Select the path of J2SE 5.0 JRE installed on your system (example C:\Program Files\Java\jre1.5.0_14)
- Click the Install button. (While installing tomcat 5.5 it may ask the network password, click cancel)
- On the last screen uncheck the option for Run Apache Tomcat and click Finish.
[edit] 6.1.2 Instructions (Linux installations)
- If you have already downloaded the binary, simply copy it to the directory you want to install it under and expand the file. For example, if the downloaded Tomcat tar file is in /home/someuser/downloads, to install it under /opt, follow these steps. As root user:
- cp /home/someuser/downloads/jakarta-tomcat-5.x.xx.tar.gz /opt
- tar -zxvf jakarta-tomcat-5.x.xx.tar.gz
- A directory called jakarta-tomcat-5.5.xx will be created and the Tomcat files will expanded under it. You may want to create a symbolic link to a the /opt/tomcat directory for easier upgrades and configuration.
- ln -s jakarta-tomcat-5.5.25 tomcat
- In order for Tomcat to startup and shutdown, you will also need to add an environment variable pointing to the Tomcat directory (CATALINA_HOME), and one variable pointing to your Java SDK directory (JAVA_HOME). Insert the following lines inside /etc/profile or /root/.bashrc. Please make sure that you enter your operating system installation paths.
- export JAVA_HOME=/opt/jdk151
- export CATALINA_HOME=/opt/tomcat
- To Start tomcat
- $CATALINA_HOME/bin/startup.sh
- If Tomcat does not start and you downloaded the zip file, the cause is probably due to permissions. Ensure that the following files are executable : inside $CATALINA_HOME/bin directory,
- chmod +x startup.sh
- chmod +x shutdown.sh
- chmod +x tomcat.sh
- To Stop tomcat
- $CATALINA_HOME/bin/shutdown.sh
[edit] 6.2: Configure Tomcat application server
[edit] Prerequisites
- Apache Tomcat installed as above.
- A user name and password for the Tomcat Manager.
- For more information on configuring and administering Apache Tomcat 5.5, see the following documentation:Tomcat Setup
[edit] Instructions
- Activate Tomcat Manager
- Sample "tomcat-users.xml" file with a new user named "manager" and "manager" role associated with it (Note: it is strongly recommended that you use secure passwords in place of those listed below):
- <?xml version='1.0' encoding='utf-8'?>
- <tomcat-users>
- <role rolename="tomcat"/>
- <role rolename="role1"/>
- <role rolename="manager"/>
- <user username="tomcat" password="tomcat" roles="tomcat"/>
- <user username="role1" password="tomcat" roles="role1"/>
- <user username="manager" password="manager" roles="manager"/>
- </tomcat-users>
- Copy c:/pnet/v9.0.0/lib/mail.jar and c:/pnet/v9.0.0/lib/activation.jar to CATALINA_HOME/common/lib.
- Copy c:/pnet/v9.0.0/lib/jdbc/ojdbc14.jar to CATALINA_HOME/common/lib.
- Create the CATALINA_HOME/common/endorsed folder and copy serializer.jar, xalan.jar, xercesImpl.jar and xml-apis.jar from c:/pnet/v9.0.0/lib/endorsed/svn-root/trunk/core/lib/endorsed/.
[edit] 6.3 Patch pre-5.5.25 Tomcat with mail session classes
Versions of Tomcat before 5.5.25 have a known bug that they are missing the mail session classes. For Project.net to send email Tomcat versions older than 5.5.25 need to be patched.
[edit] Instructions
- Download the [attachment:'Tomcat 5.5.23 patch.jar' Tomcat patch file] attached to these instructions.
- Place a copy into TOMCAT_HOME/common/lib/ directory.
[edit] 6.4 Setting Java parameters
In order to ensure reliable service the Java virtual machine (JVM) will need to have its parameters tuned.
- The Xmx parameter controls the maximum heap size the JVM can address.
- For a development or test server -Xmx512m (512 MB) will be OK.
- For a production server, the value should be at least -Xmx1024m (1024 MB), but not more than 3/4 the amount of RAM installed in the system.
- On a 32-bit operating system it cannot exceed -Xmx2048m (2 GB)
- The Xss parameter controls the stack size for the JVM.
- Use -Xss128k for a 32-bit operating system.
- Use -Xss256k if the system has a 64-bit JVM, like HP-UX or IBM-AIX.
[edit] Instructions (Windows systems)
- If Tomcat is not running go to the "Apache Tomcat x.x" folder in the Start Menu and select "Configure Tomcat". This will open the Apache Tomcat Properties dialog.
- If Tomcat is running you will see an Apache Tomcat icon in the taskbar, generally near the clock. Double-click the icon to open the Apache Tomcat Properties dialog.
- In the dialog click on the Java tab.
- Add the following value to the Java Options section:
- -XX:MaxPermSize=384m
- -Djava.awt.headless=true
- Set the Initial Memory Pool to 256.
- Set the Maximum Memory Pool to the Xmx value chosen above.
- Set the Thread stack size to the Xss value chosen above.
- Click [OK]
- You will need to stop and start the Tomcat service if Tomcat is running. You can do this from the icon in the task bar.
[edit] Instructions (Linux systems)
Either:
- Look for the JAVA_OPTS variable in TOMCAT_HOME/conf/tomcat.conf (it may be named tomcat5.conf) and add these parameters:
- JAVA_OPTS="<any existing options> -Xms256m -Xmx<see above>m :-XX:MaxPermSize=384m -Xss<see above>k -Djava.awt.headless=true"
- Or add the following lines near the top of TOMCAT_HOME/bin/catalina.sh
- if [ -z "$JAVA_OPTS" ]
- then
- JAVA_OPTS="-Xms256m -Xmx<see above>m -XX:MaxPermSize=384m -Xss<see above>k :-Djava.awt.headless=true"
- else
- JAVA_OPTS=${JAVA_OPTS}" -Xms256m -Xmx<see above>m -XX:MaxPermSize=384m :-Xss<see above>k -Djava.awt.headless=true"
- fi
- Or set the the following system environment variable:
- JAVA_OPTS="-Xms256m -Xmx<see above>m -XX:MaxPermSize=384m -Xss<see above>k :-Djava.awt.headless=true"
[edit] 6.5 Configure Tomcat logging
[edit] Prerequisites
- Log4J (v1.2 or later) from http://logging.apache.org/log4j
- commons-logging.jar (not commons-logging-api.jar) from http://commons.apache.org/downloads/download_logging.cgi
[edit] Instructions
Turning on logging is an optional step but will come in handy when monitoring or troubleshooting your server; logging can be activated at any time, but it requires restarting Tomcat. Finally, the default level of logging is DEBUG, which is very verbose, you will want to change this to WARN or ERROR when creating the log4j.properties configuration file described below.
- Follow the four steps for configuring Logging in Tomcat http://tomcat.apache.org/tomcat-5.5-doc/logging.html.
[edit] 6.6 Configure Tomcat to automatically start on boot-up
The production configuration strategy is to have the Tomcat server run as a Windows service, while the Project.net application is managed and restarted by Tomcat. This will allow Project.net to automatically start when the host system boots up and automatically restart if it ever fails.
[edit] Instructions (Windows installations)
- Apache Tomcat is automatically configured as a Windows service when Tomcat is installed.
You should create windows service by running
- service.bat install
and set service auto start with Services control panel
[edit] Instructions (Linux installations)
- Create script /etc/init.d/tomcat with
- ! /bin/sh
- export JAVA_HOME=/usr/java/jdk1.5.0_05
- export TOMCAT_HOME=path_to_tomcat
- export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
- DAEMONSTART=$TOMCAT_HOME/bin/startup.sh
- DAEMONSTOP=$TOMCAT_HOME/bin/shutdown.sh
- set -e
- case "$1" in
- start)
- echo -n "Starting Tomcat... "
- $DAEMONSTART
- start)
- exit 0
- - create links to this file for all runlevels
Debian users may run
- update-rc.d tomcat start 91 2 3 4 5 . stop 20 0 1 6 .
[edit] Step 7: Deploy Project.net to Tomcat Server
[edit] Prerequisites
- Apache Tomcat installed as above.
- Administrator's (manager) password for Tomcat installation.
- Edit CATALINA_HOME/config/context.xml to configure the database connection pool and the connection to the SMTP mail server.
- <Context debug="5" reloadable="true" crossContext="true">
- <Resource name="jdbc/PnetDB" auth="Container"
- type="javax.sql.DataSource" username="pnet_user" password="<pnet_user password>"
- driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@<dns of db listener>:<listener port>:<db SID>"
- maxActive="125" maxIdle="25"/>
- <Resource name="mail/PnetSession" auth="Container"
- type="javax.mail.Session"
- mail.smtp.host="<SMTP host>"/>
- </Context>
- Start Tomcat
- Linux - CATALINA_HOME/bin/startup.sh
- Windows - use Service Manager to start the Tomcat service
[edit] Instructions (Manual Deployment)
- If you want to deploy application as ROOT, delete the existing CATALINA_HOME/webapps/ROOT folder since the Project.net application will be associated with the / URL and will be installed in this folder.
- Copy c:/pnet/v9.0.0/app/pnet.war to CATALINA HOME\webapps directory, this will install Project.net in the pnet context. To deploy as the default application, rename pnet.war to ROOT.war or, if you want to deploy the application as a different context, rename war file as <Your desired application name>.war.
- Start Tomcat, or restart it if it is running.
- Wait a minute, then log into !http://localhost:8080/<Your desired application name>/ OR http://localhost:8080/ ( if application is deployed as ROOT.war ) as appadmin.
[edit] Instructions (Using Tomcat Manager)
Project.net cannot be deployed as the default or Root application using the Tomcat Manager, since the Manager runs as the default application.
- Log into http://localhost:8080/manager/html/, use Username 'manager' and the password you defined in Step 6 (the default is 'manager').
- Browse WAR file to upload. If you want to deploy application as NON-ROOT context you can rename war file as <Your desired application name>.war.
- Log into !http://localhost:8080/<Your desired application name>/ as user appadmin.
[edit] Step 8: Update the appadmin user account
There is one application administrator account pre-defined for a Project.net installation, appadmin. For security reasons you should change some of the default settings for the appadmin account, such as password and email address, as described below. [wiki:UsingPnet-creatingAnAppAdmin Giving Application Administration capabilities to a user account] contains guidelines for using this account and tells how to create other administrator accounts.
[edit] Prerequisites
- You will need the following information for the built-in administrator's account
| Name | Description | Default |
| email address | Email address for the appadmin account. Used to recover the appadmin's | admin@project.net |
| Password | A secure password for the appadmin account | appadmin |
| Jog question | A question you will be asked if you forget your password and its answer |
[edit] Instructions
- Log into the Project.net server, http://localhost:8080, as appadmin user (default password: appadmin).
- From the Personal Workspace select Setup from the left-hand menu.
- Click Personal Profile.
- In the Name sub-tab enter the Primary Email Address:
- In the Login sub-tab
- a. Enter appadmin as the current user account and password.
- b. Check-mark Change Password and enter a new secure password.
- c. Check-mark Change Jog Question or Answer and enter a question and answer you will easily remember. If you need to recover the appadmin's password this question will be used to validate you.
- Click Submit
[edit] Step 9: Configure Project.net System Settings
Now that the server is up and running, you will need to configure some settings within Project.net. These are set through the Application Administration interface.
[edit] 9.1 Specify document vault storage
[edit] Instructions
- If not already logged into the Project.net server, log into http://localhost:8080, if application is deployed as the ROOT, or default, application otherwise log into http://localhost:8080/<Your desired application name>/, as appadmin user.
- From the Personal Workspace, click "Admin" at the top of the page next to the log out link to enter the Application Administration interface.
- Select Manage / Doc Vault from the menu ribbon.
- Enter a directory path for each of the three "Path to Repository Root" such as:
- c:\pnet-doc-vault\one
- c:\pnet-doc-vault\two
- c:\pnet-doc-vault\three
- Click [Update].
[edit] 9.2 Customize system settings
[edit] Prerequisites
- You should be logged into the Application Administration as above
- Note, if document upload or Microsoft Project import is failing, check the settings in this section.
[edit] Instructions
- Select Manage / Sys. Settings from the menu ribbon.
- Change the following variables:
- Variable: siteHost
- New Value: The external name of the Project.net website.BR
- Description: This variable defines the hostname and port number that Project.net uses when it constructs URLs containing the hostname and port of the web site. Typically used in email notifications, this variable should be set to the fully qualified name of your Project.net server.
- Example values: myserver.com, myserver.com:7001
- Variable: supportEmail
- New Value: Email address of support team.BR
- Description: Specifies the email address listed in the Help pages for support queries. It is also used if a user submits an automated error report within the application.
- Example value: support@project.net
- Variables: postDataTempDir and xmlImportTempDirectory
- New Value: File path to directory for tempoary file storageBR
- Description: : This value is used as a temporary storage when uploading files. Make sure that the Tomcat user has access to write in the specified directory.
- Example value: C:\temp or /opt/pnet/tmp
- [Submit] to accept your changes. They will not take effect until the server has been restarted from the Tomcat Management Console or the Windows Services Console.
[edit] 9.3 Create a configuration for your installation
Project.net contains many of its settings in configuration tokens; these tokens are stored in named configuration sets. For example, if you want your {{{company's}}} name and logo to appear on the Project.net login page, you would change the values of two specific tokens.
While you can alter the Project.net default configuration set, it is recommended that you create a configuration just for your installation. Project.net will first use the values from your configuration. Any values not set in your configuration will receive their values from the system default configuration. Using a separate configuration isolates your custom settings, making them more obvious. More importantly, alternate configurations are preserved whenever the Project.net software is upgraded, while the default configuration loses any changes.
Note, Project.net can have more than one active configuration. Which configuration is selected for a user is determined by the URL or IP address he or she used to access the Project.net server. For example, users accessing the server through projects.mycompany.com may see the results of the default configuration, while those using custom-projects.mycompany.com could see a site customized by an alternate configuration.
For more information see [wiki:Customizing Customizing and Branding Project.net]
[edit] 9.3.1 Modify the default configuration
You must change one token in the default configuration.
[edit] Instructions
- From within the Application Administration interface, chose Manage / Configurations.
- Click on Project.net Configuration from the list of configurations.
- Choose Tokens from the menu on the left.
- Enter defaulthost in the Token Name: search field and click the Filter button.
- Change the Project.net Default value of prm.global.brand.defaulthost to the external name of the Project.net website. Usually, this is the same as the siteHost variable above.
- Submit your changes. They will not take effect until the server has been restarted from the Tomcat Management Console or the Windows Services Console.
[edit] 9.3.2 Create a custom configuration
Follow these steps to create a installation-specific configuration
[edit] Instructions
- From within the Application Administration interface, chose Manage / Configurations.
- Click the [New] Toolbox action to create a new configuration.
- Enter:
- Name - Suggestion: use Standard Production Configuration or use the value used for the siteHost token.
- Description - Suggestion: include the siteHost value as part of the description.
- Abbreviation – This will be used as part of the token identifier.
- Choose the Default Language, you _must_ select a value.
- Select multiple Supported Languages by holding down the Control key while clicking the desired names. You can leave this as the default value.
- Supported Host Names (CSV) – The values in this field determine when this configuration set will be used. List the web site names you want associated with configuration, separated by commas. If you enter projects.mycompany.com, login.projects.mycompany.com either address will cause the values in this configuration set to be used, in conjunction with the values from the default configuration.
- Submit your changes to create the configuration set.
[edit] 9.3.3 Site-specific token values
Follow these steps to create a installation-specific configuration
[edit] Instructions
- From within the Application Administration interface, chose Manage / Configurations.
- Click on the name of the custom configuration from the list of configurations.
- Choose Tokens from the menu ribbon.
- Select Basic Branding from the Category list.
- Click Filter
- Set the appropriate values for the tokens below.
- If a token does not appear in the list you can enter its name in the Token Name: search field and click the Filter button to locate it.
- prm.global.brand.defaulthost: Same as the default configuration token
- prm.global.brand.defaulttimezone
- prm.project.login.login_header_text-1 (Login prompt)
- prm.global.default.email.fromaddress
- prm.global.help.feedback.emailaddress
- prm.global.help.info.emailaddress
- prm.global.help.legal.emailaddress
- prm.global.help.sales.emailaddress
- prm.global.help.support.emailaddress
- prm.base.errors.reportErrors.email
- Submit your changes.
- If you get an error message (Null Pointer Exception) when you submit your changes you forgot to select a default language for the configuration. Go back to the configuration's properties and edit them to set the Default Language.
For information on customizing Project.net with your company's text and images see [wiki:Customizing Customizing and Branding Project.net].
[edit] Step 10: Install the Master License Properties for your Server
All Project.net servers require Project.net Master Properties. Without these properties it is not possible to register as a user or log in except as the application administrator.
[edit] Prerequisites
- The document Installing Licensing Files.pdf from the [wiki:Downloads Downloads page] contains complete details. A brief summary of the license installation steps is listed below.
- The Master License Properties and License Key files for Open Source installations are available from the [wiki:Downloads Downloads page].
[edit] Instructions
- If not already logged into the Project.net server, log into http://localhost:8080 as appadmin user.
- From the Personal Workspace, click "Admin" at the top of the page next to the log-out link to enter the Application Administration interface.
- Select Manage / Licensing from the menu ribbon.
- Click on the Licensing Tasks sub-tab near the top of the screen.
- Click on Update License Properties.
- Follow the steps on the screen, pasting in the license properties from the license file you received from Project.net.
- Again, click on the light blue Licensing Tasks tab near the top of the screen.
- Click on Install a new license.
- Follow the steps on the screen, pasting in the license key from the license file you received from Project.net.
[edit] Step 11: Web server front-end integration
The final step is to link the Tomcat server to a web server. This is useful if you want Project.net to act as the default (Port 80) website on the system. Using Tomcat's built in web server to handle requests on Port 80 opens a security hole, therefore, you will need to use either Apache httpd web server or Microsoft IIS. The web server will handle the requests coming from the user and marshal the appropriate ones to the Tomcat server for processing by the Project.net application.
[edit] Prerequisites
- An Apache http (web) Server, version 2.2.6 (available from http://httpd.apache.org/download.cgi), installed an running on your system.
OR
- An IIS Web Server 5.0 or above (Recommended IIS 6.0)
[edit] Instructions (Apache installations)
[edit] Linux
- If running, stop the Apache server with apachectl -k stop
- Confirm the version of the Apache web server with the following command: apachectl -v
- Verify that the Apache server was built with the mod_so module. Run the command apachectl /httpd2 -l and look for mod_so.c in the results list. If you cannot find this module, you should reinstall or rebuild Apache.
- Edit /etc/httpd/conf/httpd.conf
- Make sure the following lines are uncommented:
- LoadModule proxy_module modules/mod_proxy.s
- LoadModule proxy_http_module modules/mod_proxy_http.so
- Add the following lines to the end of the file:
- Save the file and verify the configuration settings by executing the command apachectl /httpd2 -t. The command should display a 'Syntax OK' message.
- The integration is complete, re-start the Apache server with apachectl -k start.
- You should be able to reach the Project.net login screen just by using a browser to go to http://<hostname>
[edit] Windows
- If running, stop the Apache server.
- Confirm the version of the Apache web server with the following command: apache.exe -v
- Verify that the Apache server was built with the mod_so module. Run the command apache.exe/httpd2 -l and look for mod_so.c in the results list. If you cannot find this module, you should reinstall or rebuild Apache.
- Edit c:\Program Files\Apache Software Foundation\Apache 2.2\conf\httpd.conf
- Search for and uncomment the following lines by removing the '#' at the beginning of each line:
- (line 99) LoadModule proxy_module modules/mod_proxy.s
- (line 103) LoadModule proxy_http_module modules/mod_proxy_http.so
- Add the following lines to the end of the file:
- Verify the configuration settings by executing the command apache.exe/httpd2 -t. The command should display a 'Syntax OK' message.
- The integration is complete, re-start the Apache server.
[edit] Instructions (IIS installations)
[edit] Windows Only
# Configure the Connectors
- Download the appropriate connector and place it in its own directory and create the isapi_redirect-1.2.26.properties file. This can be downloaded from the following:
- http://tomcat.apache.org/download-connectors.cgi and choose the binary download version 1.2.26.
- Create a Directory under $CATALINA_HOME/connectors and place the isapi_redirect-1.2.26.dll and isapi_redirect-1.2.26.properties.Create the properties files. You have to modify them appropriately. Here is an example of isapi_redirect-1.2.26.properties file.
- This must be in a virtual directory with execute privileges
extension_uri=/jakarta/isapi_redirect-1.2.26.dll
- Full path to the log file for the ISAPI Redirector
log_file=C:\apache-tomcat-5.5.23\logs\connectors\isapi_redirect.log
- Log level (debug, info, warn, error or trace)
log_level=warn
- Full path to the workers.properties file
worker_file=C:\apache-tomcat-5.5.23\conf\workers.properties
- Full path to the uriworkermap.properties file
worker_mount_file=C:\apache-tomcat-5.5.23\conf\uriworkermap.properties
- Next we will add the worker.properties and uriworkermap.properties files to the $CATALINA_HOME/conf directory.
workers.properties
- Define 1 real worker using ajp13
- worker.list=worker1
- Set properties for worker1 (ajp13)
- worker.worker1.type=ajp13
- worker.worker1.host=localhost
- worker.worker1.port=8009
uriworkermap.properties
- /*=worker1 or if it is in NON ROOT location /pnet/*=worker1
2. Configure the Registries
Next we need to make registry entries.
- Start -> Run -> regedit
- Create a Reg Key in HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0
and Create the Following String Values
| Value Name | Value Data |
| extension_uri | /jakarta/isapi_redirect-1.2.26.dll |
| log_file | C:\apache-tomcat-5.5.23\logs\connectors\isapi.log |
| logLevel | debug (OR) info (OR) error |
| worker_file | C:\apache-tomcat-5.5.23\conf\workers.properties |
| worker_mount_file | C:\apache-tomcat-5.5.23\conf\uriworkermap.properties |
3.Configure IIS
- Start with the application pools and create a new application pool.
- Create a Web Service Extension called jakarta. Add to the Files list the connector dll file from the $CATALINA_HOME/connectors/ directory .Then set the service to allowed.
- Create new website for web application and be certain that you now specify the appropriate IP address for each site as well as Host headers if used.
- For website, create a virtual directory called jakarta. Point this virtual directory to the directory that holds the appropriate connector. (ex www.test4.project.net/jakarta would point to $CATALINA_HOME/connectors/)
- Under the Home directory select the home directory as C:\apache-tomcat-5.5.23\webapps\ROOT, select the configuration button and add the .jsp extension to each site once again pointing them to the appropriate connector dll.
- Also under the Home directory, make certain you select the appropriate Application Pool that you already created and give it Scripts and Executables permission.
- Now go to the ISAPI Filters tab and add a filter called jakarta. This also needs to point to your connector dll file.
- Now click Apply and OK, and restart the IIS service.
- After restarting the service, go back to the ISAPI Filters tab and make certain you see a green arrow. If you do not, recheck all of your settings.
- After Configured reboot the Machine Once
[edit] Step 12: Finished! Create Your First Users and Projects
That's it, your installation of Project.net is ready to go. Your next step is to create a regular user account for yourself by registering from the login page using the license key you installed above. With this user you can create businesses and projects, invite other users to those projects, and begin to explore the functionality of Project.net. Tutorials, training guides and documentation are available from the [wiki:UsingPnet Using Project.net] page.
[edit] Step 13: Improve Tomcat performance in a Linux environment (optional)
You may see this warning in the Tomcat logs:
- The Apache Tomcat Native library which allows optimal performance in production
environments was not found on the java.library.path
To resolve this warning you should use Apache Portable Runtime, which may improve Tomcat performance. Detailed instructions are available at [1].
[edit] Prerequisites
- Install package for Apache Portable Runtime from [2]
- As a rule, you should configure environment variable LD_LIBRARY_PATH with the path to Portable Runtime library files.
[edit] Instructions (Linux installations)
- Download Apache Portable Runtime installation package for your operating system and unpack in a directory.
- Check if everything is OK by executing:
- ldd /path_to_libs/libtcnative-1.so
- All dependencies should be ok.
- Add this variable to your environment:
- export LD_LIBRARY_PATH=/path_to_libs/native.lib/
- Now, start Tomcat.
If you still see a warning, then add the path to SSL to the LD_LIBRARY_PATH variable.
- Find locate SSL:
- whereis ssl
- Modify:
- export LD_LIBRARY_PATH=/path_to_libs/native.lib/:/path_to_ssl_libs
- Start Tomcat and check whether the warning does not appear.
- Also add LD_LIBRARY_PATH init to your Tomcat startup script.
If you still have problems, check official Tomcat documentation: [3]
[edit] More Help
- Administrator's Manual - Administrator's Manual contents
- Additional help is also available at the Project.net User Forum
