Tuesday, June 1, 2010

Using wsadmin to modify configuration variables

The backupConfig and restoreConfig commands for the WebSphere Application Server are pretty handy. The backupConfig command allows you to back up all of the configuration for a selected profile to an archive. The restoreConfig command allows you to restore (or import) the configuration from such an archive to a target profile. You can employ these commands for many purposes such as sharing a common configuration or steeling yourself against unexpected outages.

While working on a cool WebSphere CloudBurst project (that I hope to share soon enough), I was using these two commands to share configurations across two different installations and came across a situation I think is worth discussion.

In addition to having different cell, node, and host names across the installations (something you can overcome by using the commands I talked about here), the two installations existed at different file path locations on their respective disks. On the first machine the product and profile was located at:

/opt/IBM/WebSphere/AppServer

/opt/IBM/WebSphere/Profiles/DefaultAppSrv01

On the second machine the locations were:

/opt/WAS7.0/32bit

/opt/WAS7.0/32bit/profiles/AppSrv01

The backupConfig and restoreConfig commands work on an archive that basically contains all the contents under the config directory of a profile. Given that you may think it really shouldn’t matter what the WAS installation path and profile paths are, but there is a matter worth noting.

If you look in the config tree for a given WAS profile, you will notice that there are variables.xml files at various configuration scopes (cell, node, server, etc.). These files define variables and their associated values, and these variables are in turn used by various scripts in the profile. Obviously it is important for these values to be correct, and in my particular case after restoring the configuration from machine 1 to machine 2 two of the values were no longer correct.

The two variables with incorrect values were located in the node’s variables.xml file. The names of the variables were WAS_INSTALL_ROOT and USER_INSTALL_ROOT and represent the location of the WAS installation and WAS profile location. After restoring the configuration of machine 1 to machine 2, the values for these variables still reflected the paths on machine 1. Since these paths were different on machine 2, I had to update them. I could do it manually, but we all know an automated, scripted approach is better. With that in mind, I wrote a simple wsadmin script to get the job done:

from java.lang import System as jSys
nodeName = sys.argv[0]
newWASInstallRoot = sys.argv[1]
newUserInstallRoot = sys.argv[2]

lineSep = jSys.getProperty('line.separator')

node = AdminConfig.getid('/Node:' + nodeName + '/')
varSubstitutions = AdminConfig.list("VariableSubstitutionEntry",node).split(lineSep)

for varSubst in varSubstitutions:
getVarName = AdminConfig.showAttribute(varSubst, "symbolicName")
if getVarName == 'WAS_INSTALL_ROOT':
AdminConfig.modify(varSubst,[['value', newWASInstallRoot]])
elif getVarName == 'USER_INSTALL_ROOT':
AdminConfig.modify(varSubst,[['value', newUserInstallRoot]])
AdminConfig.save()

I know it’s a pretty simple use of wsadmin, but one that may be useful if you find yourself having to modify configuration variables for this reason or any other. Let me know if you have any questions or comments.

Changing cell names, node names, host names

how to change cell names, node names, and host names for a given WebSphere Application Server environment. It usually starts by someone asking me what configuration files they need to change when they want to update this information, and is followed by their surprise when I tell them none. The reason I say that is because it’s time consuming, hard, and unnecessary for you to figure this out. Instead, you can use three simple wsadmin commands. I’ll give you an example of those here (all written in Jython).

To change the cell name for a given environment, use the following wsadmin command:

AdminTask.renameCell(‘[-newCellName -regenCerts ]‘)


This updates your configuration with the new cell name you specify and will optionally regenerate the certificates in that environment.

To change the name of a given node, use the following wsadmin command:

AdminTask.renameNode(‘[-nodeName -newNodeName ]‘)


This updates the name of the node specified by the nodeName parameter to the name specified by the newNodeName parameter.

To change the host name for a given node, use the following wsadmin command:

AdminTask.changeHostName(‘[-nodeName -hostName ]‘)


This updates the host name for the node specified in the nodeName parameter to the value specified in the hostName parameter.

These commands update all of the necessary WAS configuration, but do keep in mind they do not update any shell or batch files in the environment. This means you need to update the setupCmdLine script included in your WAS installation, and you obviously need to update any of your custom scripts that have hard coded values for cell, node, and host names.

Monday, May 31, 2010

Render pzn cmpnt using wcm api

How can I render a Personalization (PZN) component using the IBM® Web Content Management (WCM) API?


Answer
The WCM API provides features to render content items as well as library components such as the Web Content Management Personalization component.


Summary of how to render personalization component in WCM

First get the user workspace
Next set the web content library.
Get the document iterator for wcm personalization component by name.
Set the rendering context where the wcm personalization component will be rendered.
Get the wcm personalization component document id
Render the wcm personalization component.


***Note:** The example code (below) renders the WCM Personalization component from a JSP (Java server page).


Example code

//finds component that matches by name
DocumentIdIterator componentIdIterator = workspace.findComponentByName("PZNCMPT");
DocumentId docId;
LibraryComponent component;
String componentName = "";
String libraryPath = "/MyLibrary";
String sitePath = "/site/sitearea";

// Create the rendering context
RenderingContext context = workspace.createRenderingContext(pageContext.getRequest(),pageContext.getResponse(), new java.util.HashMap(), "http://localhost:10038/wps/wcm", "/connect");

// Set the path (Context) to the for the site area where the component will be rendered
context.setRenderedContent(libraryPath + sitePath);

//standard out log message to browser
out.println("Log: Testing WCM API: Context Path = " + context.getPath() + "

");

//loops through the component id's found in the iterator
while(componentIdIterator.hasNext())
{
docId = (DocumentId)componentIdIterator.next();
component = (LibraryComponent) workspace.getById(docId);
componentName= (String)component.getName();

//standard out log message to browser
out.println("Log: Testing WCM API: Component name = " + componentName + "

");

// Get the rendered string
if (component instanceof LibraryComponent)
{
//standard out log message to browser
out.println("Log: Testing WCM API: " + componentName
+ " is an instance of LibraryComponent

");

String renderedContent = workspace.render(context, component);

//standard out log message to browser
out.println("Log: Testing WCM API:: Passed workspace.render(context, component)

");

//Render the PZN Component
out.println("
Render PZN Component: Test Result follows:
" + renderedContent + "
");

}// end if statement

//standard out log message to browser
out.println("The End
");

}//end while

Changing the language used in the log file

Changing the language used in the log file
By default, information in the log file is written in the language that was used for the WebSphere Portal installation. However, because WebSphere Portal supports a number of languages, you can choose to have the log file information written in a language other than that used during installation.

To change the language used for the log file, edit the file log.properties. This file is located in the following WebSphere Portal directory:

* Windows: portal_server_root\shared\app\config
* UNIX: portal_server_root/shared/app/config
* i5/OS: portal_server_root/shared/app/config

Add the following line:
locale=xx

where xx is the two-letter abbreviation for the locale. For example, to have log information generated in English, you would add the following line:
locale=en

For more language codes, check this out:
http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/index.jsp?topic=/com.ibm.wp.ent.doc/wps/adsyslog.html

Configuring Netegrity SiteMinder to Work with IBM WebSphere Portal

Before the configuring Netegrity SiteMinder, please make sure you finish the following tasks:
1. Install WebSphere Application server 6.0.2.17 and WebSphere Portal server 6.0.1
2. Install HTTP server 6.0
3. Install Web Server plug-in for WebSphere Application Server

In the following instructions, WebSphere Application Server and HTTP server 6.0 are installed on the same machine: for example, install WebSphere Application Server 6.0.2.9 and WebSphere Portal server 6.0 under c:\IBM\WebSphere, install HTTP server 6.0 under c:\IBM HTTP Server, install Web Server plug-in under c:\IBM\WebSphere\Plugins.

Policy Server: Windows 2000 Server + Netegrity Policy Server v5.5
Portal Server: Windows 2003 Server + IBM HTTP Server v6.0 + WebSphere AppServer Server 6.0.2.17 + WebSphere Portal Server 6.0.1 + SiteMinder 5.x Web Agent + SiteMinder Agent v5.6 for IBM WebSphere
LDAP Server: Window 2000 + Domino V701_01122006 + Hotfix
Mail Server: Suse9.1 + Domino V701_01122006 + Hotfix

1. Install Netegrity Policy Server and configure on Policy Server Console
1.1 Install Netegrity Policy Server v5.5
Install Policy Server on a server with IIS for Web service and Sun JRE 1.3 (or above version). Enter your JRE's path or else this wizard will install JRE 1.3:

Select a Web server for policy server:


Enter the password for SiteMinder admin user, using this user name and password, you can administer policy server by browser:


Install complete need restart machine.
Start->Programs menu:


1.2 Configure on policy server console
1.2.1 Access policy server
Using a browser to access policy server: http:///siteminder/smadmin2.html
Clicking Administer Policy Server, the browser will download administration applet. If there is a security warning about Netegrity, please trust it and click Yes. Then SiteMinder Administration window pops up, enter user name and password, click Login, then you will see Policy Administration Console window pop up.

1.2.2 Creating an agent
1). In the SiteMinder Administration console, on the System tab, right-click on Agents and then choose Create Agent.
2). In the "Name" field, type a unique name that is not assigned to an existing agent.
Note the name that you assign to the agent. You will need to refer to it when you create the associated agent configuration and realm objects.
3). (Optional) In the "Description" field, type a description.
4). Under "Agent Type," ensure that SiteMinder is selected and that the drop-down displays Web Agent.
5). Click OK to save and close the settings.

1.2.3. Creating an agent configuration
1). In the SiteMinder Administration console, on the System tab, click Agent Conf Objects, then in the right pane, right-click on the "ApacheDefaultSettings" agent configuration and choose Duplicate Configuration Object. Specify the agent configuration properties as described below.
2). In the "Name" field, type a unique name.
3). (Optional) In the "Description" field, type a description.
4). Set the following parameters as indicated:
For "DefaultAgentName," type the name of the associated agent that you created in the previous procedure. (If need, delete "#" before "DefaultAgentName")
For "CookieDomain," type the name of the domain where the Portal Server resides.
Set "AllowLocalConfig" to Yes.
Set "CssChecking" to NO.
For "BadUrlChars" type: ./,/*,*.,~,\
Leave the remaining parameters set to their default values.
5). Click OK to save and close the settings.

1.2.4. Creating a host configuration
1). In the SiteMinder Administration console, on the System tab, click Host Conf Objects, then in the right pane, right-click on an existing host configuration and choose Duplicate Configuration Object. Specify the settings as described below.
2). In the "Name" field, type a unique name.
3). (Optional) In the "Description" field, type a description.
4). Click OK to save and close the settings.

1.2.5. Create User Directories
1). In the SiteMinder Administration console, on the System tab, right-click on User Directory and then choose Create User Directory. Specify the domain properties as described below.
2). In the "Name" field, type a unique name.
3). (Optional) In the "Description" field, type a description.
4). In the "Server" field, type the LDAP server's IP or hostname.
5). Under LDAP Search, in the "Root" field, type BaseDN, and from "Scope" the drop-down list select "Subtree".
6). Under LDAP User DN Lookup,
in "Start" field, type "(&(objectclass=person)(uid=",
in "End" field, type "))"

7). Select tab "Credentials and Connections", check Require Credentials, enter username and password. Then click OK to save and close the settings.

1.2.6. Creating a domain
1). In the SiteMinder Administration console, on the System tab, right-click on Domains and then choose Create Domain. Specify the domain properties as described below.
2). In the "Name" field, type a unique name.
3). (Optional) In the "Description" field, type a description.
4). From the drop-down list at the bottom of the dialog box, select the LDAP server you want to configure and then click Add.
5). After the server is added to the User Directories tab, click OK to save and close the settings.

1.2.7. Creating a realm (for basic authentication)
1). In the SiteMinder Administration console, click the Domains tab, right-click on the domain you created, and choose Create Realm. Specify the realm properties as described below.
2). In the "Name" field, type a unique name.
3). (Optional) In the "Description" field, type a description.
4). On the Resource tab, in the "Agent" field, type the name of the associated agent that you created.
in "Resource Filte" field, type "/wps/myportal"
Leave the remaining options on the Resource, Session, and Advanced tabs set to their default values.
5). Click OK to save and close the settings.

1.2.8. Create a SiteMinder TAI Validation Realm
1). In the SiteMinder Administration console, click the Domains tab, right-click on the domain you created, and choose Create Realm. Specify the realm properties as described below.
2). In the "Name" field, type a unique name.
3). (Optional) In the "Description" field, type a description.
4). On the Resource tab, in the "Agent" field, type the name of the associated agent that you created.
in "Resource Filte" field, type "/sitemindertai"
Leave the remaining options on the Resource, Session, and Advanced tabs set to their default values.
5). Click OK to save and close the settings.

1.2.9. Creating rules for the realm
1). In the SiteMinder Administration console, click the Domains tab. Expand the domain you created, right-click on the realm you created, and then choose Create Rule under Realm. Specify the rule properties as described below.
2). In the "Name" field, type a unique name.
3). (Optional) In the "Description" field, type a description.
4). From the Realm list, select the realm you created; in the "Resource" field, type * (an asterisk).
5). Under "Action," select "Web Agent actions" and select all items (Get, Post, Put) in the list box.
6). Under "When this Rule fires," select "Allow Access," then under "Enable or Disable this Rule" select "Enabled."
7). Click OK to save and close the settings.
8). Repeat steps 1 through 3 to create a second rule.
9). From the Realm list, select the realm you created.
10). Under "Action," select "Authentication events" and then select "OnAuthAccept" from the drop-down list.
11). Under "Enable or Disable this Rule," select "Enabled."
12). Click OK to save and close the settings.

1.2.10. Creating a policy for the realm
1). In the SiteMinder Administration console, click the Domains tab. Expand the domain you created, right-click on Policies, and then choose Create Policy. Specify the policy properties as described below.
2). In the "Name" field, type a unique name.
3). (Optional) In the "Description" field, type a description.
4). On the Users tab, click Add/Remove.
5). In the next dialog box, select each LDAP sub-tree you want SiteMinder to authenticate users against and add it to the Current Members list. Then click OK.

6). Click the Rules tab, then click Add/Remove Rules.
7). In the next dialog box, select the two rules you created, add them to the Current Members list, and then click OK.
8). Leave the options on the other tabs set to their default values.
9). Click OK to save and close the settings.


2. Install and configure SiteMinder Web Agent on Portal Server
The information in this appendix explains how to configure Portal Server with a SiteMinder 5.5 Policy Server. Therefore, you should install the latest version of the V5x SiteMinder Web Agent and any SiteMinder Hotfix that may be available. You can obtain these files from support.netegrity.com. For detailed installation instructions, refer to the readme files provided with the Web Agent and Hotfix.
Note: It is recommended that you install both the Web Agent and the Hotfix prior to configuring the Web Agent. When you install the Web Agent, the last dialog box provides an option to launch the Web Agent Configuration Wizard. Click Cancel, and then install the Hotfix.
After you install the Web Agent and Hotfix, follow the steps below to configure the Web Agent.
Procedure
1). Ensure that you have completed the Policy Server setup tasks.
2). Click Start in the Windows task bar and then choose Programs - SiteMinder to launch the Web Agent Configuration Wizard.
3). In the first dialog box, do the following:


Ensure that "Enable PKCS11" is not selected.
You can select "Yes, I would like to do Host Registration now." will generate smHost.conf.
You can also select "No, I would like to do Host Registration later.", let smagent TAI generate smHost.conf.
Enter the administrator user name and password, then reconfirm the password:


In the "Trusted Host Name" field, type the name of the system you want to register. This is typically the physical server name. This will create a Trusted Host entry on the Policy Server. You cannot create duplicate Trusted Host entries. If this system was previously registered, you need to either delete the existing Trusted Host entry on the Policy Server or register the system under a new name. Click Next.
4). In the next dialog box, in the "Policy Server IP Address" field, type the IP address of the Policy Server and then click Next.
5). In the next dialog box, in the "Host Configuration Object" field, type the name of the host configuration you created previously and then click Next.
6). In the next dialog box, accept the default location of the host conf file and then click Next.
7). In the next dialog box, select the appropriate Web server and then click Next.
8). In the next dialog box, review the details displayed. If you see a message that the agent configuration object has not been configured, click Configure and then do the following:
In the "Agent Conf Object" field, type the name of the agent configuration object you created previously. Click Next to return to the previous dialog box.
9). Click Finish.
This step will generate WebAgent.conf under IBM HTTP Server\conf.

3. Install and configure Netegrity TAI on Portal Server
3.1 Install Netegrity TAI (Netegrity SiteMinder Agent v5.6 for IBM WebSphere)
Installing TAI needs JRE. If there is no JRE on portal server, you need install JRE first.
if install ca-asa-6.0-was-win32.exe, WebAgent.conf will be not generated, but AsaAgent-auth.conf.
if install nete-asa-5.6-was-win32.exe. WebAgent.conf will be generated.
Those screen snapshot in following steps comes from installing ca-asa-6.0-was-win32.exe.

1). Accept terms of License agreement - Next
2). Where would you like to install? - Accept Default (C:\smwastai)
· In the Choose WebSphere Folder,specify the installation location
e.g., C:\IBM\WebSphere\AppServer
3). Choose the folder where WebSphere 6 is installed.
4). Would you like to create a Trusted Host?
If you don't create a Trusted Host in the above step, you must answer yes.
If you have created a Trusted Host, answer no then browse to smHost.conf:
Netegrity\SiteMinder Web Agent\Config\smHost.conf

3.2 configure Netegrity TAI on Portal Server
1). Start the WebSphere AppSever Server and access WebSphere Administrative Console (if they are not running already).
2). Select Security > Global Security > Authentication Mechanisms > LTPA. (You can skip this if it was already done)
Enter and re-enter the password to create a key store.
Set Timeout to the same value as the max timeout value for the Web (600) Agent realm protecting the proxy to WebSphere.
Click Apply and save the changes to the master configuration by clicking Save on the next two screens.
3). Select Security > Global Security (You can skip this, for default is so.)
In the Active Authentication Mechanism drop-down list, select LTPA (Lightweight Third Party Authentication).
Click Apply and save the changes to the master configuration by clicking Save on the next two screens.
4). Select Security > Global Security > Authentication Mechanisms > LTPA.
Scroll down to the Additional Properties field and click Trust Association.
In the General Properties field, check Enable Trust Association, and click Apply.
Under Additional Properties, click Interceptors.
Important Note: If the following TAM and WebSEAL Interceptors are present in the
configuration, you will need to delete them in order for the SiteMinder TAI to work correctly:
com.ibm.us.security.web.TAMTrustAssociationInterceptorPlus
com.ibm.us.security.web.WebSealTrustAssociationInterceptor


On the Interceptors page, click New.
Under General Properties on the New page, enter the following SitMinder TAI class name next to Interceptor Classname and click Apply:
com.netegrity.siteminder.websphere.tai.SiteMinderTrustAssociationInterceptor

On the configuration page for the SiteMinder Trust Association Interceptor, click the Custom Properties link under Additional Properties.
On the Custom Properties page, click New, enter the following:
. Name: siteminder_tai_conf
. Value: enter the absolute path to your SiteMinder TAI's WebAgent.conf file (for example, C:/smwastai/conf/WebAgent.conf).
. Enter an optional description for the SiteMinder TAI.

Click Apply and save the changes to the master configuration by clicking Save on the next two screens.

5). Log out of the Administration Console.
6). Important Note: In the WebAgent Configuration file - WebAgent.conf - or in the Agent Configuration object for both the WebAgent and the TAI, ensure that the following parameters are set as follows:
CssChecking=NO
BadUrlChars=./,/*,*.,~,\ i.e.,: remove //, /. and %00-%1f,%7f-%ff,%25 from the list of Bad URL Characters
7). Enable the TAI webagent.conf and the Web server webagent.conf:
Open webagent.conf
Set the value of EnableWebAgent to “yes”
Save the file
8). Copy smagent.properties under \conf to profiles\wp_profile\properties\.
9). From a command line or shell in the WebSphere/AppServer/bin directory, stop and restart the WebSphere Server

4. Verify SiteMinder and Portal Server work well
4.1 Change the Login and Logout pages
1). Make backup copies of the following two files:
was_profile_root/installedApps/node_name/wps.ear/wps.war/themes/html/theme_name/banner_toolbar.jspf
was_profile_root/installedApps/node_name/wps.ear/wps.war/themes/html/theme_name/mainMenu.jsp
2). In each of the themes directory and subdirectories, there is a banner_toolbar.jspf file. Edit the appropriate banner_toolbar.jspf file and find the login button section. By default, WebSphere Portal ships the banner_toolbar.jspf with the Login screen section commented out, and the second section (Login Portlet) is uncommented. Replace each uncommented anchor href (each href is highlighted in bold ), depending on whether you use the Login Screen or the Login Portlet, with the following anchor tag:
/myportal'>
The following example shows what the banner_toolbar.jspf will look like after adding the above anchor tag:
<%-- comment this to enable screen login --%>



/myportal'>





<%-- Uncomment this to enable screen login

/myportal'> key="link.login" bundle="nls.engine" />

--%>
Note: The previous example uses the 'wps:' prefix to designate JSP tags from the portal tag library in portal.tld. Your custom JSPs might use a different tag prefix. See Tags used by the portal JSPs for more information.
The following example shows what the mainMenu.jsp will look like after adding the above anchor tag:
<%-- Login button --%>
<%-- Comment out to enable screen login --%>



<% if ( menuItemCount > 0 ) { %>,<% } %>"asynchDoFormSubmit('<%= wpsBaseURL %>/myportal');",
'',"<{defaultPageIconUrl}"
<% menuItemCount++; %>


<%-- Uncomment to allow screen login


<% if ( menuItemCount > 0 ) { %>,<% } %>"asynchDoFormSubmit('<%= wpsBaseURL %>/myportal');",
'',"<{defaultPageIconUrl}"
<% menuItemCount++; %>

--%>
Important for every operating system: Touch the Default.jsp file after editing any JSP files and before any restart. This updates the timestamp on the file to the current time and will signal a recompile of Default.jsp to incorporate the edit changes from other JSP files. Type:
touch Default.jsp. An alternative is to edit (open and save) Default.jsp, which has the same effect as the touch command. After updating banner_toolbar.jspf and mainMenu.jsp, you must restart WebSphere Portal unless reloading is enabled.
3). Open and save the versions of Default.jsp that include each of the files that you edited in a previous step. See the comments in each banner_toolbar.jspf file for more information.
4). Make a backup copy of the was_profile_root/installedApps/node_name/wps.ear/wps.war/WEB-INF/web.xml file. Edit the file as shown in bold here:

FORM
WPS

/myportal



5). Restart WebSphere Portal.
4.2 Access portal using a Web browser
To test your configuration, open the following URL in a Web browser:http://hostname/wps/myportal
SiteMinder authentication prompts to WebSphere Portal, Enter a valid username and password. The WebSphere Portal homepage displays, by-passing the WPS login page.

WebSphere Application Server production environment set up practice guidelines

WebSphere Application Server production environment and demonstrates the structures there are many different environments, due to the diversity of production environments, application performance tuning scene, error diagnosis and other strict requirements, WebSphere Application Server production environment involves the installation of the pre-installation system inspection, installation, adjustment of various parameters, as well as common management tasks after installation. WebSphere Application Server has a lot of resources for reference, but for too many shows or just build a simple test environment, users, hard to start with the face of voluminous documents. This article attempts to summarize the structure of a complete WebSphere environment common problems encountered and precautions, set up WebSphere Application Server for the first quasi-production environment to provide a quick start guide.
1. Introduction

As with most commercial application servers, if you plan to WebSphere Application Server (hereafter referred to as WAS) for a formal production environment or for performance testing, production test environment before testing, in addition to simple installation steps, you need to do some additional checks, planning and configuration, to ensure that your WebSphere Application Server environment safe and stable operation. Between the various versions of WebSphere Application Server installation steps not very different, WAS V6.x version than the previous version of the installation configuration steps to create profile for multi process, this example of version V6.1. WebSphere Application Server versions for the specific installation steps, refer to the WebSphere Application Server and WebSphere products were installed documentation information center, DeveloperWorks, there are many structures on the WAS environment, reference articles, such as: WAS5 installation and frequently asked questions, in WAS6. 0 ND achieve clustering, etc., see reference resources.





2. Installation preparation

Quasi-production environment in the build process, good preparation is half the recommended one by one the following pre-installation preparations.

2.1. Application Server hardware configuration

WebSphere Application Server depends on the successful implementation of a successful first target platform meets the conditions to install the software and hardware. Configuring WebSphere Application Server on the hardware requirements of the main deployment platform to be reflected in the architecture, CPU, memory and disk storage space, usually above the minimum memory requirements in the 512M, according to hardware platform, WebSphere Application Server version, the different components, requirements configuration will be slightly different, see WAS detailed system requirements. Disk space allocation please see the "2.4 to confirm whether the disk space to meet the requirements."

2.2. To confirm the operating system version meets the requirements

As a mature commercial application server, WebSphere Application Server will regularly publish different versions of WAS (eg WAS V5.0, WAS V5.1, WAS6.0 ...), components (such as: Application Server, Edge Component) Supported Operating Systems version information. WebSphere server using a supported operating system platforms, to ensure that the application server installation, use the environment during normal and stable operation. Particular attention to is that if the operating system platform, IBM WebSphere Application Server is not officially supported platform, the WebSphere application environment problems can not be obtained after the WebSphere Application Server after-sales support, let alone solve the problem.

For example, I write this, in the x86 chip, for RedHat AS 4 operating system, if you want to install WebSphere Application Server V6.1 of the Application Server component, the required operating system version is Red Hat Enterprise Linux AS, Version 4 with Update 2. If your operating system version is Red Hat Enterprise Linux AS, Version 4, you also need to install Update2, or they may experience problems.

As a supported operating system version is regularly updated, please set up WebSphere Application Server environment before the details of the light system requirements to view the current operating system version (version should be listed in exactly the same with the Internet) is required to meet the WebSphere Application Server.

2.3. To confirm the network configuration / host name to meet the requirements

WebSphere Application Server installation process, create a profile of this step requires users to fill in the machine's host name (Figure 1), and, WAS run-time also need to use the host name (Host Name). WAS host name is the physical installation of the machine's network node name, it must resolve to the server's physical network nodes. Create a profile used in the WAS host name value can be fully qualified DNS host name (for example: hosta.cn.ibm.com), short host name (for example: hosta), or even a digital IP address (example: 192.168. 1.3), but it must be the actual configuration of WAS where the server host name. And, when put into use after the completion of WAS configuration is not recommended to change the host name you set, even if changed, the process is also complicated. Therefore, based on actual experience, we recommend users to install WebSphere Application Server configuration before the host name. If you use the fully qualified DNS host name or the short host name, you can view the current system hostname command to the hostname.If not configured, then the hosts file to add the appropriate entries.


Figure 1. Create a profile enter the host name when


FAQ 1: After installing WAS, change the host name, WAS not start or stop, log error: javax.naming.ConfigurationException: Cannot get canonical host name for server.Therefore, a summary document created before the WAS, according to the actual situation, choose one of three forms of host name (fully qualified DNS host name, short host name or numeric IP address) in the host name remains the same kind of form, as WAS Use the host name, the profile creation wizard (Figure 1) fill. If you are using DHCP or if you frequently change the IP address, then we recommend in the summary file was created using the fully qualified DNS host name or the short host name; If the machine ip fixed, while the fully qualified DNS host name or the short host name may change profile created in the use of digital ip.
FAQ 2: If you need to create a cluster, make sure the network configuration, in addition to ensure that the machine host name is configured correctly, it must also ensure that the cluster where the machines can ping each other through the host name.Otherwise, add node cluster created in step might not succeed.

2.4. To confirm whether the disk space to meet the requirements

Consider the allocation of hard disk space, in UNIX or Linux platform can use df-k first see the directory size.If it is installed in a production environment WebSphere Application Server, the general calculated from the following aspects to reserve space.

This space is generally about 1G, different system platforms in a slightly different. WAS installed directory should be reserved this space. WebSphere Application Server on Linux, the default installation path is / opt / IBM / WebSphere / AppServer, under the AIX default installation path is / usr / IBM / WebSphere / AppServer (later referred to as the path we WAS_HOME).Users can modify the installation when installing WAS path.
WebSphere Application Server V6.1 to create a profile with three kinds of basic types, each profile the space below: Application Server (Application Server): In the WebSphere Application Server installation did not choose to install the sample program, this profile occupied disk space of about 200M; Deployment Manager: 30M; custom profile (Custom, or node agent): 10M.

If you want to install the WEB server, the server is located in the WEB server, WEB server to allow the share of disk space. IBM HTTP Server general occupy the space around 110M.
If you installed the WEB server, WEB server is located in the machine normally will install the Web Server Plug-in component, the component share of disk space is about 200M.
WebSphere Application Server system log space. Estimates of log space to integrate the system configuration of the log.WebSphere Application Server logs are the main SystemOut.log, SystemErr.log.We can set the log file size and preserve the history of the number of log files, which can estimate their needs space. Please refer to "the necessary adjustment of parameters" section to learn how to adjust parameters of WebSphere Application Server logs.
If you have WEB server, WEB server logs need to consider space.If a customer opens a WEB server access log access.log (enabled by default), fast growth of this log, to allow enough space.
 backup files needed space. WebSphere Application Server provides a backup command (backupConfig.bat / sh), used to back up the application server's configuration and the applications. For a typical production system, WebSphere Application Server configuration file often more than 100M. BackupConfig command is issued, the use-logfile parameter to specify a location for the backup file.

When the system error log, for example, JVM OutOfMemory occurs when the majority of platforms in the WebSphere Application Server will default to write papers and heapdump javacore documents, records the error occurs when the JVM Heap, threads, so as to prepare error diagnostic use.Although the application server parameters can be adjusted so that does not produce such documents, but in order to analyze problems, usually starting from such documents. Such documents are usually particularly large, such as heapdump file, may reach hundreds of M.If the repeated occurrence of OutOfMemroy, occupied disk space quickly. Therefore, we must consider the disk space reserved for such documents.
WAS installation program also requires the system's temporary directory / tmp has more than 100M free space.
Users to publish to the WebSphere Application Server on all application and the application of its own application log space.Associated with the practical application of this size, and different applications can vary widely.
To understand the different platform specific disk space requirements, refer to the WAS V6.1 Information Center, "prepared for the product to install the operating system" section of the content.

2.5. For a specific operating system configuration

WebSphere Application Server mentioned earlier operating system versions to support specific requirements, in addition, WAS Information Center, also on a specific operating system version of the installed packages, kernel parameters, there are special requirements. For example, RHEL AS4, the information center instructions to install the compat-libstdc + +-33-3.2.3-47.3.ppc.rpm package (this is to maintain compatibility with C + + run-time necessary for such GSKit components, Java 2 Software Development Kit (SDK) and Web server plug-in use) and some other packages. For Linux, Solaris, HP and other systems, also need to adjust some kernel parameters accordingly. Please refer to WAS V6.1 Information Center, "prepared for the product to install the operating system" section of the content. For Solaris systems, need to adjust the parameter list are listed below:

set shmsys:shminfo_shmmax = 4294967295
set shmsys:shminfo_shmseg = 1024
set shmsys:shminfo_shmmni = 1024
set semsys:seminfo_semaem = 16384
set semsys:seminfo_semmni = 1024
set semsys:seminfo_semmap = 1026
set semsys:seminfo_semmns = 16384
set semsys:seminfo_semmsl = 100
set semsys:seminfo_semopm = 100
set semsys:seminfo_semmnu = 2048
set semsys:seminfo_semume = 256
set msgsys:msginfo_msgmap = 1026
set msgsys:msginfo_msgmax = 65535
set rlim_fd_cur=1024 set rlim_fd_cur = 1024



2.6. For Linux / Unix systems, to confirm to start the graphical interface

WAS installation can use the man-machine interactive graphical interface to install or batch installation (known as the silent installation, silent installation, pre-written response file, start the installation process does not require a graphical interface or human-computer interaction). If you use the graphical interface installed on the server is a Linux / UNIX platforms, we often do not have opportunities to directly use the server's screen / console, but through their own machine telenet to the server up. This direct telnet command line mode, start the graphical interface may not support the need to use Xmanager, X-Win32 X Window tools and other support software. If the graphics shown in Figure 2 shows that the terminal you can start your graphical interface.


Figure 2. Verify to start the graphical interface


2.7. Ready to install the appropriate media

WAS is a cross-platform product, different UNIX, Linux, Windows platform, 32-bit or 64-bit operating systems, the installation media is not the same, and the product contains the Application Server, Web Server, Edge Component and many other groups cases, when set up WebSphere environment, you need to order the WAS product package (including all platforms, components, multiple CD) in the Select the installation media.Therefore, we need to install before installing the WAS components, operating system version, operating system, the median, select the desired media.For example, if we are to x86 architecture, 64-bit (note, here is the 64-bit operating system is 64-bit) and Linux AS 4 install WAS, it should select the WebSphere Application Server for x86 64-bit Linux installation media ; if we are to install IBM Http Server or update installer, the two components are in the WebSphere Application Server Supplements CD in the same manner, according to the operating system version, the median, server chips, we can select the required media the. If you need to patch WAS installation is recommended before installing the WAS prepared ahead of time to download the patch to use during installation. Details in the "patch" a detail.

2.8. 2.8. Design WebSphere environment, the topology structure

Different scenarios depending on the application, we need to decide WAS, Web server, which were installed on the server, if the need to configure the cluster environment, also need to consider the Deployment Manager, all members of the cluster nodes and segments in which the server. For example, if we want to configure a cluster environment, the installation, we will usually design shown in Figure 3, a topology map to determine the actual installation on each server to install, configure components. For example, as shown in Figure 3, the figure solid line is the run time of the request flow, dashed line is the WAS control flow between the various components.We can see the machine in the hosta, WAS components should be installed, and create a Deployment Manager, NodeA profile, configure the cluster members of the C1 and C2; in hostb machines should be installed on WAS components, create NodeB profile, configure the cluster member of C3 and C4.In machine3 machine should be installed on IBM Http Server and Plug-in component. Where, WAS cluster configuration is very convenient, you can create a complete profile after the flexibility to adjust.


Figure 3. Topology architecture design WAS


2.9. Other common precautions

Some other common considerations include competence, port control and so on. For example:
WebSphere Application Server in Unix / Linux systems to support non-root user and root user.But for the sake of simplicity of operation set, they usually carried out under the root user.
Some production systems with limited access to the port, or the system may have occupied WAS will use the default port, therefore, need to change the WAS to use the port (this task will "change the port used by WAS" in detail) and so on .
If necessary create a cluster, be sure to participate in Cell environment between the time the same machine, same time zone, the proposed error control in the second level. Otherwise, the add node process may not succeed.







3. Install WebSphere Application Server

WAS installation process is very simple, usually divided into three steps: Install the WAS product, for product patches (if any patches), to create profile.If your environment is very clean, no special restrictions on the installation process most of the time is to click the default "Next". Of course, according to the different environment, usually to note the following:

3.1. Installation Notes WAS products

WAS to use graphical interface install process is very simple, usually do not need to make specific changes. Here are some common installation notes and tips to improve the speed of installation:

Typically, if your system has been installed WAS products, before installing WAS Product suggested turning off the WAS process is running. If you installed the IBM Http Server, is usually best stopped running Apache Http Server or other IBM Http Server process. In the Unix / Linux system, you can use ps-ef | grep java command to see if there was the process of the current system, with ps-ef | grep httpd command to view the current system is a http server process running.
Install WAS can perform launchpad.bat / luanchpad.exe, start the "start panel" from the start panel, click "Start WebSphere Application Server installation wizard. If you can not successfully start "start panel", directly to the installation media directory of the WAS directory, the implementation of install.exe / install.sh can.
Garbled: Launchpad or installation wizard displays WAS language and the local operating system language settings. If the local operating system language set to English, the WAS installation wizard will appear in Chinese. If you find that the wizard is displayed as garbled language, you can first local operating system language set to English, using English language to install WAS. This installed the WAS still have Chinese support, do not worry. export LANG=en_US In the Unix / Linux platforms, change the language to English using the following command: export LANG = en_US
WAS installation process may choose whether to install the sample application (samples), to the development environment and production environment, access to higher performance, do not install the samples. By omitting the sample, you can start the application server and save 60% time 15% of disk space; can save a considerable degree of process usage; and you can save each WAS product installation and application server profile creation time.
A running environment must contain at least one WAS profile. Therefore, WAS product installation process gives users the option to create the initial profile. If you installed the patch even after the WAS product, first proposed at this time do not choose to create any initial profile (Fig. 4), to save the time required for patching. If the profile was not created during installation, the installation will be displayed after the end of WAS products used to start the "create profile" wizard option.For the same reason, if you need to patch, and we will create a profile into the job after patching, so do not select the start here, "create profile" wizard.

Figure 4. Install file do not choose to create an initial outline


3.2. Patch

If you are using WAS version has been put on the market for some time, based on user testing and use, WAS will regularly publish patch (Fix Pack) or patches (Fix).Recommend that you install the patch in a test environment, ensure that the installation of the patch will not run on your negative impact on the environment, then install the patch to the production environment. Once you've gone through proper testing, take the initiative to install the patch to prevent, to avoid some may cause problems on your system fail. WAS V6.x patch upgrade patch upgrade strategy to understand details of the strategies. IBM support site and can download WAS WAS patch download patch.

In general, WAS patch naming specification: Version name - Product names - Product Component name - platform name - patch ID name. Pak. For example ,6.1.0-WS-WAS-SolarisSparc64-FP0000007. Pak, this is the WAS WAS V6.1 operating system components for the Solaris Sparc64 FP0000007 patch. If you install WAS, need product components and WAS named WASSDK patch; If you installed the IBM Http Server, IHS needs to product components called patches; if you need to install the product components Plugin patch called PLG . Typically, the same patch number of patches, first install WASSDK patch, then install WAS patch. After every patch of the process are:

1) copy the patch file to patch the installation directory of the maintenance facility directory;

2) plant in the patch installation directory, do the. / Update.sh command starts patch factory;

3) In the "installation directory" in the components chosen to Yaoda patch installation directory. Typically, on the WAS component patches installed automatically identify the location; for IBM Http Server (referred to as IHS) or Plug-in such components, need to select the correct installation position;

4) maintenance package selection page, select the patch you want to play.

3.3. Create a profile

Profile is used to define a set of run-time environment in which each profile is a group completely separate from the runtime environment. We mentioned earlier, there are three basic types of profile. Create a profile in the process, usually we have to understand the following details:

There are two ways to create a profile, create a graphical wizard and command line. Simple and intuitive to operate, we usually create a graphical wizard (Executive WAS_Home / bin / ProfileManagement / pmt.sh start the wizard).If you are installing 64-bit WAS, there is no tool for the graphical creation wizard. At this time, please use the. / Manageprofiles.sh command. export WAS_HOME=/opt/IBM/WebSphere/AppServer For example: In the UNIX platform to create an Application Server called AppSrv01 type of profile, use the following operation manageprofiles command: export WAS_HOME = / opt / IBM / WebSphere / AppServer
echo $WAS_HOME
cd $ WAS_HOME / bin
/ Manageprofiles.sh-create-profileName AppSrv01
-ProfilePath $ WAS_HOME/profiles/AppSrv01
-TemplatePath $ WAS_HOME / profileTemplates / default
-HostName kcgg1d7.itso.ibm.com-enableAdminSecurity true
-AdminUserName adminUser_ID-adminPassword adminPassword



Note that the command and parameters case sensitive.Manageprofiles command parameter syntax and more options, see the Redbook sg247304.pdf or information center.

In the "Confirm network configuration / host name to meet the requirements" section, referred to select the appropriate host name; create a profile (Figure 1) process, the majority of cases, the wizard automatically identifies the host name to meet the requirements, otherwise We need to fill in the wizard to profile an appropriate host name. In the same machine with the profile creation wizard to create multiple profile, the automatic recognition of host name may be added fully qualified domain name such as hosta.cn.ibm.com, it may be a short name of hosta. Both forms of support, but not in a cell (Cell refers to multiple instances of WAS consisting of a managed domain) name in the mix these two methods.
Create an application server profile process, you can apply to be selected to create the development environment or production environment using the application server instance. For example, development environment, developers can choose to use the template to create a server, developed the template for development purposes optimized configuration, reducing the WAS start time and allow the server to the function of less hardware to run.However, in a production environment, do not select "Use Development template.
 profile creation process, we can select "Enable management of safety," so the user during log management console, stop the WAS instance and other management tasks need to enter user name / password. Note that if you create the profile in the process of managing security is not enabled, or enable the management of security after the wish to modify the user name or password, can create the profile again after completion of modification (see "Managing Security").
Process can create a profile view / change the profile share of port.
Figure 5 shows the creation of this profile instance startup will take up the port, we can see the management console port is 9060, Http transfer port (that is, applications access to the port) is 9080.If you use the command line, create a profile wizard, not through the graphical display to see these ports, if you want to see the port, you can create a profile view profile obtained after the port values (see the "View / change the application server port"); If you want to modify these ports, you can create a profile using parameter-portsFile or-startingPort specified port. Of course, all these port values can be created in the profile changes again after completion.

Figure 5. Create a profile to display port


4. Necessary to adjust parameters

WAS installed in a production environment and create a complete summary of available files, the actual situation must be necessary to adjust parameters in order to improve WAS performance, easy error diagnosis.These parameters are usually combined with running the actual situation of the environment, the actual amount of concurrency and server resource utilization to adjust. Complete tuning involves operating system, application, application server and database integrated adjustment of specific parameters to be adjusted, meaning, see the resources mentioned in WAS resource monitoring and performance tuning section, for example, 17.5 sections Redbook sg246392 clear about the performance tuning usually involves adjusting the parameters and principles. In this paper, only the application server itself for a number of important parameters to adjust the guiding principles and lessons of experience, so that readers can quickly start:

Java Virtual Machine heap size (JVM Heap Size): control the JVM heap size of the code can use the unit M. The parameters of the server -> Application Server> Process Definition> Java Virtual Machine set. JVM maximum heap size of the default is 256M, in a production environment is usually the situation according to the machine physical memory, applications to set the operating characteristics, and most cases have to adjust this parameter large.Experience, memory is sufficient, the adjustment is usually between the 500M to 1024M. Note that the proposed maximum JVM Heap no more than 1024M, if the JVM Heap Size too large may lead to memory paging, or cause JVM garbage collection time is too long, but affect the application server performance.Tuning the Java virtual machine specific information, refer to the JVM parameters to adjust.
Web container thread pool: This parameter in the "Server> Application Server> server1> thread pool" and "WebContainer" in the set (Figure 6), the default value is 10 to 50. If the hardware resources allow, usually the maximum size of the thread pool transferred to 100.

Figure 6. Adjust the thread pool



Data source connection pool: the parameter in the resource -> JDBC-> Data Source -> data source name, select the "Connection Pool Settings" is set, the default size is 1 to 10. Queue based on the resource set (Queue) principle, from the Web container thread pool, to the data source connection pool parameter setting, should be both large and small pipe. We list the Web container in front of the thread pool's maximum setting of 100, for the data source connection pooling, set the maximum usually does not exceed 50. In most cases adjusted to 30.Actual operation can modify the value of this parameter to observe whether adjustments have a positive impact on performance. Note that if the maximum size of the database connection pool transfer too large, JVM limited resources are spent in maintaining the connection pool to handle the database connection, we may cause performance degradation WAS.
WAS process, the log parameters: WAS process logs are most commonly used SystemOut.log and SystemErr.log.The two log default size 1M, history, log file number 1.In a production environment, this setting is usually not sufficient to fully save an error message when a problem occurs.We can modify the default log size, the number of historical log files to store more information. Be careful not to single copies of the log file size is set too large (for example, more than 10M), or may affect the WAS performance.In addition, we propose to apply the log and the log points from WAS.If the application of large amounts of System.out.print or System.err.print to save the application state logs, may also affect server performance.

Figure 7. Modify the WAS log properties



Heapdump file: earlier we mentioned, Heapdump file on the disk space occupied by very quickly, so you can set parameters to Heapdump file IBM_HEAPDUMP stored in the specified directory.
Web server access logs access.log: IBM Http Server's access log access.log by default is turned on, which records the requests for information through the Http server. In highly concurrent systems, the log growth is over, when the log is too large, it may take up too much disk space or cause performance degradation, if your system does not need the logs, or other technical means to save the user access to information may close the log.Specifically: on IBM Http Server installation directory / conf directory under the httpd.conf file, search CustomLog, the with the # comment out the CustomLog line where you can.




5. Frequently daily management tasks

As the access control needs of the production environment, set up after the WebSphere environment, usually may be required to modify the application of access ports, or change the WAS administrator password, enable / disable management of security and so on.

5.1. View / Change application server ports

Application Server installation has finished, the production environment in order to avoid port conflicts, port access control, sometimes we need to view or change application server ports.

View port change application access ports by default, WAS administration console and application access are two different ports. Access Management Console or WAS WAS deployed applications, the port used by the application server and virtual host port decision. Suppose we want applications to access the port from 9080 into 9082 (the actual work, if there is no Web server, and some environmental applications will want to visit the port into a 80, a similar method), according to the following steps: Log Management Control WAS station, select the left menu Server - Application Server, click server1, select the "port", click "WC_defaulthost" (Figure 8), modify the port to any port you want (careful to avoid port conflicts), for example, 9082. Then click "OK. And then "Save."



Figure 8. Modify application access port



Then, select the menu on the left of the environment - a virtual host, click the "default_host", select the "Host Alias" (Figure 9), the original port 9080 change the previous application server / port / WC_defaulthost the same port, for example, 9082. Or click "New", the following changes in WC_defaulthost enter the port number, click "OK", "Save."


Figure 9. Modify the virtual host



Of course, if you are in front of application server / port / WC_defaulthost set the port has been in virtual host / default_host / host alias list, you do not need to do changes or new host alias port work. Was to ensure that the application server / port / WC_defaulthost port in virtual host / default_host host alias list. Changes take effect after restarting the WAS server.

WAS administrative console to change the port landing WAS Admin Console, select the left menu Server - Application Server, click server1 select "port. Then change the WC_adminhost hope for their own management console port.Then click "OK", "Save.Select the left menu environment - a virtual host, click on; and choose admin_host, select the "Host Alias.Into the original port 9060 and the previous application server / port / WC_adminhost same port, for example, 9063. Or click "New" to create a host alias, * 9063. And then "OK", "Save. Was to ensure that the application server / port / WC_adminhost port in virtual host / admin_host host alias list.

5.2. Management of security

Environmental requirements for the production of variability, the actual structures in the WAS environment, security may be involved in a variety of operations management.

Enable the management of security will be activated to enable management security to prevent unauthorized users from using the server's settings, simply, into the management console, change the application server configuration, stop the application server process, these management tasks are required to enter pre-defined user name and password to complete. By default, create a profile will enable the management of safety (Figure 9).If you did not create a profile select "Enable management of security", in the subsequent process of using it want to enable, you can by following these steps:

First into the console, for example: [url] http://was_ip:9060/admin [/ url], Note that it must be a logged in user to set the security of users.For example, admin. Select "Security"> "security management, application and infrastructure", then click on the "Security Configuration Wizard" (Figure 10).For configuration simplicity, in the "Specify the scope of protection", you can not choose the "Use Java 2 security to restrict application access to local resources"; in the "Select user repository" in the accept the default option, the user repository for the " Joint repository ", click" Next "; in the configuration repository, fill in the user user name, password. If you are a first time enable the management of security, enter a new user name (your login management console user name) and password. This user name password is arbitrary, does not require the operating system user, because the joint repository entries from the default user file; if previously enabled through the use of the repository management of security, the use of the repository holding management Members of privileged user name and password. Click "Next", "complete. Save the application server after the restart, then login management console, etc. need to provide your pre-defined user name / password.



Figure 10. Configuration management security



Disable disable management of security management console is simple, as shown in Figure 10, page, do not select "Enable Management Security", click the "Apply" to save and restart the application server. There is a special case, special, such as forgotten administrator password, this time we are unable to access management console, which can not be disabled in the management console management of security. At this time, from $ WAS_HOME / profiles / xxx Summary of the file name / bin directory, issue the following command: wsadmin-conntype NONE. When the wsadmin command line window appears, issue the following command: securityoff.




Figure 11. Manage Users



Forget administrator password if you forget the administrator password, we can not enter the management console to change the password. At this point, need to use the "Disable Security Management" section of the method wsadmin command to disable management of security, then "change the administrator password", once again, "enable the management of security" can be.

Management to create more user-management-enabled WAS security environment, there is only one default administrator ID, which means the same time only one person can log management console. This is more than the development team released the same WAS test environment is not easy. You can start to create a repository user, and then assign the user ID corresponding management role. Concrete steps are as follows: 1) Select the "Users and Groups"> "Manage Users", shown in Figure 24, click on "Add" to add a user ID, for example, admin1. Save. Save. 2) Select "Users and Groups"> "Manage User roles", shown in Figure 25, enter the user name (must be in the repository user name already exists), select the appropriate administrative role, for example, "Administrator . " Click "OK" to save. In this way, the next restart WAS, two users can simultaneously log management console.



Figure 12. Manage user roles



5.3. Backup / restore profile

Production environment, profile configuration is too complicated or frequently change, we need to regularly back up the profile in order to quickly recover when necessary. You can use the backup configuration file backupConfig command. For example, to back up the current configuration profile AppSrv01 available from $ WAS_HOME/profiles/AppSrv01/bin directory, issue the command backupConfig, it will AppSrv01 current default profile to generate a compressed package, you can also specify the name of the archive For example: backupConfig WebSphereConfig_2007_05_30.zip. Recovery configuration, use restoreConfig WebSphereConfig_2007_05_30.zip.

5.4. The right to uninstall WAS

Need to be reminded, WAS the uninstall process is not directly delete the directory, if you do, next time you may not be in the same machine successfully installed WAS. WAS uninstalling before the WAS process stop the machine, using ps-ef | grep java to ensure that no process was running. Then, the implementation of WAS_HOME / uninstall / uninstall.sh command to uninstall WAS. If for some special reason to uninstall wizard to guide the uninstall process is not successful (for example, you simply delete the WAS installation directory), or in the same directory you want to install WAS, please refer to the information center "manual uninstall" the advice given.



6. Application deployment

Application deployment usually involves several tasks as follows: Configure application environment required: such as the system variables, virtual host, class path, security, etc.; configure the resources needed for applications such as JMS resources, data sources and so on. One needs to note:

Application Package: Application deployed on WebSphere Application Server can be packaged *. ear / *. war file, it can be packaged, but not the components meet the J2EE specifications. In a production environment is recommended to use packaged *. ear / *. war file for easy version control and management. For complex projects, multiple J2EE components of the package, see the article "package on the J2EE application development project management."
Management Utility Jar pack: Most J2EE applications have some common Utility Jar package, first of all to emphasize is this: we must avoid in the same class load path exists multiple versions of the same class! In operation, this will bring a lot of strange and difficult to diagnose the problem. Second, the JDBC driver for a higher level of such common Utility Jar package, can be placed in / lib / ext directory; for multiple applications to share the Utility Jar, can be placed / lib / ext in can also be placed on shared library (shared library), the recommendation on the shared library in; for a single application to use the Utility Jar, and application can be packaged together or placed in the shared library. The use of shared libraries to avoid Utility Jar package multiple versions of chaos, and the Utility Jar package conflicts. Shared library configuration, see the Redbook sg247304 12.5.4 Step 4: Sharing utility JARs using shared libraries section.
Jar package conflicts: Jar package conflicts in large-scale Java software development frequently encountered, simply, when different applications use the public Utility Jar package, application server exists in the bottom of the Jar package the same name, and version of the different classes, we Jar package called the conflict. This solution to the problem can refer to the article on how to resolve Jar package in WebSphere in the conflict.
Session Timeout: scenarios for the different expectations of different applications different session timeout. WebSphere Application Server session management into Application server, Application, Web Module three levels. As the name suggests, in each particular level change of the session management configuration, the current level of play. Deployed in WebSphere Application Server on the application, the default session timeout is 30 minutes, the default session management level is the Application Server. If you expect to change your application, for example, DefaultApplication session timeout, may proceed as follows: Select the application> Application Name> session management (Figure 13), select "Overwrite Session Management", and "super-set time "in time to fill in the desired session timeout. Click "OK" to save the can.

Figure 13. Session Management



When writing Java applications need to configure environment variables when some variables can be used in the application server startup script-D parameter specified in the application server can also> application server name (for example, server1)> Process Definition> Java Virtual machine settings "General JVM parameter"-Daaa = xxx.


7. Conclusion

When a problem in the WAS environment, the most convenient is to use online resources to access relevant information. This article has too much respect, in order to achieve this goal: "to try to complete the primary users a quick start guide", I had an old tune here, please refer to where to learn WebSphere? Common understanding of WebSphere Application Server Online resources.

Understand the WAS process is gradual, and I hope this article can be installed in WAS sample documents and user's WebSphere production environment set up to provide a transition between the practice, save you time. From the engineer's point of view, a problem not a bad thing, a problem the more experience the more access to information, and through a variety of sources of technical support for IBM, I believe your experience using the WAS will be more beautiful

Tuesday, May 11, 2010

Some more portal faq

Q:
Is it possible to apply CSS for WCM rich-text editor?

A:
To get a consistent style of texts created with an authoring template, so the CSS is able to be applied into rich text editor. In the Content Form Properties you can define default styles and add your CSS file for rich text field in the Authoring template.


Q:
Is it possible to change subadmin groups of virtual portal after virtual portal was created?

A:
You are able to administer the subadministrators of a virtual portal as required by using the Portal Access Control of your initial portal installation: change the roles and access rights for subadministrators on portlets globally and before you create a virtual portal, configure the Virtual Portal Manager portlet accordingly; change the access rights for subadministrators specifically and after creating a virtual portal, use the Portal Access Control portlets.


Q:


Are there any portlets support for Microsoft Exchange 2007?



A:


Common Personal Information Management portlets (CPP) in WebSphere Portal 6 is focused on the Common Mail portlet. CPP includes the Common Mail and Common Calendar portlets. CPP provides a rich user interface, fully leverages portal services, and supports a range of PIM solutions that include Microsoft Exchange 2003, not 2007.


Q:
We have the TAM and portal integration with authentication, authorization, and credential vault, and I was wondering if this credential vault also has the GSO information or if portal stores the additional credentials in some other way?

A:
WebSphere Portal supports the storage and retrieval of credentials from other vault services, such as Tivoli Access Manager. WebSphere Portal includes a vault adapter to access the Tivoli Access Manager Global Sign-on (GSO) lockbox. Any existing Tivoli resource or resource credentials can be used in your portlets that access the credential vault service without any additional configuration. In addition, the credential vault service and credential vault management portlet can create new or update existing GSO lockbox entries. However, users who are storing credentials in the accessmanagervault.properties file must be defined in Tivoli Access Manager as global signon (GSO) users.


Q:
How do I use the category query string functionality inside the Menu element?



A:
In the menu element search properties, we may define the search for content items that are profiled using specific categories; under this setting, you are able to enter a query string parameter in the properties in order to search and get related content items.

Q:
Is batch-editing the author of content in WCM possible?

A:
Yes, You will able to do this by using WCM API. There are getAuthors, removeAuthors and addAuthors API calls available.


Q:
Is it possible to search WCM content by authors via WCM API?

A:
No, there is no direct call to get docIds for a particular author.


Q:
How can I fetch a static HTML page to the portal through FileServer portlet using absolute path?

A:
It is not possible to use absolute path. Only a relative path can be specified in that portlet. This is correctly described in the Help information of the Fileserver portlet. The file to be displayed has to reside in the the ear or war file of the Fileserver portlet.


Q:
Is it possible to configure the content of the e-mail notification in WCM?

A:
No. It is only possible to include static text in the content of email notification.

Q:
How can I control WCM Design components (e.g. Authoring Template, Presentation Template) so that it can only be used by Content Developers after getting approval?

A:
By default, WCM does not enable workflow on WCM Design components; only content items. However, workflow for design items can be enabled by editing the WCMConfigService.properties. For example, to apply workflow to Templates, append the following:

control.Template=com.aptrix.pluto.workflow.WorkflowControl

Q:
How can I analyze and audit the content in a WCM installation?

A:
WCM does not come with a built-in auditing service, unlike the core Portal. Consider using a 3rd party content auditing tool like Vamosa (well tested with WCM).

Q:
How do I ensure a Portal i5/OS installation is properly cleaned before trying to complete a Portal installation again?

A:
1. Try to remove the portal server profile wp_profile (both server1 and Websphere_Portal) from the HTTP admin. Continue with step 2 whether this fails or not.
2. Uninstall Portal. Make sure it finishes successfully.
3. Remove the wp_profile directory under /QIBM/UserData/WebSphere/AppServer/V6/Base/profiles and remove the PortalExpress directory under /QIBM/ProdData/ if they still exist.
4. Delete all Portal databases if they still exist. These databases normally start with WP. There should be 6 - 8 databases with the following names assuming you only have one portal profile on the system:

WPECMM.LIB
WPECST.LIB
WPEDGN.LIB
WPEFDB.LIB
WPEJCR.LIB
WPELKM.LIB
WPEREL.LIB
WPESYNC.LIB

5. Make sure the user profile wpdb2ins doesn't exist on the AS400.
6. Make sure the directory wpdb2ins doesn't exist under /home
7. Delete the library wpdb2ins.lib, if it still exists.
8. Delete the library QWPE6001 if it still exists.
9. Make sure you are using a user profile that has *SECOFR and *ALLOBJ authority to the system
10. Only install the portal code first without configuring a new server
11. After installation finishes, check the contents of the library QWPE6001 to see if it contains save files.
12. Make sure QEJBSVR still has a password and it is enabled.
13. If all is ok, try to configure a new Portal server from the HTTP admin


Q:


How do I reset the state of a WPF portlet when navigating back to the page from another page by clicking a Portal page tab?



A:


In order to reset the state of a WPF portlet when clicking a Portal page tab, modify the Portal theme as per Technote "How to create a theme that does not preserve the state when navigating from page to page".


Q:


What is the Best Practice to migrate content from WCM 2.0.2 to WCM 6.0 and not maintain its version?



A:


1. Migrate everything from 2.0.2. to 5.1.0.X. I would recommend migrating to a 5.1.0.5 system (they might run into PK13120 on a lower WCM version).
2. Syndicate only live items from this 5105 system to another 5105 system. This will ensure that versions will not get syndicated but will also cause any draft items not to get syndicated.
3. Migrate from WP 5105 server to the 6.0.X server with no versions but only live content.

Q:
How can the WCM Rich Text Editor (RTE) be customized to turn off certain feature buttons?

A:
It cannot be done with the out-of-the-box RTE. The RTE must be replaced with a more powerful one. The available options are:

1) Ephox EditLive! is the recommended RTE for WCM integration; it has more flexibility, power and is tested to work with WCM.
2) Other possible RTEs might be like OpenSource RTEs such as FCKEditor and TinyMCE. However, no tight integration is available with WCM; there is a need to write custom integration code. This has been done before.

Q:
Do I need to restart the Subscriber Portal after changing the syndication interval at syndicator end and rebooting the Syndicator Portal?

A:
No, you do not need to restart the Subscriber Portal if it is a one way syndication. According to the WCM Syndication Design, the SYNDICATOR initiates the syndication. So in the case of one way syndication, you only need to restart the Syndicator. However, in the case of two way syndication you need to restart both servers since both are acting as Syndicators!

Q:
Is it possible to have two syndicator on one portal, each having a different syndication frequency?

A:
Currently, WCM has no way to automatically syndicate libraries on a varied or different schedule. All libraries, and more importantly all syndicator / subscriber pairs, are triggered based on the itemChangedTaskDelay value in the WCMConfigService.properties file. More simply put, the itemChangedTaskDelay defines a system wide timer for all syndication events. The only way to get around this is to utilize manual syndication for varying libraries.


Q:
Is it possible to push a single content from Authoring to delivery server without syndicating the Library?

A:
In WCM 6.0.x, it is not possible. The smallest syndication granularity you can obtain is at the Library level.


Q:
How do I share Portlet and HTTP Session without the use of Application scope?

A:
Under JSR168 standard, session sharing between portlets and servlets are difficult at best. Wait until Portal supports JSR286. As per the article below, shared session across Web applications will be in the standard:

Comment lines: Stefan Hepper: Why you should take an early look at the Java Portlet Specification V2.0
====================================================================
# Shared session attributes -- for sharing session data beyond the current Web application.

JSR 286 provides the shared session attributes that can be shared across Web applications. In the portlet.xml file, you can define the attributesthat are shareable declaratively, and then use the existing portlet session APIs and the application session scope to share this attribute across Web applications.

Q:
Why I cannot see newly created items in my search results?

A:
As the search indexes are updated periodically, the newly created items will appear in search results after the search index is updated.

Q:
Is it possible to implement a solution where if my primary LDAP server fails, WebSphere Portal redirects their requests to my secondary LDAP server at runtime?

A:
Yes, it is possible to implement LDAP failover in WebSphere Portal.

Q:
Is it possible to use Sametime Portlets with other Portals other than WebSphere Portal?

A:
No, It is not possible to use Sametime Portlets with other portals as they use IBM Portlet API and not JSR 168 compliant API.

portal faqs

Q:


How can I change a realm’s name after I made the configuration?




A:


Remember to back up the wimconfig.xml file, located in /config/cells/ cellname/wim/config/.

Two methods, Manually edit wimconfiq.xml file and replace as below,


name="oldPortalRealm" securityUse="active"
allowOperationIfReposDown="false">

Or

Run ConfigEngine.bat wp-rename-realm after
adding/modifying the following properties in the wkplc.properties file:
realmName=oldPortalRealm
newRealmName=newPortalRealm



Q:


Can I change a realm’s name after I made the configuration?



A:


Yes you can.

Q:


Why after I deploy my Lotus workflow the workflow process still refers to the previous environment?




A:


There is some workflow need to be activated so the workflow will pick up the new database parameters. To activate your workflow, please refer the following steps;
1. Start Lotus Workflow Architect and open the process you want to modify.
2. From the toolbar, select File -> activate Process.
3. Click OK, a warning dialog is displayed. On the warning dialog, Click Yes.



Q:


Can I use multiple LDAP in a realm?



A:


Yes, you can. To configure the LDAP in realm. Please refer to the WebSphere Portal Information Center under title; Adding realm support in Windows (depends on your Operating System)

Q:


Why did when I run the IBM Web Content Management (WCM) MemberFixer tool using URL, I will get this ClassNotFoundException error?




A:


This solve this, do add a File Repository using the "Use built-in repository" button on the Manage Repositories page, there is an InternalFileRepository category and you will need to restart the server. When Portal is configured to use the federated repository, there is only an LDAP repository on the Federate Repositories page.



Q:


Can I disable workflow action in IBM Web Content Management 6.0.x?



A:


Yes you can by using text editor to modify the system's [WPS_ROOT]
\wcm\shared\app\config\wcmservices\ WCMConfigService.properties file.

Add a property named "disableWorkflowAction". Use a comma to separate the workflow action name that you want to disable, for example, disableWorkflowAction=ScheduledMoveAction1, ScheduledMoveAction2

Q:


How and can I implement workflow to Blogs and Wiki in Lotus Quickr?




A:


Yes you can by using use Form and choose form type either Wiki Page or Blog Entry. But first you will need to click on Customize this place in Wiki Place or Blog.



Q:


What is the least requirement for WebSphere Portal v6.01.3 for WebSphere Process?



A:


You will need at least WebSphere Process Server V6.0.2.2 together with WebSphere Application Server V6.0.2.23.

Q:


Can I use DB2 v9.x with WebSphere Everyplace Mobile Portal v6.0 (WEMP)?




A:


Only DB2 v8.1 is supported for WEMP.



Q:


Can WebSphere Portlet Factory connect with SQL Analysis Service?



A:


No. SQL Analysis Service is not supported for WebSphere Portlet Factory.

Q:


What is the mandatory source WebSphere Portal version to migrate to WebSphere Portal 6.1?




A:


Your version of portal must be at least WebSphere Portal 6.0.1.1.



Q:


How can I change the port number after I have installed WebSphere Portal?



A:


You have to stop the WebSphere Application Server and WebSphere Portal. Execute these two commands
ConfigEngine.bat modify-ports-by-startport -
DModifyPortsServer=servername -
DStartPort=starting port number
ConfigEngine.bat modify-ports-by-portsfile -
DModifyPortsServer=servername -
DPortsFile=full path to ports file
After executing the above commands, you have to restart your servers.

Some portal faqs

Q:Why does portlet become active even it was inactive before publishing?

A:Under the 'Portlet Publishing' section, "create pages for portlets" was selected by default setting, which creates a page on the portal server under the default label "Rational Portlets" and adds the published portlet to the page. So when you deselect it, portlet is inactive.

Q:How to let Dojo css are not being loaded on blank page?

A:When developing components that use Dojo, you must be aware of the way WebSphere Portal uses Dojo, as well as tips and restrictions when using Dojo. Please create a new theme, called no_dojo, which only contains this page without loading dojo; other pages still are maintained in your default theme, in order to avoid unknown mistakes.

Q:What is Syndication in Web Content Management?

A:Syndication is a method used by IBM Lotus Web Content Management to replicate data from a Web content library on one server to a Web content library on another server.

Q:Instead of using the Deployment Manager, is there any way I can update my common portlet across cluster?

A:Yes, you can use XML configuration interface.

Q:How can I deploy portlet that are unique to a cluster?

A:You can use either the Portal Administration User interface or the XML Configuration Interface.

Q:Can I have duplicate node names in a cell in a cluster environment?

A:No, you will need to rename the node in the deployment manager using IBM WebSphere Application Server command, renameNode.

Q:How to activate a portlet?

A:Run ConfigEngine.bat activate-portlets

Q:What is administrative portlets?

A:Administrative portlets include all of the portlets that appear on the administrative pages when you navigate to Administration.

Q:Is there another way to import XML besides using command prompt?

A:Yes, you may use Import XML portlet. Just navigate to Administration -> Portal Settings -> Import XML

Q:How to customize a theme?

A:You may use Inline Theme Customizer or Theme Customizer in Portal Administration.

Q:How to enable Parallel Portlet Rendering in portlet level?

A:You may change it here:

Select Portal Administration > Portlet Management > Portlets.
Select the desired portlet and click on the Configure (wrench) icon. The portal displays the panel for configuring the portlet.
Mark the Enable parallel rendering checkbox to enable parallel rendering for the portlet.