After attending a Training session on "Project management" Senior Management from our organization felt the severe need of some project management tool to facilitate the Project Management Principles for currently ongoing R&D projects to monitor and track its progress effectively.
So we initiated an effort to find such sophisticated tool and to deploy in our environment to cater the needs of the users .
After searching so many tools we finally came to know about Projct.Net (TM) . but unfortunately this tools licensing has become opensource to proprietary so we were unable to use it and I didn't found any proper documentation to install and configure its community open source tool .
So our team took an initiative to somehow find a way to install and configure this tools community opensource version (which was free to download but it was really difficult to configure & with full of bugs )& after burning multiple midnight's oil we were able to migrate it with higher version of licensed Oracle DB (Earlier it was using Oracle 10g ) [Update : After deployment we faced multiple issues like not receiving any notification mails due to compatibility issue , thus we discarded this project ! :( all my efforts were in vein in a second !! ]
I suffered a lot to find out the way to deploy it so i thought of putting this tutorial on public platform so that it will be beneficial if some one is going through similar tiring process .
I hope this guide will help you to install and configure projct.NET & similar huge projects which requires complex integration with multiple tools will be very easy now as I've put lots of efforts for making this document ....
Cheers !!! :)
Installing Project.net v9.2.9 on a Linux System with Oracle 10g/11g Express Edition
------------------------------------------------------------------------------------------------------------------------------------
This document guides an administrator through the process of installing Projct.net, version 9.2.*(Now v9.2.6), on a Tomcat 6.0 application server running on a Lin*x system. In addition to the application server, a Projct.net installation will also require: web server, database server (Oracle 10g / 11g), mail (SMTP) server, document vault (file server) and LDAP server (optional)
Projct.Net package version : v9.2.9 [Latest ]
Operating System :Cent OS 6.6 x64 Bit
Oracle Database Version : 11.2.0 (Express Edition )XE
Apache Tomcat Version : 6.0
JRE/JDK Version : JRE 1.6.0
username : appadmin
password : appadmin
CREDITS :
Guides & links collected from various sources :
Review checklist of requirements
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 /tmp/pnet, /var/tmp or /opt/pnet. These instructions will refer to this location throughout the steps.
Unzip the zip file from your download into the directory chosen above. Once unpacked, you will have /tmp/pnet/v9.2.0_OS directory.
*Install and configure the Oracle database server
Oracle deployment requirements :
Oracle Installation:
On Ubuntu :
Memory oracle :
u need to create 1 user named pnet with password with Web Gui on oracle 11g
and workspace name is pnet
run the pnetMaster script and check log file
#tail -f /tmp/pnet_logs.log
you might get an error
ORA-01017: invalid username/password; logon denied
then
go to script and change system and password to welcome : default password is manager
Must use david ghedini blog :
echo $ORACLE_HOME
Oracle Installation path for 11g :
/u01/app/oracle/product/11.2.0/xe
$ORACLE_SID
XE
stop database
SQL>SHUTDOWN IMMEDIATE
start database
SQL>STARTUP
to unlock the SYSTEM user
SQL> ALTER USER system ACCOUNT UNLOCK
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.
*Prerequisites
*Instructions
Install Oracle 10.2 Enterprise or Express Edition. / Oracle 11g Express Edition 11.2
*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.
*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.
*Instructions
After you have downloaded Oracle xe just run following commands as a root user and answer for some questions about admin passwords and Oracle starting at boot:
Install Oracle XE via RPM or DEB depending on your Linux distribution
Run "/etc/init.d/oracle-xe configure" to configure Oracle
Specify the HTTP port that will be used for Oracle Application Express [8080]:8080
Specify a port that will be used for the database listener [1521]:1521
Specify a password to be used for database accounts. Note that the same password will be used for SYS and SYSTEM. (* make sure you remember this password *)
Do you want Oracle Database 10g Express Edition / 11g Express Edition to be started on boot (y/n) [y]: y
Insert into /etc/profile
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_HOME
export ORACLE_SID=XE
export NLS_LANG=AMERICAN.AL32UTF8
export PATH=$PATH:$ORACLE_HOME/bin
Check TNS connect identifier with tnsping <database SID>.
Also, check that sqlplus system/<database admin password>@<database name> connects.
Configuration and creation of the Oracle database.
Change directory into the /tmp/pnet/v9.2.0_OS/database/create-scripts/versions/9.2.0/new/ directory.
Using the editor, edit the pnetMasterDBBuild.sh file. Set the environment variables in this script to be appropriate for your installation. Further instructions are available in the file.
To start the database installation, run the batch command pnetMasterDBBuild.sh from the database/create-scripts/versions/9.2.*/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.sh
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>
ex. sqlplus pnet/welcome@XE
*Install and Update Java Runtime Environment
*5.1: Install the Java 6.0 Runtime Environment
JAVA Installation :
java Home location :
java -cp lib/catalina.jar org.apache.catalina.util.ServerInfo
To Find Java Runtime location use :
echo $JAVA_HOME
update-alternatives --display java
alternatives --config java
/opt/jre1.7.0_71/bin/java
*Prerequisites
*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. After you downloaded the java JRE , extract it in some folder, for example in /opt/jvm
Insert the following lines inside /etc/profile
export JAVA_HOME=/opt/jvm/jre<jre_version>
export PATH=$PATH:$JAVA_HOME/bin
Save the change and do the following
source /etc/profile
*5.2: Update the Java Security for Strong Encryption
JCE6 Installation :
/lib/jce6/*.jar to jre/lib/security directory of the Java runtime location
*Prerequisites
*Instructions
Copy /tmp/pnet/v9.2.0_OS/lib/jce6/*.jar to the jre/lib/security directory of the Java runtime location.
cd /usr/lib/jvm/jre-1.7.0/lib/security -- > chmod 777 all .jar files
/usr/share/tomcat6/endorsed
*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.
*6.1: Install the Tomcat Application Server
Tomcat6 Installation :
*Prerequisites
*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/apache-tomcat-6.x.xx.tar.gz /opt
tar -zxvf apache-tomcat-6.x.xx.tar.gz
A directory called apache-tomcat-6.0.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 /opt/apache-tomcat-<tomcat-version> /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
*6.2: Configure Tomcat application server
*Prerequisites
*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 /tmp/pnet/v9.2.0_OS/lib/mail.jar and /tmp/pnet/v9.2.0_OS/lib/activation.jar to CATALINA_HOME/lib.
Copy /tmp/pnet/v9.2.0_OS/lib/jdbc/ojdbc14.jar to CATALINA_HOME/lib.
Create the CATALINA_HOME/endorsed folder and copy serializer.jar, xalan.jar, xercesImpl.jar and xml-apis.jar from /tmp/pnet/v9.2.0_OS/lib/endorsed.
Edit the tomcat/conf/server.xml
Change the port to 9090
Restart tomcat
*6.3 Setting Java parameters
In order to ensure reliable service the Java virtual machine (JVM) will need to have its parameters tuned.
*Instructions (Linux systems)
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
JAVA_OPTS="-server -Djava.awt.headless=true -Xms256m -Xmx<>m -XX:MaxPermSize=384m -Xss<>k"
*6.4 Configure Tomcat logging (Optional)
TOMCAT LOGGING
CATALINA_BASE ---- > /etc/tomcat6/
CATALINA_HOME= /usr/share/tomcat6/lib
*Prerequisites
*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.
-
*6.5 Configure Tomcat to automatically start on boot-up
The production configuration strategy is to have the Tomcat server run as a Lin*x 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.
This is an example of a tomcat6 init script for Linux:
#!/bin/sh
#
# Startup script for Tomcat 6.0, the Apache Servlet Engine
#
# chkconfig: - 80 20
# description: Tomcat 6
# processname: tomcat
# pidfile: /var/run/tomcat6.pid
# config:
#
# Source function library.
if [ -x /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
fi
# Get Tomcat config
# PID_FILE - must match CATALINA_PID in catalina.sh
PID_FILE=/opt/apache-tomcat/bin/startstop.pid
# Path to the tomcat launch script (direct don't use wrapper)
TOMCAT_SCRIPT=/opt/apache-tomcat/bin/catalina.sh
# Tomcat name
TOMCAT_PROG=tomcat
# SYSTEM lock file
SYSTEM_LOCK_FILE=/opt/apache-tomcat/bin/startstop.lock
# How long to wait for shutdowns
SHUTDOWN_WAIT=15
# if TOMCAT_USER is not set
if [ -z "$TOMCAT_USER" ]; then
TOMCAT_USER="pnet"
fi
# Since the daemon function will sandbox $tomcat
# no environment stuff should be defined here anymore.
RETVAL=0
# See how we were called.
start() {
echo -n "Starting $TOMCAT_PROG: "
if [ -f $SYSTEM_LOCK_FILE ] ; then
if [ -f $PID_FILE ]; then
read kpid < $PID_FILE
if checkpid $kpid 2>&1; then
echo "process allready running"
return -1
else
echo "lock file found but no process running for pid $kpid, continuing"
/bin/rm -f $SYSTEM_LOCK_FILE $PID_FILE
fi
fi
fi
export CATALINA_PID=$PID_FILE
if [ -x /etc/rc.d/init.d/functions ]; then
daemon --user $TOMCAT_USER $TOMCAT_SCRIPT start
else
su - $TOMCAT_USER -c "$TOMCAT_SCRIPT start"
fi
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch $SYSTEM_LOCK_FILE
return $RETVAL
}
stop() {
echo -n "Stopping $TOMCAT_PROG: "
if [ -f $SYSTEM_LOCK_FILE ] ; then
if [ -x /etc/rc.d/init.d/functions ]; then
daemon --user $TOMCAT_USER $TOMCAT_SCRIPT stop
else
su - $TOMCAT_USER -c "$TOMCAT_SCRIPT stop"
fi
RETVAL=$?
if [ $RETVAL = 0 ]; then
count=0;
if [ -f $PID_FILE ]; then
read kpid < $PID_FILE
let kwait=$SHUTDOWN_WAIT
until [ `ps --pid $kpid | grep -c $kpid` = '0' ] || [ $count -gt $kwait ]
do
echo "waiting for processes to exit";
sleep 1
let count=$count+1;
done
if [ $count -gt $kwait ]; then
echo "killing processes which didn't stop after $SHUTDOWN_WAIT seconds"
kill -9 $kpid
fi
fi
rm -f $SYSTEM_LOCK_FILE $PID_FILE
fi
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 2
start
;;
condrestart)
if [ -f $PID_FILE ] ; then
stop
start
fi
;;
*)
echo "Usage: $TOMCAT_PROG {start|stop|restart|condrestart}"
exit 1
esac
exit $RETVAL
The init script should be edited for your environment and should go into /etc/init.d/ (for almost all linux distribution) and then you should set it to start at boot using your distribution command (chkconfig, update-rc.d, rc-update, etc.) or manually create symbolic links in /etc/rc.X
*Install Apache ActiveMQ
On the application server:
The JAVA_HOME environment variable must be set to the directory where the Java runtime (JDK or JRE) is installed. If set, the following command should display the path to the Java runtime: echo $JAVA_HOME
The java binary from JAVA_HOME should be available in the PATH variable, you can check if it's set by running echo $PATH and look for the path to the $JAVA_HOME/bin directory. In case a wrong version of java is in the path (such as for example gcj) please remove it.
-
Extract the tarball in /opt or at a location of your choice
To install it as a service daemon follow these steps:
a. Go into the installation directory where you've unpacked the activemq tarball for example /opt/apache-activemq-5.3.2
b. In case you are running a 32 bit Linux installation edit the following files:
Change the ACTIVEMQ_HOME in <apache_activemq_install_dir>/bin/linux-x86-32/activemq to point to your <apache_activemq_install_dir>, for example ACTIVEMQ_HOME=/opt/apache-activemq-5.3.2
Change both set.default.ACTIVEMQ_HOME and set.default.ACTIVEMQ_BASE in <apache_activemq_install_dir>/bin/linux-x86-32/wrapper.conf to point to your <apache_activemq_install_dir>, for example set.default.ACTIVEMQ_HOME=/opt/apache-activemq-5.3.2 and set.default.ACTIVEMQ_BASE=/opt/apache-activemq-5.3.2
c. In case you are running a 64 bit Linux installation edit the following files:
Change the ACTIVEMQ_HOME in <apache_activemq_install_dir>/bin/linux-x86-64/activemq to point to your <apache_activemq_install_dir>, for example ACTIVEMQ_HOME=/opt/apache-activemq-5.3.2
Change both set.default.ACTIVEMQ_HOME and set.default.ACTIVEMQ_BASE in <apache_activemq_install_dir>/bin/linux-x86-64/wrapper.conf to point to your <apache_activemq_install_dir>, for example set.default.ACTIVEMQ_HOME=/opt/apache-activemq-5.3.2 and set.default_ACTIVEMQ_BASE=/opt/apache-activemq-5.3.2
d. Create a soft-link for the activemq daemon to your daemon init script directory:
If you are running on 32 bit Linux Installation: ln -s /<apache_activemq_install_dir>/bin/linux-x86-32/activemq /etc/init.d/activemq
If you are running on 64 bit Linux Installation: ln -s /<apache_activemq_install_dir>/bin/linux-x86-64/activemq /etc/init.d/activemq
e. Set the service to start automatically when the system boots up: chkconfig --add activemq
f. Startup the activemq using service activemq start
g. Check in the logs that activemq started successfully: tail /<apache_activemq_install_dir>/data/wrapper.log
h. You should have a message "INFO TransportConnector - Connector vm://localhost Started"
*Deploy Project.net to Tomcat Server
*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>"
ex. type="javax.sql.DataSource" username="pnet" password=" <welcome>"
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
Note:
*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 /tmp/pnet/v9.2.0_OS/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.
-
*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.
-
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.
-
*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 Apache httpd web server. 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.
*Prerequisites
*Instructions (Apache installations)
*Linux
Install and configure Apache2.2 httpd
Enable mod_proxy and mod_proxy_ajp
Integrate apache httpd to tomcat via ajp (add this in your configuration or your desired virtual host)
# tomcat integration
ProxyPreserveHost On
ProxyPass / ajp://<application server dns name>:8009/ min=5 ttl=120 keepalive=On ping=1
ProxyPassReverse / ajp://<application server dns name>:8009/
Restart Apache
Creating Document Vault :
created and chmod 777 the following directory /docvault/repo1 and /repo2 /repo3
SMTP Mail Server Configurations :
edited some setting in context.xml
smtp.cdac.in
port 587
MAIL CODE : http://community.project.net/svn/pnet-root/trunk/core/src/net/project/notification/
Configure LDAP :
Hostname List: cmj-dc3.cdacmumbai.in:389
Search Base DN: DC=cdacmumbai,DC=in
Object Limit Filter: (objectclass=person)
Login Name Attribute: sAMAccountName
Authenticate with this specific user:
User DN: CN=juhuAdmin,CN=Users
Profile Property Mapped to LDAP Attribute Attribute value number (Optional)
Email Address: mail
Name Prefix:
Configuring License :
License Key: 2-CTKWJ-4YCAD-MA2E3-UE786
Node ID:PUBLI-CPPL1-0
Once the servers are set up and the software installed, you must configure a few basic Project.net settings in order to use the application:
Update the application administrator user account
Configure Project.net System Settings
Install the Master License Properties for your Server
Setting up production Environment :
http://doc.project.net/9_1:Production_environment_on_Linux
Customising Project.Net
Inviting Members :
TROUBLESHOOTING :
Taking Database dump from 10 g to 11g :
http://www.dba-oracle.com/t_export_import_different_releases_of_oracle.htm
Project.Net Troubleshooting:
To find Directory in Linux :
find / -type d -name 'lib'
The above java errors solution was to copy some .jar files to the appropriate directory of pnet.war
i.e. # cp /usr/local/projectnet/lib/endorsed/*.jar /usr/share/tomcat6/webapps/ROOT/WEB-INF/lib/
sol :
For Oracle Database connection related Errors check values of Host field and try changing it with IP or hostname of machine in
file “listener.ora “& “ tnsnames.ora “
#locate .ora
above error i got while checking tail -f /tmp/pnet_logs.log while running pnetMastreBuild.sh script
Upgrade Version of project .net
Use following command in sql prompt after deploying pnetMasterBuildDB.sh script to update db
Before using this script make sure to shut down the tomcat server
version_update.sh pnet/welcome@XE 9.2.0 pnet_user welcome XE