 -------------------------
 Installation Overview
 -------------------------

 Installing the SM is an automated process. It consists of executing an 
 installation script residing on the root of the SM distribution files 
 supplied by Cisco.

 	
 Note: 	For Solaris the procedure also requires modifying the /etc/system 
        file. This can be done manually or by using some other automated 
	utility.
 	
 Note:	For Linux the the procedure also requires modifying the 
        /etc/sysctl.conf file. This can be done manually or by using some 
	other automated utility.


 The installation procedure installs the following components:

     *	SM and Command-Line Utilities (CLU)
     *	TimesTen database and DSN
     *	Java Runtime Environment (JRE)
     *	SM Veritas Cluster Agents

 The installation procedure also includes:

     *	Setting up a pcube user and group
     *	Adding startup and shutdown scripts
     *  System configuration for TimesTen 
        (performed manually or using a script)
     *	Replication scheme setting (performed by running a CLU). 
        (Relevant only for cluster setups).

 After completing installation and configuration, you can use the SM to 
 introduce subscribers to the system.
 
 --------------------
 Typical Installation
 --------------------

There are nine steps for the installation, which are further described
in the following sections:

Step 1	Extracting the distribution files.
Step 2	Determining the system memory settings.
Step 3	Configuring the shared memory settings.
Step 4	Editing the install-def.cfg file containing optional installation 
	configuration parameters.
Step 5	Executing the install-sm.sh script. The root user must invoke this 
	script.
Step 6	Setting a password for the user pcube.
Step 7	Rebooting the computer.
Step 8	Installing the SCA BB package and Login Event Generators
Step 9	Adding a user for PRPC authentication


 	
Note: In a high availability setup, you must install the SM Cluster VCS 
      agents. For more information see "Installing SM Cluster Agents" section 
      in the SCMS-SM User Manual.

-----------------------------------------
Step 1: Extracting the Distribution Files
-----------------------------------------
Before you can install the SM, you must first load and extract the 
distribution files on the installed machine or in a directory that is 
mounted to the installed machine.

To extract the distribution files:

Step 1	Download the distribution files from the Cisco web site.
Step 2	Use FTP to load the distribution files to the SM.
Step 3	Unzip the files using the following command:
	gunzip SM_dist_<version>_B<build number>.tar.gz
Step 4	Extract the tar the file using the following command:
	tar -xvf SM_dist_<version>_B<build number>.tar


----------------------------------------------
Step 2: Determining the System Memory Settings
----------------------------------------------

Without Quota Manager
---------------------

Set the system memory configuration requirements according to the 
maximum number of subscribers. 

The following tables list the recommended memory configuration values 
based on the number of supported subscribers. The settings apply when 
the Quota Manager is disabled.

Memory Configuration Parameters Versus Number of Subscribers
        
---------------------------------------------------------
Maximum Number 	| TimesTen Memory Settings	
of Subscribers 	| Shared Memory |PermSize 	|TempSize
---------------------------------------------------------
100,000		|512 MB		|200 MB		|100 MB
500,000		|1024 MB	|512 MB		|256 MB
1,000,000	|1280 MB	|768 MB		|256 MB
2,000,000	|2048 MB	|1536 MB	|256 MB
3,000,000	|2560 MB	|2048 MB	|256 MB
4,000,000	|3328 MB	|2816 MB	|256 MB
5,000,000	|3840 MB	|3328 MB	|256 MB
10,000,000	|6912 MB	|6400 MB	|256 MB
15,000,000	|9984 MB	|9472 MB	|256 MB
20,000,000	|13312 MB	|12800 MB	|256 MB
---------------------------------------------------------

SM Process Memory Setting Versus Cache Size

Cache Size 	|SM Process Memory Setting
------------------------------------------
100,000 	|256 MB
500,000		|512 MB
1,000,000	|768 MB
2,000,000	|1280 MB
3,000,000	|1792 MB
4,000,000	|2048 MB
5,000,000	|2560 MB
10,000,000	|5120 MB
15,000,000	|7680 MB
20,000,000	|10240 MB

 	
Note: The SM process RAM in the table is calculated for:

- 40 SCE connections per SM
- For each additional SCE you should add an additional 25 MB 
  for the SM process memory setting.
- 20 PRPC (SM API/CNR LEG) connections to the SM-For each additional 
  connection you should add an additional 25 MB for the SM process memory 
  setting.
- If you use the virtual-links ability of the service control solution 
  you should add an additional 60 MB to the Perm Size setting for each 
  additional 100,000 subscribers.
  
Description of the table columns:
--------------------------------
1) Maximum Number of Subscribers-The maximum number of subscribers that the 
   SM has to support. For additional information about the maximum number of 
   subscribers configuration, see Configuring the Maximum Number of 
   Subscribers.
2) Cache Size-The number of subscriber record references the SM process 
   maintains. The default value is 100000 records.
3) SM Process Memory Setting-The required memory configuration for the SM 
   process itself. For additional information about the SM process memory 
   configuration, see "Configuring the SM Process Memory Settings" section 
   in the XXX.
4) The configuration required for TimesTen to run correctly. For additional 
   information, see "Configuring the System for TimesTen" described
   in Step 3.

If the previous table does not list the maximum number of subscribers 
that you require, use the settings specified for the next higher value 
of Maximum Number of Subscribers. For example, for 1,200,000 subscribers, 
use the values specified for 2,000,000 subscribers.

With Quota Manager
------------------
The following table lists the recommended memory configuration values based on 
the number of supported subscribers. The settings apply when the Quota Manager 
is enabled.

RAM and Memory Configuration Parameters Versus Number of Subscribers

---------------------------------------------------------
Maximum Number  | TimesTen Memory Settings 
Number	        | Shared Memory	|PermSize 	|TempSize
---------------------------------------------------------
500,000	        |1280 MB       	|768 MB		|256 MB
1,000,000       |1792 MB	|1280 MB	|256 MB
2,000,000	|3072 MB	|2560 MB	|256 MB
3,000,000	|4096 MB	|3584 MB	|256 MB
4,000,000	|5376 MB	|4864 MB	|256 MB
5,000,000	|6400 MB	|5888 MB	|256 MB
10,000,000	|12032 MB	|11520 MB	|256 MB
15,000,000	|17664 MB	|17152 MB	|256 MB
20,000,000	|23552 MB	|23040 MB	|256 MB

SM Process Memory Setting Versus Cache Size

-----------------------------------------
Cache Size 	|SM Process Memory Setting
-----------------------------------------
100,000 	|512 MB
500,000		|512 MB
1,000,000       |768 MB
2,000,000	|1280 MB
3,000,000	|1792 MB
4,000,000	|2048 MB
5,000,000	|2560 MB
10,000,000	|5120 MB
15,000,000	|7680 MB
20,000,000	|10240 MB

 	
Note	The SM process RAM in the table is calculated for:
- 20 SCE connections per SM-For each additional SCE you should add 
  an additional 50 MB for the SM process memory setting.
- 20 PRPC (SM API/CNR LEG) connections to the SM-For each additional 
  connection you should add an additional 25 MB for the SM process 
  memory setting.
- If you use the virtual-links ability of the service control solution 
  you should add an additional 60 MB to the Perm Size setting for each 
  additional 100,000 subscribers.

----------------------------------------------
Step 3: Configuring the Shared Memory Settings
----------------------------------------------

Configuring the System for TimesTen
-----------------------------------
TimesTen requires that certain changes be made in the system kernel 
configuration file (/etc/system in Solaris and /etc/sysctl.conf in Linux). 
These changes increase the shared memory and semaphore resources on the 
Solaris machine from their defaults. For additional information regarding 
these changes, refer to the TimesTen documentation.

 	
Configuring the System Kernel Configuration File
------------------------------------------------
TimesTen requires that certain changes be made in the operating system 
kernel configuration file:
* For Solaris, modify file /etc/system. 
* For Linux, modify file /etc/sysctl.conf. 

These changes increase the shared memory and semaphore resources on the 
machine from their defaults. 

Making the changes automatically:
--------------------------------
 	
Note: It is recommended that you review the system configuration file 
      before running the tt-sysconf.sh script, because the script overwrites 
      the current file settings with the values listed in the 
      "Making the changes manually" procedure. If you want to keep some or 
      all of the current file settings, edit the configuration file by 
      performing the changes manually.
      
To make the required changes automatically, run the tt-sysconf.sh script file. 
The root user must invoke this script file, without arguments, as follows:
# tt-sysconf.sh

Making the changes manually:
----------------------------

Editing the configuration file manually is required when you require support 
for more than 100,000 subscribers in the SM. Your system's sizing requirements 
only affect the shared memory size. To determine the correct configuration 
values for your system, see the table in Determining the System Memory 
Settings (Step 2).

For Solaris, make the required changes manually by adding the following lines 
to the /etc/system file and configuring the shared memory size:

*---- Begin settings for TimesTen
set semsys:seminfo_semmni = 20
set semsys:seminfo_semmsl = 100
set semsys:seminfo_semmns = 2000
set semsys:seminfo_semmnu = 2000
set shmsys:shminfo_shmmax = 0x20000000
*---- End of settings for TimesTen


For Linux, make the required changes manually by adding the following lines
 to the /etc/sysctl.conf file and configuring the shared memory size:

*---- Begin settings for TimesTen
kernel.shmmax = 536870912
kernel.sem = "SEMMSL_250 SEMMNS_32000 SEMOPM_100 SEMMNI_100
*---- End of settings for TimesTen

----------------------------------------
Step 4: Editing the install-def.cfg File
----------------------------------------
 	
Note: This step is optional when performing the SM installation. 
      However, it is recommended to edit the file if one of the 
      parameter values should not be set to the default value.
      
The install-def.cfg file contains several parameters that can be 
preconfigured before installation/upgrade of the SM. These parameters are 
copied by the 
install/upgrade routine to the relevant SM configuration files. By default, 
all of the parameters are commented out and the default values are used. 

The file contains the following parameters:
1) max_subscribers_num - Resides in the [SM Definitions] section. Defines the 
   maximum number of subscribers the SM supports. You can set the maximum 
   number of subscribers using this parameter or by setting the 
   max_number_of_subscribers parameter in p3sm.cfg configuration file. See 
   Data Repository Section in the SCMS-Sm User Manual.
   
   There is a limit to the maximum number of subscribers that can be stored 
   in the SM database. The limit is 20 million subscribers for Solaris and 
   two million subscribers for Linux. The SM default configuration supports 
   a maximum of 200,000 subscribers.
   
2) sm_memory_size - Resides in the [SM Definitions] section. Defines the 
   amount of memory allocated for the SM process in MB. You can set the 
   parameter here or edit PCUBE_SM_MEM_SIZE in the sm.sh file that  
   resides under the ~pcube folder.
   
3) database_perm_size - Resides in the [Database Definitions] section. 
   Defines the PermSize allocated for the database in MB. You can set the 
   parameter here or edit the PermSize parameter in the 
   /var/TimesTen/sys.odbc.ini file.
   
4) database_temp_size - Resides in the [Database Definitions] section. 
   Defines the TempSize allocated for the database in MB. You can set the
   parameter here or edit the TempSize parameter in the 
   /var/TimesTen/sys.odbc.ini file.

------------------------------------------
Step 5: Executing the install-sm.sh Script
------------------------------------------
 	
Note: Before starting the installation, make sure that disk space 
      requirements listed in the System Requirements are satisfied.

 	
Note: The install-sm.sh script is customizable.
 	
Note: It is not possible to run the script if /etc/motd file is not empty. 
      The file should be (re)moved prior running the install-sm.sh script.

To execute the install-sm.sh script:

From your workstation shell prompt, move to the directory to where the 
distribution file was extracted and run the following command:
# install-sm.sh [command options]

The following table lists the command options.

Options	|Description
------------------------------------------------------------------------------
-d 	|Specifies the install directory for ~pcube.
	|This directory must not be an existing directory.
	|This directory must be specified as a full pathname beginning with 
	|"/". The default is /opt/pcube
------------------------------------------------------------------------------
-o	|Specifies the existing home directory of user pcube as the install 
        |directory. 
	|Note: The options -d and -o are mutually exclusive.
------------------------------------------------------------------------------
-v	|Specifies the directory for data storage.
	|This directory must not be an existing directory.
	|This directory must be on a partition with at least 1 GB of free 
	|space.This directory must be specified as a full pathname beginning 
	|with "/".
	|The default is InstallDirectory/var.
------------------------------------------------------------------------------
-h	|Shows this message.
------------------------------------------------------------------------------
	
The script performs the following steps:

1) Checks for validity of arguments and sufficient disk space.
2) Adds (or verifies the existence of) a user pcube and a group pcube.
3) Populates the pcube home directory with the SM and CLU directory 
   structure.
4) Invokes the JRE installation script with pcube home as the target 
    directory. 
   The JRE installation does not affect any existing Java installations.
5) Invokes the TimesTen installation script with pcube home as the target 
   directory.
6) Creates the SM DSN for TimesTen with pcube home as the target directory. 
   It is possible to install the SM DSN for TimesTen in a specified directory 
   by using the -v option.
7) Creates startup and shutdown scripts in /etc.
8) Creates the shell preamble ~pcube/sm.sh, which contains environment 
   variables that depend on the actual folder in which the SM was installed.
   
EXAMPLE:

The following example installs the SM and CLU to a directory named 
/usr/local/pcube using the default data storage directory.
# install-sm.sh -d /usr/local/pcube

The following example installs the SM and CLU to the default directory of 
the user pcube.
# install-sm.sh -o

-----------------------------------------------
Step 6: Setting the Password for the pcube User
-----------------------------------------------
After the installation script has completed successfully, set the password 
for the pcube user by running the following command:
# passwd pcube

 	
Note: It is important to remember the password you have selected.

-----------------
Step 7: Rebooting
-----------------
Reboot the computer to complete the installation.

--------------------------------------------------------
Step 8: Installing the SCA BB Package and LEG components
--------------------------------------------------------
Depending on the integration type, you might need to install the SCA BB 
package on the SM or install Login Event Generator (LEG) modules.
To perform the installation, use the p3inst command-line utility. 
For example:

> p3inst --install --file=eng31.pqi

For additional information, see Installing an Application section in the
SCMS-SM User Manual.

---------------------------------------------
Step 9: Adding a User for PRPC Authentication
---------------------------------------------
It is necessary to add a user for PRPC authentication because SCA BB 
requires a username and password when connecting to the SM.
To add a user for PRPC authentication, use the p3rpc command-line utility. 

For example:
> p3rpc --set-user --username=<username> --password=<password>

For cluster installations, use the --remote option as shown in the 
following example:
> p3rpc --set-user --username=<username> --password=<password> 
  --remote=OTHER_SM_IP[:port]

----------------------------------------------
Verifying that the Installation was Successful
----------------------------------------------
To verify that the installation was successful, run a CLU utility, such 
as the p3sm command that displays general information about the SM.

To verify that the SM installation was successful:

From your workstation shell prompt, change to the ~pcube/sm/server/bin
directory, and type:
> p3sm --sm-status
The above command displays the current status of the SM.

 	
Note: Wait a few minutes after the installation before running this 
      command to allow the SM to become operational. The output of this 
      command should indicate that the SM is running. 
      
In case of errors during installation, the command will output a description 
of these errors. For more information about configuring the Subscriber Manager
and additional installation procedures see SCMS-SM User Manual.


