# Installation and Upgrade Guide

# Quickstart Overview

This chapter provides brief, high level instructions for the installation and upgrade of Analytics, and is intended to quickly guide experienced administrators through the installation or upgrade procedure.

This chapter is divided into two major sections:

- Installation. This section covers installing and configuring the Analytics components, scripting the database, and starting and verifying the installation. The organization of this section maps directly to detailed instructions in Chapter 4, "Installation".
- Upgrade. This section covers upgrading version of Analytics to the latest version. The organization of this section maps directly to detailed instructions in Chapter 5, "Upgrade".

## Installation

Before you install Analytics, ensure that you have completed pre-installation steps. For details, see Installation Prerequisites

### Installing Analytics Services

For more complete details on performing this task, see Installing Analytics Services.

To install Analytics Services:

1. Log in to the remote server host computer as the local administrator (on Windows) or a user with directory write privileges (on UNIX or Linux).
2. Copy the installer to the disk location from which you plan to launch it.
3. Launch the Analytics Installer.

- On a Windows host, the installer is ptanalytics_G5.exe (Corporate Portal 5.0) or ptanalytics_G6.exe (Foundation 6.0).
- On a UNIX or Linux host, the installer is ptanalytics_G5 (Corporate Portal 5.0) or ptanalytics_G6 (Foundation 6.0).

4. Choose to install the Analytics Services component.
5. After the installer has copied all files to the installation directory, click Done. The Analytics Configurator will launch; however, do not complete the configuration at this time.

### Configuring the Analytics Database

Perform one of the following procedures that is appropriate to your database platform:

- Creating and Setting Up a Microsoft SQL Server Database
- Creating and Setting Up an Oracle Database

#### Creating and Setting Up a Microsoft SQL Server Database

For more complete details on performing this task, see Creating and Setting Up a Microsoft SQL Server Database.

To create and set up a Microsoft SQL Server database:

1. Copy the scripts from <PT_HOME>\ptanalytics\2.0\sql\mssql to the database host computer.
2. Create the Analytics database user:

1. In Enterprise Manager: create a new Login, using the user name you provisioned when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
2. In the Authentication area, choose SQL Server Authentication and enter, then confirm, the corresponding password.

3. Create the Analytics database with the following properties:

- Create the database with the name you provisioned when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
- Configure the size of the database. The growth of the database is directly correlated to the number of events present in the system. Estimate 100 MB of growth per 1 million events. For details, see Administrator Guide for BEA AquaLogic Interaction Analytics.

4. Assign database rights for the Analytics database user:

1. Assign the Analytics database user to the public and db_owner database roles for the Analytics database.
2. In the properties of the Analytics database, grant all permissions to the Analytics database user.

5. Start the SQL Server Query Analyzer and use SQL Server Authentication to connect to the Analytics database as the Analytics database user.
6. Run the setup scripts for the database, located in the <PT_HOME>\ptanalytics\2.0\sql\mssql\ directory, in the following order (make sure that you are running the scripts on the Analytics database):

1. db_creation.sql
2. install_seeddata.sql

7. In SQL Service Query Analyzer, connect to the portal database as the portal database user.
8. Run the portal_security_service_install.sql setup script on the portal database, located in <PT_HOME>\ptanalytics\2.0\sql\mssql\
9. Close SQL Server Query Analyzer.

#### Creating and Setting Up an Oracle Database

For more complete details on performing this task, see Creating and Setting Up an Oracle Database.

To create and set up an Oracle database:

1. Copy the oracle directory from <PT_HOME>\ptanalytics\2.0\sql to the Analytics database's host computer.
2. Log on to the host computer for the Analytics database as owner of the Oracle system files.
3. Run the following scripts against your Oracle database as sysdba:

1. Determine the name of the SID that you will be using for this installation. If you changed the SID from the default when you installed the portal, you need to update create_analytics_tablespaces.sql to reflect the SID that you used, substituting all occurrences of the default SID name with your SID name. For Plumtree Corporate Portal 5.x, the default SID name is PLUM. For Plumtree Foundation 6.x, the default SID name is PLUM10.

If you are creating a new SID, configure AL32UTF8 as the database character set and AL16UTF16 as the national character set.

2. Run the script create_analytics_tablespaces.sql.
3. Run the script create_analytics_user.sql. For details on editing the script to use anything other than the default user and password, see Creating and Setting Up an Oracle Database.
4. Add the Oracle database user and password values into the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
5. Run the script create_analytics_user.sql.

4. Execute the following steps as the analytics user, which you just created. The scripts that you run are located in the oracle directory that you copied in Step 1.

1. Run the script create_analytics_schema.sql.
2. Run the script install_analytics_seeddata.sql.

5. As the ALI user that you created when you installed AquaLogic Interaction, run the script portal_security_service_install.sql on the portal database. The script is located in the oracle directory that you copied in Step 1.
6. Run your database's analysis tool on the portal database to increase the efficiency of the database.

### Configuring Analytics

For more complete details on performing this task, see Configuring Analytics

To configure Analytics:

1. Launch the Analytics Configurator:

- In Windows, choose Start | Programs | BEA | Analytics Configurator.
- On UNIX or Linux, open http://localhost:11944/configurator/ui/start.jsf in a web browser.

2. Complete the configuration pages using the values you decided on when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
3. An installer screen appears that summarizes your configuration. Review this screen and make changes, if necessary. Otherwise, click Update.

### Installing the Interaction Component

For more complete details on performing this task, see Installing the Interaction Component.

Install the Interaction component on all servers that host the portal. The installation instructions are the same for Windows, UNIX, and Linux hosts, with slight exceptions as noted.

Note: | The Interaction component is also known as the Plumtree Analytics Portal Component, or Analytics plug-in.

Note: | You must reinstall the Interaction component after each time you upgrade AquaLogic Interaction.

To install the Interaction component:

1. Log in to the portal host computer as the same user that installed AquaLogic Interaction.
2. If you are running on a Java application server, shut down the application server.
3. Launch the Analytics Installer.

- On a Windows host, the installer is ptanalytics_G5.exe (Corporate Portal 5.0) or ptanalytics_G6.exe (Foundation 6.0).
- On a UNIX or Linux host, the installer is ptanalytics_G5 (Corporate Portal 5.0) or ptanalytics_G6 (Foundation 6.0).

4. Choose to install the Interaction component.
5. Perform one of the following:

- If you are running on Java, restart the application server. Then redeploy your portal.war or portal.ear file to your portal application server.
- If you are running on IIS, restart IIS.

### Installing the Image Service Component

For more complete details on performing this task, see Installing the Image Service Component.

To install the Image Service component:

1. Log in to the Image Service host computer as the local administrator or the ALI user created during installation of AquaLogic Interaction.
2. Copy the installer to the disk location from which you plan to launch it.
3. Launch the Analytics Installer.

- On a Windows host, the installer is ptanalytics_G5.exe (Corporate Portal 5.0) or ptanalytics_G6.exe (Foundation 6.0).
- On a UNIX or Linux host, the installer is ptanalytics_G5 (Corporate Portal 5.0) or ptanalytics_G6 (Foundation 6.0).

4. Choose to install the Image Service component.

### Installing the Automation Service Component

For more complete details on performing this task, see Installing the Automation Service Component

To install the Automation Service component:

1. Log in to the Automation Service host computer as the local administrator or the ALI user created during the installation of AquaLogic Interaction.
2. Copy the installer to the disk location from which you plan to launch it.
3. Launch the Analytics Installer.

- On a Windows host, the installer is ptanalytics_G5.exe (Corporate Portal 5.0) or ptanalytics_G6.exe (Foundation 6.0).
- On a UNIX or Linux host, the installer is ptanalytics_G5 (Corporate Portal 5.0) or ptanalytics_G6 (Foundation 6.0).

4. Choose to install the Automation Service component.
5. Launch the Analytics Configurator:

- In Windows, choose Start | Programs | BEA | Analytics Configurator.
- On UNIX or Linux, open http://localhost:11944/configurator/ui/start.jsf in a web browser.

### Starting Analytics and Portal Services

For more complete details on performing this task, see Starting Analytics and Portal Services.

To start Analytics and portal services, perform one of the following:

- On Windows, ensure the BEA AquaLogic Interaction Analytics service has been started in the Windows Control Panel. Then ensure the BEA AquaLogic Interaction Analytics Collector service has been started.
- On UNIX and Linux, ensure the BEA AquaLogic Interaction Analytics service has been started by using the command <PT_HOME>/ptanalytics/2.0/bin/analyticsd.sh start. Then ensure the BEA AquaLogic Interaction Analytics Collector service has been started by using the command <PT_HOME>/ptanalytics/2.0/bin/collectord.sh start.

### Registering Analytics with the Portal

This section describes how to register the Analytics Console, remote server, web service, and portlet objects with a 6.x portal. For more complete details on performing this task, see Registering Analytics with the Portal.

To register the Analytics application, remote server, web services, and portlets with the portal, use the migration utility to import the migration package analytics6.pte.

For details on importing the migration package on a 5.x portal, see Administrator Guide for Plumtree Corporate Portal. The filename of the 5.x migration package is analytics5.pte.

### Adding Analytics Jobs to the Automation Service

This section describes how to add all Analytics jobs to the Automation Service. Once Analytics Jobs are added to the Automation Service, the Automation Service runs them automatically. For more complete details on performing this task, see Adding Analytics Jobs to the Automation Service

To add Analytics jobs to the Automation Service:

1. Log into the Administrator Portal.
2. In Administration, choose Automation Service.
3. Ensure that the Automation Service is online.
4. Under Edit Automation Services, click the name of the computer on which Analytics Jobs are installed.

The Register Folders window appears.

5. Click Add Folder.

The Add Job Folder window appears.

6. Expand the Analytics folder.
7. Select the Analytics Jobs folder.
8. Click OK to close the Register Folders window.
9. Click Finish.

The Automation Service runs the Analytics jobs. If other Automation Service jobs were in queue or running when you added the Analytics jobs to the Automation Service, the Automation Service runs the Analytics jobs after these other jobs have completed.

10. At an appropriate time, ensure that the Analytics jobs have completed successfully. If any Analytics jobs failed, schedule these jobs to run again.

## Upgrade

### Upgrade Paths

The following table summarizes the supported database upgrade paths for Analytics.

Table 3-1 Upgrade Paths
Upgrade Path | Upgrade References
--- | ---
1.2 to 2.0 | Follow the procedures in this chapter.
1.1 to 2.0 | Follow the procedures in this chapter.

### Upgrading Analytics

This section discusses:

- Upgrading Analytics from Version 1.2 to 2.0
- Upgrading Analytics from Version 1.1 to 2.0

#### Upgrading Analytics from Version 1.2 to 2.0

This section describes how to upgrade from Analytics 1.2 to Analytics 2.0.

To upgrade from Analytics 1.2 to Analytics 2.0:

1. Ensure that the Plumtree Analytics service is not running.
2. Ensure that the Plumtree Analytics Collector service is not running.
3. Delete the Analytics folder beneath the PT_HOME\common\container\tomcat\5.0.28\work directory.
4. Install Analytics Services. For details, see Installing Analytics Services. If you are choosing the same location as the existing software, accept the default installation directory location when prompted.

Note: | The script file sync.bat is deleted. The AnalyticsRunJobs.bat file is added, and is scheduled to run automatically as an Automation Service job.

5. Upgrade the Analytics database by running the upgrade_1.x_to_2.0.sql script: <PT_HOME>\ptanalytics\2.0\sql\<database>\upgrade_1.x_to_2.0.sql
6. Run the portal_security_service_install.sql setup script on the portal database. The script is located in <PT_HOME>\ptanalytics\2.0\sql\mssql\
7. Reconfigure Analytics by running the Analytics Configurator. For details, see Configuring Analytics
8. Partition the Analytics database tables by running the following script:

- AnalyticsPartition.bat (Windows): <PT_HOME>\ptanalytics\2.0\bin\AnalyticsPartition.bat
- AnalyticsPartition.sh (UNIX):
  <PT_HOME>/ptanalytics/2.0/bin/AnalyticsPartition.sh

9. (Oracle only) Run your database's analysis tool on both the portal and Analytics databases to increase the efficiency of the databases.
10. Install the Interaction component. For details, see Installing the Interaction Component
11. Install the Image Service component. For details, Installing the Image Service Component
12. Stop and restart the Analytics services. For details, see Starting Analytics and Portal Services.
13. Register the Analytics application, remote server, Web services, and portlets with the portal by importing the migration package. For details on performing this task on a 6.x portal, see Registering Analytics with the Portal. For details on importing the migration package on a 5.x portal, see Administrator Guide for Plumtree Corporate Portal.
14. Install the Automation Service component. For details, see Installing the Automation Service Component
15. Add Analytics jobs to the Automation Service. For details, see Adding Analytics Jobs to the Automation Service.

#### Upgrading Analytics from Version 1.1 to 2.0

This section describes how to upgrade from Analytics 1.1 to Analytics 2.0.

To upgrade from Analytics 1.1 to Analytics 2.0:

1. Ensure that the Plumtree Analytics service is not running.
2. Ensure that the Plumtree Analytics Collector service is not running.
3. Delete the Analytics folder beneath the PT_HOME\common\container\tomcat\5.0.28\work directory.
4. Install Analytics Services. For details, see Installing Analytics Services. If you are choosing the same location as the existing software, accept the default installation directory location when prompted.

Note: | The script file sync.bat is deleted. The AnalyticsRunJobs.bat file is added, and is scheduled to run automatically as an Automation Service job.

5. Upgrade the Analytics database by running the upgrade_1.x_to_2.0.sql script: <PT_HOME>\ptanalytics\2.0\sql\<database>\upgrade_1.x_to_2.0.sql
6. Run the portal_security_service_install.sql setup script on the portal database. The script is located in <PT_HOME>\ptanalytics\2.0\sql\mssql\
7. Reconfigure Analytics by running the Analytics Configurator. For details, see Configuring Analytics

Note: | When running the Analytics Configurator during the 1.1 to 2.0 upgrade, you must re-enter the API Service URL and the passwords for all databases.

8. Partition the Analytics database tables by running the following script:

- AnalyticsPartition.bat (Windows): <PT_HOME>\ptanalytics\2.0\bin\AnalyticsPartition.bat
- AnalyticsPartition.sh (UNIX/Linux):
  <PT_HOME>/ptanalytics/2.0/bin/AnalyticsPartition.sh

9. (Oracle only) Run your database's analysis tool on both the portal and Analytics databases to increase the efficiency of the databases.
10. Install the Interaction component. For details, see Installing the Interaction Component

Note: | Upon upgrading to Analytics 2.0 the port used to send event metrics from the portal server(s) to the Analytics Services server is modified to 31314. Ensure that this port is open between the portal server(s) and the Analytics Services server. For a list of other ports used by Analytics, see Ports Required by Analytics.

11. Install the Image Service component. For details, Installing the Image Service Component
12. Stop and restart the Analytics services. For details, see Starting Analytics and Portal Services.
13. Register the Analytics application, remote server, Web services, and portlets with the portal by importing the migration package. For details on performing this task on a 6.x portal, see Registering Analytics with the Portal. For details on importing the migration package on a 5.x portal, see Administrator Guide for Plumtree Corporate Portal.
14. Install the Automation Service component. For details, see Installing the Automation Service Component
15. Add Analytics jobs to the Automation Service. For details, see Adding Analytics Jobs to the Automation Service.