Sunday, September 18, 2011

Installing Oracle Primavera 8.1 Enterprise: Simplified Start to Finish

Installing Oracle Primavera P6 8.1 Enterprise:  Simplified Start to Finish

The instructions from Oracle are perfectly sufficient for installing P6.  However, the instructions cover a wide variety of choices and contingencies.  With so many branches to follow, I thought I would make one post that walks through setting up P6 limited to the following assumptions:

- OS is Windows 7 Enterprise
- CPU is 64 bit
- Database is Oracle 11g XE
- JRockit is the java version]
- Weblogic Admin and P6 are both on the same machine

Here are the steps to go through:

Install Java
Install WebLogic
Install Database
Configure P6 on Weblogic
Conclusion

create Weblogic domain
copy ear, war
configure startweblogic.cmd...


Install Java V23714-01
Java-: JRockit! jdk1.6.0.20_R28.1.0-4.0.1  64 bit...
Java JRockit for JDK R28.1 for java SE6 with JRMC 4.0.1
D:\apps\java\Jrockit
No Demos, no source code
Public JRE?   Yes ( Note- this did not set java_home)
D:\apps\java\jrockit_jre

Restart - see if java_home is set
Nope - so set it manually to:

>java_home="D:\apps\Java\jrockit_jre"


>D:\apps>java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Oracle JRockit(R) (build R28.1.0-123-138454-1.6.0_20-20101014-1351-windows-x86_64, compiled mode)

Install Weblogic  V24338-01
We set up Weblogic entirely on its own, with no alterations or changes due to the fact that Weblogic will be hosting P6.

Using the “Generic” version since this is a x64 machine.
Since java is installed (see above) simply double click on the single file that comes in V24338-01:  wls1034_generic.jar


Create new Middleware home:  D:\apps\Oracle\Middleware
Decline that I wish to receive security updates from Oracle Support
yes yes, I wish to remain uninformed an ignorant (it’s really naggy about this...)
Choose “Typical”  install.  Probably far more than I need.  Choosing Custom will show you the defaults that Typical includes.


Next conundrum:  choose the JDK....
Note that in order to choose the JDK, you MUST have JAVA_HOME set:

$set java_home
java_home="D:\apps\Java\jrockit"

Browse to that location and choose the jrockit folder:


Next let the weblogic and coherence folders default to below the initial middleware folder you chose.


The last screen shows a summary of what the installation will do, before it actually does anything.  This is the point to stop if you’re not sure whether you followed the steps correctly.

This will take 651MB, and I am not 100% sure that all of these defaults are needed.  But rather than miss something, I accept them all.  Now the install begins.


After a few minutes it is complete.





After completion, you will get this screen.

The following will appear in your start menu:
We will get back to these items when we start to deploy.


Install Database V26259-01
Next, install the database.  Keep in mind that the P6 installers will not install a database server for you.  You must instead install the system separately, whether using Oracle or Sql Server.  For this walkthrough, we will be using Oracle 11g XE, which you can obtain from:

http://www.oracle.com/technetwork/database/express-edition/downloads/index.html

This is a lightweight version of the Oracle database which is good for stand-alone and demonstration purposes, but not recommended if you are installing on a production system.

Please note that here we are skipping a few steps!  First install your database system.  it must exist, and you must be able to connect to it before proceeding.  For Oracle you will need the following information:
  • Server Name or IP address
  • Port the server is running on (1521 by default)
  • User  account which has rights to create a database
  • Password for that account

The following article is a bit dated, but explains how to check your connections:
http://it.toolbox.com/blogs/daniel-at-work/checking-connection-to-oracle-database-22609
There are also many other resources online showing how to configure and test your Oracle database server.


Run dbSetup.bat

Choose Install a new database and Oracle.

Set the user ID and password for a user that has rights to create databases.  Set the server name and port (1521 is the Oracle default), and the database instance name.  In this case you can see we are using an XE database.





Next accept the default tablespaces.  Since this is a simple setup, default is fine.

The next screen shows where the data files will go.

Press Create and your database will be created.
Once the Tablespaces are created, press Next, and you will get the screen where you must enter passwords for the database schemas.

This is where it gets very very frustrating.  You must enter each password perfectly, each pair must match before the “Next” button will be enabled.  If you make a mistake, it is virtually impossible to know which pair does not match.
Also, you can easily erase a User Name by tabbing and typing into the wrong cell.  If you make a mistake, go to Previous.  If you accidentally hit cancel, as I have done too many times to repeat, run dbSetup again, but accept the existing tablespaces, since they were already created.

Now you are on the final screen.  Set a password the admin account.  This is a P6 account, not a database account.  You can also specify the currency to use and whether to include demo data.  Since this article is for illustrative purposes, we will include the demo data.

Loading the data can take a few minutes, 2-5 on my system.

Once this finished press “Exit” to complete.

Install the Actual P6 Application: V26729-01
Now we have the preliminaries down:  Java, Weblogic, and the Database.
This is why I say that it’s daunting each time I install P6.  I wish I could just download everything, click in an installer, and have it go through all of these steps.  Maybe one day.
Unzip V26729-01 and it will create a folder called P6_R81, find and click on the setup program:
..\P6_R81\win\Disk1\install\setup.exe

Issues: Running setup.exe on Windows 7.  Get UAC message, then it stops with no message.  
Solution: Path was too long.  
This failed:
D:\Downloads\Oracle\Primavera\P6\P681EPPM2012-11-Jan\P6_R81\win\Disk1\install
This worked:
D:\Downloads\Oracle\Primavera\P6\Disk1\install


This starts the standard Oracle Universal Installer (OUI).

I will put my P6 home in D:\apps\Oracle\P681Ent\P6WebAccess
Next...
Next...

Java Home Directory should come from JAVA_HOME, and thus default to the value entered earlier.

Now it is ready to go.


Installation begins.  Note the location of the log file, which can be helpful if something goes wrong.

Next you will be prompted to make the database connection.

Now enter the password for the pubuser account you created when creating the database, as well as the rest of the connection information.

After sucessful connection, you are brought back to the OUI, which should tell you that the setup was successful.


If you are on Windows 7, you may get a message stating that the application may not have installed correctly.  Simply ignore this.

Configure P6 in Weblogic (create domain)
Now we get to the final part of our simple install walkthrough.  The pieces are in place, we just need to show Weblogic how to host P6.
Create a Weblogic Domain
Under the Start menu, find Oracle WebLogic->WebLogic Server 11gR1->Tools->Configuration Wizard

Welcome: Create a new WebLogic domain

On the next screen, accept all of the default selections

On the next screen, set the name for your P6 install.  Do not use “base_domain” which is the default value.  Here we are simply putting “p6”.  The domain location will come from the Middleware location you set when installing WebLogic.

Set a password for the weblogic account. You could choose a different account name here, but for simplicity, we keep weblogic.

Choose “Production Mode”, and accept the default JDK.

On the next screen choose the first two options

The next screen lets you set up the Administration server in Weblogic.  At this point you might want to check the ports on your machine, and check is 7001 is open.  Run the following command:

> netstat -anp TCP

Check to see if there are any entries with Local Address ending in 7001.  If there are, either stop and remove them, or choose another port for P6.


The next screen is “Configure managed Servers”.  Click Add and enter a name for the server.

Skip through the next screen: “Configure Clusters”

On “Configure Machines” Add your machine.  This is a simple demo, so this is the same name as the machine we are installing on.

The next window lets you assign machines to host the two weblogic applications.  Simply move them both under your machine name.


A summary screen appears, showing the proposed setup.  Click Create to make it happen!

The setup finished in a matter of seconds.  Once it is done, click “Start Admin Server” in the “Creating Domain” window. And then press Done.

The weblogic server will now start in a terminal window.  It will prompt for the user name and password that you entered earlier.  Enter this and press Enter.

Weblogic is now starting, and can take a minute or two to begin.

Now - here is one point where this tutorial greatly diverges with the standard instructions.  We proceed straight to the next part of setting up P6, ignoring all the managed cluster options that distract.

Open up FireFix or IE and browse to http://localhost:7001/console/
You will be greeted with the Weblogic login page.

Enter the same user name and password you just used to start weblogic.

We are now going to make changes to Weblogic, and since we are in production mode, must first Lock and Edit the sytstem.

In the panel labeled “Domain Structure”, click on p6->Environment->Servers
Click on the server, which in our case is “bombur_p6”

A screen with many tabs appears.  Open the tab called “Server Start”.  Scroll down to find the Arguments box and enter key -Dprimavera.bootstrap.home=<folder>
where <folder> is the place you entered when installing P6.
Add another argument to tell JRockit to allocate more than the default memory for P6.  If you do not do this you could get “Out of Memory” exceptions.
-Djavax.xml.stream.XMLInputFactory=weblogic.xml.stax.XMLStreamInputFactory -Xms2048m -Xmx2048m

Here is the actual text:
Arguments:
-Dprimavera.bootstrap.home=D:\apps\Oracle\P681Ent -Djavax.xml.stream.XMLInputFactory=weblogic.xml.stax.XMLStreamInputFactory -Xms2048m -Xmx2048m
Go back to the top of this screen and press “Save”.  Then in Change Center, click “Activate Changes”

In the Domain Servers pane, choose P6->Environment->Servers
Go to the Control Panel under Summary of Servers (we have been using the “Configuration” panel thus far).  Choose the server, and press “Start”
Now I run into the first main snag.  Node Manager issues


Aha - node manager was not running....need to start this from the Start menu as well


Now we need to install P6 as an application in Weblogic under the P6 domain.

Lock and Edit
Domain Strucure->Deployments
Click Install

Browse to the P6 home directory.  In our case it is: D:\apps\Oracle\P681Ent
Choose the file p6.ear
Click Next. Click on “Install this deploymen as an applicaton”

In the next screen you select the server to run the P6 application.  It’s “bombur_p6” of course - what we’ve been waiting for!

Hit next, and then Next on the next screen as well.  Examine the summary and click Finish.

The next screen shows “settings for P6”.  press “Save”, and the “Activate Changes”


Domain structure->Deployments.  Choose P6, Start->Servicing all requests.  Then press yes.
(if you do this too quickly the Deployment may not have finished deploying yet.  wait a minute)

Next browse to:

http://localhost:7003/p6

Hold onto your horses as your machine’s starts to run P6!


Beautiful isn’t it?
Log in with the credentials that you entered when running the P6 installer.

But this is where we stop.  The entire goal was to get P6 up and running, and here it is.


Conclusion
In this post we have walked through the steps needed to install P6 8.1 Enterprise onto a Windows 7 x64 machine using an Oracle 11g database and the JRockit runtime.

Please let me know if you have questions or comments on this article.  Especially let me know if you see an error.  I wrote this in one go over several hours as I downloaded the installers and ran them, so could easily have missed something.

No comments :