Sei sulla pagina 1di 18

Quick Start Guide for Content Delivery Server

Table of Contents

1.Introduction

2.Prerequisites

3.Setting up From the Binary Package

4.Setting up From the Source Code

5. Obtaining the Source Code

6. Compiling the Source Code

7.Configuring and Deploying OpenCDS

8.Finishing the OpenCDS Deployment on Sun Java System Application


Server

9.Starting and Stopping OpenCDS

10.Loading Sample Data

Introduction

This document describes how to quickly set up Open Content Delivery Server
(OpenCDS). The document is intended for a technical audience with basic
knowledge of Sun Solaris operating system, Oracle database server, and
either Sun Java System Application Server or BEA WebLogic Server.
Instructions in this document assume that you are using the bash shell on the
Solaris platform. If you are using another platform, representation of the
environment variables and other adjustments to the commands given might
be required.

OpenCDS is available in the following formats:

*
Binary Package

Source Package

Source checked out of the Subversion (SVN) repository trunk, branch, or


tag.

If you have source code from the Source Package or checked out of the SVN
repository, you need to compile the source into binary first. If you have
source code, skip the section titled Setting up From the Binary Package. If
you have the Binary Package, skip the section title Setting up From the
Source Code.

Prerequisites

The following hardware and software are required for OpenCDS:

One of the following operating systems:

Solaris™ 9 Operating System (OS) on a SPARC® processor

Solaris 10 OS on a SPARC processor


o

Solaris 10 OS on an x86 platform[1][2]

Linux on a x86 or x64 platform, 2.4 or 2.6 kernel minimum[3]

Microsoft Windows 2000 and Microsoft Windows XP on a x86 or x64


platform[4]

Java™ 2 Standard Edition (J2SE) Java Development Kit (JDK™), version


1.4.2 (latest update)

One of the following application servers:

Sun Java System Application Server (SJSAS) 8.1 Enterprise Edition

BEA WebLogic Server 8.1 SP3[5]

One of the following database servers:

o
Oracle Database version 9.2i, Enterprise Edition

Oracle Database version 10g, Enterprise Edition or Personal Edition[6]

Setting up From the Binary Package

If you want to set up OpenCDS from the source code, skip this section.

Download the OpenCDS Binary Package and complete the following steps to
prepare the installation for deployment:

1.

Obtain the OpenCDS Binary Package zip file from


https://opencds.dev.java.net/pages/download

2.

When you unzip the OpenCDS Binary Package zip file, a temporary
directory is created that contains another zip file.

3.

Unzip the other zip file into the directory of your choice. This is referred to
as the OpenCDS home directory. For example,

unzip opencds-bin.zip -d /cds-home

4.
Export the environment variable CDS_HOME to be the absolute path of
the OpenCDS home directory. For example, in a bash shell on a UNIX system,
use:

export CDS_HOME=/cds-home

In a command prompt on a Windows system, use: [7]

set CDS_HOME=C:\cds-home

5.

Copy the sample configuration file to the configuration file of your choice,
for example, $CDS_HOME/cfg/my.cfg. Your file must have a .cfg file extension
and must exist in the $CDS_HOME/cfg directory.

For Sun Java System Application Server, copy


$CDS_HOME/cfg/sn_sample.cfg.

For WebLogic Server, copy $CDS_HOME/cfg/wl_sample.cfg.

6.

Edit $CDS_HOME/bin/init_env.sh on a UNIX system or %CDS_HOME


%\bin\init_env.bat on a Windows system to change the following properties:

For Sun Java System Application Server, set SUN_AS_HOME to point to


the application server installation directory. For example,
export SUN_AS_HOME=/opt/as81ee

For WebLogic Server, set BEA_HOME to the directory that contains


your license.bea file. For example,

export BEA_HOME=/opt/bea81

For WebLogic Server, set WL_HOME to the server directory that


contains the bin and lib directories. For example,

export WL_HOME=/opt/bea81/weblogic/server

Set JAVA_HOME to point to the JDK installation directory. For example,

export JAVA_HOME=/opt/j2sdk1.4.2_12

Set DEFAULT_CONFIG to the name of the configuration file you


created in Step 5.

Leave the DEFAULT_DEPL, DEFAULT_DB, and DEFAULT_SYS_USER


variables unchanged.

7.
Add $CDS_HOME/bin to the beginning of your PATH environment variable.
For example, in a bash shell on a UNIX system, use:

export PATH=$CDS_HOME/bin:$PATH

In a command prompt on a Windows system, use: [7]

set PATH=%CDS_HOME%\bin;%PATH%

8.

Download ojdbc14.jar from Oracle or grab the one that came with your
Oracle installation at $ORACLE_HOME/jdbc/lib/ojdbc14.jar and place it into the
$CDS_HOME/dist/cds/lib/external directory.

Your installation is now ready to be deployed.

Setting up From the Source Code

If you are working with a binary package and not the source code, skip this
section.

Obtaining the Source Code

Make a directory where you want the source code to exist. This is referred to
as your Base Directory. After you obtain the code, you will have the following
directories under your Base Directory:

trunk: The directory where the mainline development occurs.

*
dependencies: The directory where we keep all our third party libraries.
Read dependencies/external/readme.txt for a list of the third party libraries
used.

Use one of the following options for obtaining the source:

Obtain the latest version of the source code from the provided zip:

1.

Obtain the OpenCDS Source Package zip file

2.

Unzip the OpenCDS Source Package zip file into your Base Directory.
For example,

unzip opencds-src.zip -d /opencds-src

3.

cd into the opencds directory under your Base Directory to find the
trunk and dependencies subdirectories.

Check out a specific version (i.e., 5.0) of the source code from the
repository:

1.
Make sure the Subversion command line tool (svn) is in your path.

2.

cd into your Base Directory

3.

svn checkout trunk

4.

svn checkout dependencies

5.

Provide your java.net login and password to the svn command.

Check out the latest version of the source code from the repository:

1.

Make sure the svn binary is in your path.

2.

cd into your Base Directory

3.

svn checkout
4.

svn checkout

5.

Provide your java.net login and password to the svn command.

Compiling the Source Code

To compile OpenCDS source code, follow these steps:

1.

Export the environment variable CDS_HOME to be the absolute path of


the trunk directory. For example, in a bash shell on a UNIX system, use:

export CDS_HOME=/opencds-src/opencds/trunk

In a command prompt on a Windows system, use: [7]

set CDS_HOME=C:\opencds-src\opencds\trunk

2.

Export the environment variable CDS_TOOLS to be the absolute path of


the dependencies directory. For example, in a bash shell on a UNIX system,
use:

export CDS_TOOLS=/opencds-src/opencds/dependencies
In a command prompt on a Windows system, use: [7]

set CDS_TOOLS=C:\opencds-src\opencds\dependencies

3.

If you used Subversion to check out the source code from the repository,
run the $CDS_HOME/prepare.sh script on a UNIX system or the %CDS_HOME
%\prepare.bat script on a Windows system.

4.

Copy the sample configuration to the configuration file of your choice, for
example, $CDS_HOME/cfg/my.cfg. Your file must have a .cfg file extension
and must exist in the $CDS_HOME/cfg directory.

For Sun Java System Application Server, copy


$CDS_HOME/cfg/sn_sample.cfg.

For WebLogic Server, copy $CDS_HOME/cfg/wl_sample.cfg.

5.

Edit $CDS_HOME/bin/init_env.sh on a UNIX system or %CDS_HOME


%\bin\init_env.bat on a Windows system to change the following properties:

For Sun Java System Application Server, set SUN_AS_HOME to point to


the application server installation directory. For example,
export SUN_AS_HOME=/opt/as81ee

For WebLogic Server, set BEA_HOME to the directory that contains


your license.bea file. For example,

export BEA_HOME=/opt/bea81

For WebLogic Server, set WL_HOME to the server directory that


contains the bin and lib directories. For example,

export WL_HOME=/opt/bea81/weblogic/server

Set JAVA_HOME to point to J2SE JDK installation directory. For


example,

export JAVA_HOME=/opt/j2sdk1.4.2_12

Set DEFAULT_CONFIG to the name of the configuration file you


created in Step 4.

Leave the DEFAULT_DEPL, DEFAULT_DB, and DEFAULT_SYS_USER


variables unchanged.

6.
Add $CDS_HOME/bin and $CDS_HOME/tools to the beginning of your
PATH environment variable. For example, in a bash shell on a UNIX system,
use:

export PATH=$CDS_HOME/bin:$CDS_HOME/tools:$PATH

In a command prompt on a Windows system, use: [7]

set PATH=%CDS_HOME%\bin;%CDS_HOME%\tools;%PATH%

7.

Download ojdbc14.jar from Oracle or grab the one that came with your
Oracle installation at $ORACLE_HOME/jdbc/lib/ojdbc14.jar and place it into the
$CDS_TOOLS/external/oracle/lib directory.

8.

Execute cdst buildall to build OpenCDS.

JavaServer Pages™ (JSP™) are compiled at runtime. To compile all the JSP
files at build time, execute cdst builddist instead of cdst buildall.

The OpenCDS source is now compiled into binary and your installation is now
ready to deployed.

Configuring and Deploying OpenCDS

To configure and deploy OpenCDS, follow these steps:

1.
Edit the configuration file that you created from a sample configuration
file, for example, $CDS_HOME/cfg/my.cfg. This file contains the configuration
parameters for the deployment process. Make the following changes:

1.

If you plan to run the server on different port numbers, change


app.server.portnumber, app.server.ssl.port, and app.server.admin.port
(WebLogic only) to configure the server to listen on ports different from the
default values. If you are running on a UNIX system and are not a super user,
then the port number must have a value greater than 1024.

2.

The *.internal.uri, *.external.uri, and app.server.hostip (WebLogic


only) properties need to be changed to match your host name and port
number. You only need to change the host name and port number parts of
the values of these properties. For all of the properties that have the word
internal in their names, you can use localhost as the host name but we
recommend you use the IP address of the system to avoid issues where the
host name is not found. For the properties that have the word external in
their names, use your fully qualified domain name as the host name or use
the IP address of the system. For the port number, use the value you set for
the app.server.portnumber property.

2.

Execute cdsi deploy to deploy OpenCDS.

3.

Configure the database access for your server.

1.

Edit the $CDS_HOME/cfg/DBConf.xml file to change the values in the


Hostname, Port and SID tags.

2.
Edit the $CDS_HOME/cfg/DBSysUser.xml file and set the password for
the database system user.

4.

Execute cdsi db init to initialize the database.

Finishing the OpenCDS Deployment on Sun Java System Application Server

Skip this section if you are not installing OpenCDS with Sun Java System
Application Server.

To finish the deployment of the product, follow these steps to deploy


OpenCDS into the application server domain.

1.

cd into the $CDS_HOME/deployment/cds/sun/applications directory.

2.

Execute ./deploymq.sh server to deploy the Java Message Service (JMS)


broker. You can use the default values as suggested by the script, however,
make sure that the broker's port number is not occupied by any other
application. Also, make sure that the message queue binary and library
directories are correct. The default locations are usually correct. However, if
the broker installation complains that the MQ executables can not be found,
look for the $SUN_AS_HOME/appserver/config/asenv.conf file, find the
AS_IMQ_BIN and AS_IMQ_LIB properties, and use their values for this script.

3.
When the script finishes, the broker is automatically shut down. Start the
broker again. This is done so the application server does not attempt to
create a new broker instance on the same port. Execute ./broker.sh start to
start the broker.

Note

The JMS broker is required for OpenCDS to function properly. The broker
must be started by this command prior to starting OpenCDS. To shut down
the broker use the ./broker.sh stop command from
$CDS_HOME/deployment/cds/sun/applications directory.

4.

Execute ./deploy.sh create to deploy OpenCDS into the application server.


You can use all of the default values, but make sure the application server
console port is not occupied by any other application on the system.

Starting and Stopping OpenCDS

Now that you have configured and deployed OpenCDS, you need to know
how to start and stop the server. Execute cdse startserver to start OpenCDS.
Execute cdse stopserver to stop OpenCDS.

If you deployed OpenCDS onto the Sun Java System Application Server, the
Java Messaging Service (JMS) broker needs to be started and stopped
separately from OpenCDS. The broker control script is located in the
$CDS_HOME/deployment/cds/sun/applications directory and is called
broker.sh. Before starting OpenCDS, execute ./broker.sh start to start the JMS
broker. After stopping OpenCDS, execute ./broker.sh stop to stop the JMS
broker.

After the server starts, you can access it with your web browser using the
host name and the port number that you specified in your configuration file
(i.e., my.cfg). Use the following URLs to access each of the portals:

Index Page
Subscriber Device Portal

Subscriber Portal

Vending Manager

Catalog Manager

Developer Portal

The default login for Catalog Manager and Vending Manager portals are user
name admin and password admin. You are prompted to change the password
the first time you log in. To log in to the Developer Portal or Subscriber Portal,
you must first create an account. However, before creating accounts or
making any other modifications see the Loading Sample Data section.

Loading Sample Data

To quickly test drive all of the OpenCDS portals, you can load sample data
into the OpenCDS database. The sample data includes content, devices,
subscriber accounts, and a developer account. Load the sample data after
the database is initialized and OpenCDS has been started for the first time.
Do not load sample data if you have already added content, devices,
accounts, or made any other modifications to the database.

Execute cdsi sample_data to load the sample data. After loading the sample
data, the developer account rudy and subscriber accounts linda, stella and
alex are available. The passwords for all of four accounts is the same as the
user name.

[1] If using WebLogic application server, only 32bit x86 platform is supported.

[2] If an Oracle database instance is installed on a different system, then


Solaris 9 OS for x86 platforms is also supported

[3] Though OpenCDS does not require any specific version of Linux, most of
the software on which OpenCDS depends require RedHat Enterprise or SuSE
Enterprise versions of Linux.

[4] Currently, only WebLogic Server can be used with OpenCDS on Microsoft
Windows platforms.

[5] Only SP3 is supported. SP4 and higher are incompatible with OpenCDS.

[6] Personal Edition is only supported on a Microsoft Windows operating


system

[7] On Windows, you can also set environment variables from the System
option of the control panel.

Potrebbero piacerti anche