UpdatePortalURI - cws-khuntly/WebSphere GitHub Wiki
date: 2025-05-08 14:11:33 created: 2025-05-08 14:11:27 categories:
- WebSphere / Server Build / Portal Server / Primary Node / Change Portal URI
Login to the Portal host via SSH
Export the profile name variable:
declare -x PROFILE_NAME=XXX
Source setupCmdLine.sh:
source /opt/IBM/WebSphere/profiles/${PROFILE_NAME}/bin/setupCmdLine.sh
Export the WAS_INSTALL_ROOT variable:
declare -x WAS_INSTALL_ROOT="/opt/IBM/WebSphere/AppServer"
Export the deployment manager hostname:
declare -x DMGR_HOSTNAME=XXX
Export the new context root:
declare CONTEXT_ROOT=XXX
Create a working copy of the workplace database domain property file:
cp /nfs/software/WebSphere/PortalServer/properties/wkplc.properties ${HOME}/workspace/WebSphere/PortalServer/properties/${ENV}/ConfigEngine/wkplc.properties
Update the workplace property files to include the Deployment Manager hostname:
sed -i.$(date +"%d-%m-%Y_%H-%M-%S").bk -e "s/WasRemoteHost=.*/WasRemoteHost=${DMGR_HOSTNAME}/" ${HOME}/workspace/WebSphere/PortalServer/properties/${ENV}/ConfigEngine/wkplc.properties
Set file security:
chmod 600 ${HOME}/workspace/WebSphere/PortalServer/properties/${ENV}/ConfigEngine/wkplc_dbdomain.properties
Copy the resultant file to the Portal Config Engine:
cp ${HOME}/workspace/WebSphere/PortalServer/properties/ConfigEngine/wkplc.properties ${USER_INSTALL_ROOT}/ConfigEngine/properties/wkplc.properties
Execute the following commands:
${USER_INSTALL_ROOT}/ConfigEngine/ConfigEngine.sh \
-DValidationWpsContextRoot=${CONTEXT_ROOT} -DValidationWpsDefaultHome=portal \
-DValidationWpsPersonalizedHome=myportal -DValidationWsrpContextRoot=${CONTEXT_ROOT}/wsrp \
validate-context-root
${USER_INSTALL_ROOT}/ConfigEngine/ConfigEngine.sh stop-portal-server
${USER_INSTALL_ROOT}/ConfigEngine/ConfigEngine.sh \
-DWpsContextRoot=${CONTEXT_ROOT} -DWpsDefaultHome=portal \
-DWpsPersonalizedHome=myportal -DWsrpContextRoot=${CONTEXT_ROOT}/wsrp \
modify-servlet-path modify-servlet-path-portlets
${USER_INSTALL_ROOT}/ConfigEngine/ConfigEngine.sh stop-portal-server
Update the workplace property files to include the Deployment Manager hostname:
sed -i.$(date +"%d-%m-%Y_%H-%M-%S").bk -e "s/WpsContextRoot=.*/WpsContextRoot=${CONTEXT_ROOT}/" ${HOME}/workspace/WebSphere/PortalServer/properties/${ENV}/ConfigEngine/wkplc.properties
Copy the resultant file to the Portal Config Engine:
cp ${HOME}/workspace/WebSphere/PortalServer/properties/ConfigEngine/wkplc.properties ${USER_INSTALL_ROOT}/ConfigEngine/properties/wkplc.properties
Stop the node agent and perform a nodesync:
${USER_INSTALL_ROOT}/bin/stopNode.sh
${USER_INSTALL_ROOT}/bin/syncNode.sh ${DMGR_HOSTNAME} 8879 -restart
${USER_INSTALL_ROOT}/bin/startServer.sh WebSphere_Portal
Continue the URI change process:
${USER_INSTALL_ROOT}/ConfigEngine/ConfigEngine.sh configure-nav-stateinfo-urls
[Create the webserver definitions](onenote:IHS.one#Create DMGR scripts§ion-id={D79AD275-D189-4BDF-A625-A5FA484D7377}&page-id={02A863C1-410E-417F-8F7D-880E09899B61}&end&base-path=C:\Repositories\WebSphere\Documentation\WebSphere\WebSphere)
Resync:
${USER_INSTALL_ROOT}/bin/stopServer.sh WebSphere_Portal
${USER_INSTALL_ROOT}/bin/stopNode.sh
${USER_INSTALL_ROOT}/bin/syncNode.sh ${DMGR_HOSTNAME} 8879 -restart
${USER_INSTALL_ROOT}/bin/startServer.sh WebSphere_Portal
[Update the Web Resources v70 Library](onenote:#Update Web Resources library§ion-id={5A2B23FD-459E-41BA-8047-B07D4BBF2CB9}&page-id={5DEA8216-CB78-4E30-A2DE-5DA8484E72A0}&end&base-path=https://d.docs.live.net/695f42c59c29bbc9/Documents/WebSphere/Documentation/WebSphere/WebSphere/Portal%20Server%20Build.one)
[Update Portal search collections](onenote:#Update Portal search collections§ion-id={5A2B23FD-459E-41BA-8047-B07D4BBF2CB9}&page-id={DECB1732-1E0C-4886-A192-EF6567A2AEFB}&end&base-path=https://d.docs.live.net/695f42c59c29bbc9/Documents/WebSphere/Documentation/WebSphere/WebSphere/Portal%20Server%20Build.one)
Resync:
${USER_INSTALL_ROOT}/bin/stopServer.sh WebSphere_Portal
${USER_INSTALL_ROOT}/bin/stopNode.sh
${USER_INSTALL_ROOT}/bin/syncNode.sh ${DMGR_HOSTNAME} 8879 -restart
${USER_INSTALL_ROOT}/bin/startServer.sh WebSphere_Portal