How to Change Admin Server Name in a WebLogic Server (WLS) Domain
Renaming the Admin Server in a WebLogic Server (WLS) domain involves using a WLST (WebLogic Scripting Tool) script in offline mode. Below is a detailed guide for performing this task.
Pre-requisites:
- Domain Shutdown: Before starting the renaming process, ensure the entire WebLogic domain is completely shut down to avoid any conflicts or inconsistencies.
- Backup: Take a full backup of the WebLogic domain directory to safeguard against any unintended changes.
Steps to Rename Admin Server
Step 1: Rename the Admin Server Using a WLST Script
- Open a terminal or shell on the WebLogic server.
- Start the WLST utility in offline mode. You can start it using the following command:
Replace $WL_HOME
with the actual WebLogic installation directory.
Use the following sample WLST script to rename the Admin Server:
readDomain('path/to/domainDir')
: Reads the domain configuration from the specified domain directory.cmo.setName('NewAdminServerName')
: Updates the Admin Server name to the new one. Replace'NewAdminServerName'
with your desired name.updateDomain()
: Saves the updated configuration.
Step 2: Update Domain Files and Folders
After successfully renaming the Admin Server, update the domain files and folder structure as follows:
Adjust Domain Scripts:
- Open the
$DOMAIN_HOME/bin
directory. - Update all scripts (e.g.,
startWebLogic.sh
,setDomainEnv.sh
, and other custom scripts) that reference the old Admin Server name (AdminServer
) to use the new name (NewAdminServerName
).
Update Security Folder:
Move or rename thesecurity
folder associated with the Admin Server:
This allows the renamed server to reuse the boot.properties
file without needing to re-enter credentials.Update Server Directory Structure:
Rename the Admin Server’s directory in the$DOMAIN_HOME/servers
path:
Post-Renaming Checks
- Start the WebLogic domain and ensure that the renamed Admin Server starts successfully:
- Log in to the WebLogic Administration Console to verify that the Admin Server is functioning correctly with its new name.
- Test connectivity to the Admin Server and ensure all managed servers in the domain recognize the renamed Admin Server.
Post a Comment
Post a Comment