Websphere Portal: Unix Linux Startup Script

From Wiki
Revision as of 13:36, 11 December 2013 by Ebasso (talk | contribs)

This Script is for IBM Websphere Portal Server

You can use if you install Portal in a single box or multiple boxes.

  1. Create a file /etc/init.d/rc_portal and put the text below and save
  2. run > chkconfig --add /etc/init.d/rc_portal

You must check your installation path and profiles names

Sugestions: send an email to ebasso [at/@] ebasso [dot/.] net

Versions

Version rc_portal_20131113 (Current Version)

Available commands :

 Commands:    ./rc_portal { start | stop | restart } [-WAS_PASSWORD  PASSWORD]

 DMgr:        ./rc_portal { startdmgr | stopdmgr } [-WAS_PASSWORD  PASSWORD]
 Node:        ./rc_portal { startnode | stopnode } [-WAS_PASSWORD  PASSWORD]
 IHS:         ./rc_portal { startihs | stopihs | statusihs }
 IHS Admin CTL: ./rc_portal { startadminctl | stopadminctl | statusadminctl }


 Tools: ./rc_portal { serverstatus | kill | killnode | killdmgr }
 Diagnosis: ./rc_portal { generatedumpinfo | checkfilesystem }

Version 1.0 (Current Version)

Usage:          ./rc_portal { start | stop | restart | reload }
Admin Commands: ./rc_portal { serverStatus | startServer1 | stopServer1 | startAll | stopAll }
DMgr  Commands: ./rc_portal { startDmgr | stopDmgr }
Node  Commands: ./rc_portal { startNode | stopNode }

Download -> rc_portal


Help

Introduction


rc_portal script is intended to facilitate the use of WebSphere Portal platforms in Unix / Linux . With it operations like start/stop of DMGR , nodeagent , WebSphere_Portal are simplified , it allows closure of tasks and generation of java dumps on the operating system for collecting logs .

Quick Setup

1 ) Create a directory to place the scritps

# mkdir -p /opt/rc_portal

2 ) Copy the files

  • rc_portal
  • rc_portal_config
  • rc_portal_script
  • aixmon.sh
  • aixperf.sh
  • linmon.sh
  • linperf.sh

to this location

3 ) With the root user , change the owner of files

# chown root . * sh.
# chown root . rc_portal *

4 ) With the root user , change the permissions of files

# chmod 555 rc_portal
# chmod 555 aixmon.sh
# chmod 555 aixperf.sh
# chmod 555 linmon.sh
# chmod 555 linperf.sh

4 ) Still as root , change the permissions of files

# chmod 600 rc_portal_script

This configuration is required only for users with permission to sudo can run the script

1.2 Setting the file rc_portal_config

The rc_portal_config configuration file contains information used by rc_portal script . Change as your environment .

Note: Items marked with # are comments

WP_PROFILE_NAME = Name Profile Portal PORTALSERVER_NAME = Name Server Portal WAS_USERNAME = User administrator WAS WAS_ PASSWORD = Password WAS administrator IBM_ROOT = default installation directory WEBSPHERE_ROOT = default installation directory WebSphere APPSERVER_ROOT = default installation directory WebSphere App Server PORTALSERVER_ROOT = default installation directory WebSphere Portal Server WP_PROFILE_ROOT = Directory Profile WebSphere Portal Server WP_PROFILE_LOGS_ROOT = Directory Profile Log files of WebSphere Portal Server , to change this directory is necessary amendments IBM System Console . DUMP_FILES_DEST_ROOT = temporary directory to collect logs and traces

Should this be a DMGR server , uncomment DMGR_PROFILE_ROOT = the Profile Directory Deployment Manager DMGR_PROFILE_LOGS_ROOT = Directory Profile Log files of the Deployment Manager to change this directory is necessary amendments IBM System Console .

After changing , even as the root user , change the permissions of files

  1. Chmod 600 rc_portal_script

1.2.1 Example

  1. Name of the Profile Portal

WP_PROFILE_NAME="intrawpp01"

  1. Name of the Portal application

PORTALSERVER_NAME = "WebSphere_Portal"

  1. Username and Password
do WAS

WAS_USERNAME="wsadmin"

  1. WAS_PASSWORD="wsadmin"


  1. Installation directories

IBM_ROOT="/opt/IBM" WEBSPHERE_ROOT=$IBM_ROOT"/WebSphere" APPSERVER_ROOT=$WEBSPHERE_ROOT"/AppServer" PORTALSERVER_ROOT=$WEBSPHERE_ROOT"/PortalServer" WP_PROFILE_ROOT=$APPSERVER_ROOT"/profiles/"$WP_PROFILE_NAME WP_PROFILE_LOGS_ROOT=$WP_PROFILE_ROOT"/logs"

  1. # Only for DMGR

DMGR_PROFILE_ROOT=$APPSERVER_ROOT"/profiles/intrawppdmgr" DMGR_PROFILE_LOGS_ROOT=$DMGR_PROFILE_ROOT"/logs"

DUMP_FILES_DEST_ROOT = "/tmp"



1.3 Commands and Parameters


When running the command

  1. /opt/rc_portal/rc_portal

he lists the commands available on application

Available commands :

 Commands:    ./rc_portal { start | stop | restart } [-WAS_PASSWORD  PASSWORD]
 DMgr:        ./rc_portal { startdmgr | stopdmgr } [-WAS_PASSWORD  PASSWORD]
 Node:        ./rc_portal { startnode | stopnode } [-WAS_PASSWORD  PASSWORD]
 IHS:         ./rc_portal { startihs | stopihs | statusihs }
 IHS Admin CTL: ./rc_portal { startadminctl | stopadminctl | statusadminctl }


 Tools: ./rc_portal { serverstatus | kill | killnode | killdmgr }
 Diagnosis: ./rc_portal { generatedumpinfo | checkfilesystem }

If the user is not root , the root password will be asked , as the message below :

You must have permission to sudo to root to run this script Switching to root , enter the password or press enter password : If the user password is not set in WAS rc_portal_config file, the password should be passed on the command line .

Example to start the Portal :


  1. /opt/rc_portal/rc_portal start

or

  1. /opt/rc_portal/rc_portal start -WAS_PASSWORD <password>


1.3.1 Commands available

start

Starts the portal through command startServer.sh

example :

  1. /opt/rc_portal/rc_portal start

or

  1. /opt/rc_portal/rc_portal start -WAS_PASSWORD <password>

stop

For the portal through startServer.sh command

restart

To start the portal and

startdmgr

Starts DMGR through command startManager.sh

stopdmgr

For DMGR through stopManager.sh command

startNode

Starts Node Agent through command startNode.sh

stopNode

To the Node Agent through command stopNode.sh

startihs

Starts Apache apachectl start command via

stopihs

For Apache via the apachectl stop command

statusihs

Lists the status of Apache with the command apachectl status

startihs

Starts Apache adminctl start command via

stopihs

For Apache via the adminctl stop command

statusihs

serverstatus

Starts the portal through command serverStatus.sh -all

kill

Terminating the java process portal , located across the <WP_PROFILE_ROOT>/logs/WebSphere_Portal/WebSphere_Portal.pid

killdmgr

Terminating the java process portal , located across the <WP_PROFILE_ROOT>/logs/dmgr/dmgr.pid

killnode

Terminating the java process portal , located across the <WP_PROFILE_ROOT>/logs/nodeagent/nodeagent.pid

generatedumpinfo

Generates a javacore Portal , located across the <WP_PROFILE_ROOT>/logs/WebSphere_Portal/WebSphere_Portal.pid file. At the end of the command