# Installation Guide

# Quickstart Overview

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

## Installation

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

### Installing Analytics

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

To install Analytics:

1. Back up the machine running Analytics using the tool of your choice.
2. 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).
3. Copy the installer to the disk location from which you plan to launch it.
4. Launch the Analytics Installer.

- On a Windows host, the installer is ALAnalytics_WLP_v2-1.exe.
- On a UNIX or Linux host, the installer is ALAnalytics_WLP_v2-1.

5. Complete the installation wizard pages according to the settings you planned when you completed the Analytics Installation Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
6. 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.

### Integrating Analytics with WebLogic Portal

To integrate Analytics with your WebLogic Portal, you must add Analytics-specific facets to both your enterprise application and your web application. For more complete details on performing these tasks, see Integrating Analytics with WebLogic Portal. This section discusses:

- Adding the Analytics Facet to your EAR Application
- Adding the Analytics Facet to your Web Application
- Configuring the Analytics Integration
- Deploying Analytics in your Production Domain

For more information about adding facets to your WebLogic Portal applications, see WebLogic Portal Development Guide.

#### Adding the Analytics Facet to your EAR Application

In the Package Explorer view, right-click the EAR project. Select the WebLogic Portal (Optional) facet. All the optional facets for WebLogic Portal are selected by default; you can de-select facets you do not need, but leave the Analytics facet selected.

#### Adding the Analytics Facet to your Web Application

In the Package Explorer view, right-click your web project. Select the WebLogic Portal (Optional) facet. All the optional facets for WebLogic Portal are selected by default; you can de-select facets you do not need, but leave the Analytics facet selected.

#### Configuring the Analytics Integration

To complete the Analytics integration within your development environment, edit the Analytics configuration file. To do this, you must know the following:

- The Analytics Administration URL
- The Analytics Reports URL
- The Open API Config host name and port number

To configure the Analytics integration, perform the following:

1. In the Merged Projects tab, copy the analytics-config.xml file to your Workspace.
2. Edit the analytics-config.xml file to match the configuration of the configuration of your Analytics environment.

#### Deploying Analytics In Your Production Domain

Use the WebLogic Server Console to add the Analytics library to your production domain and ensure it is deployed on every server within your cluster. You must deploy two libraries: `wlp-analytics-web-lib.war` and `wlp-analytics-app-lib.ear`

### Configuring the Analytics Database

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

- Creating and Setting Up the Analytics Database on Microsoft SQL Server 2000
- Creating and Setting Up the Analytics Database on Microsoft SQL Server 2005
- Creating and Setting Up the Analytics Database on Oracle

#### Creating and Setting Up the Analytics Database on Microsoft SQL Server 2000

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

To create and set up the Analytics database on Microsoft SQL Server 2000:

1. Copy the scripts from install_dir\ptanalytics\2.1\sql\mssql to the database host computer.
2. Create the Analytics database user:

1. Create the Analytics database user with the user name you provisioned when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
2. Configure the Analytics database user to use SQL Server Authentication.
3. Set the Analytics database user password to the password you designated when you completed the Analytics Installation and Configuration Worksheets document.

3. Create the Analytics database with the following properties:

- Create a 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.

4. Grant the Analytics database user the public and db_owner roles for the Analytics database.
5. On the Analytics database Properties | Permissions tab, grant the Analytics database user all permissions to the Analytics database.
6. Connect to the Analytics database as the Analytics database user.
7. Run the setup scripts for the database, located in the install_dir\ptanalytics\2.1\sql\mssql\ folder, in the following order (make sure that you are running the scripts on the Analytics database):

1. db_creation.sql
2. install_seeddata.sql

#### Creating and Setting Up the Analytics Database on Microsoft SQL Server 2005

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

To create and set up the Analytics database on Microsoft SQL Server 2005:

1. Copy the scripts from install_dir\ptanalytics\2.1\sql\mssql to the database host computer.
2. Create the Analytics database user:

1. Create the Analytics database user with the user name you provisioned when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
2. Configure the Analytics database user to use SQL Server Authentication.
3. Set the Analytics database user password to the password you designated when you completed the Analytics Installation and Configuration Worksheets document.

3. Create the Analytics database with the following properties:

- Create a 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.
- Change the default database for the Analytics database user to the Analytics database.

4. Grant the Analytics database user the db_owner role for the Analytics database.
5. Create the Analytics database schema. Specify the Analytics database user as the schema owner.
6. Grant the Analytics database user the sysadmin server role.
7. Connect to the Analytics database as the Analytics database user, using SQL Server Authentication.
8. Run the setup scripts for the database, located in the install_dir\ptanalytics\2.1\sql\mssql\ folder, in the following order (make sure that you are running the scripts on the Analytics database):

1. db_creation.sql
2. install_seeddata.sql

#### Creating and Setting Up the Analytics Database on Oracle

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

To create and set up the Analytics database on Oracle:

1. Copy the oracle directory from install_dir\ptanalytics\2.1\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. The default SID name is BEAS.

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 the Analytics Database on Oracle.
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.

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. 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.

### Registering Portal Events with Analytics

To register portal events, run the following from the command line on the portal host machine:

- PTANALYTICS_HOME\bin\AnalyticsLoadEvents.bat ..\settings\config\analytics-wlp-event-def.xml (Windows)
- PTANALYTICS_HOME/bin/AnalyticsLoadEvents.sh ../settings/config/analytics-wlp-event-def.xml (UNIX/Linux)

### 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 AL Analytics service has been started in the Windows Control Panel. Then ensure the BEA AL Analytics Collector service has been started.
- On UNIX and Linux, ensure the BEA AL Analytics service has been started by using the command: install_dir/ptanalytics/2.1/bin/analyticsd.sh start. Then ensure the BEA AL Analytics Collector service has been started by using the command: install_dir/ptanalytics/2.1/bin/collectord.sh start.