English English French French Spanish Spanish German German
Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

How to rename weblogic domain name?

Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

If you are working on migration environment where often you need to rename the domain name, then this guide will help you.

Changing WebLogic domain name is possible with modifying certain files under your domain.

This, I tested in a development environment and worked well for me. 

In this exercise – I have renamed from base_domain to new_domain

  • Take complete backup of your domain
  • Copy old domain name folder to new domain name
cp –rp base_domain new_domain
  • Search all files which contain base_domain in newly copied folder
chandan$ grep -r * base_domain --exclude-dir={tmp,logs,data,domain_bak}  
base_domain/config/config.xml:  <name>base_domain</name>
base_domain/config/config.xml:    <name>base_domain</name>
base_domain/config/config.xml:    <name>base_domain</name>
base_domain/init-info/startscript.xml: <value>/Users/chandan/weblogic/base_domain</value>
chandans-imac:weblogic chandan$
  • Modify base_domain to new_domain in all above files. You can use sed to modify or manually you can do one by one. The choice is yours.
grep -r base_domain * --exclude-dir={tmp,logs,data,domain_bak} | xargs sed –I ‘s/base_domain/new_domain/g’
  • Ensure none of the files are having base_domain
bash-3.2$ grep -r base_domain * --exclude-dir={tmp,logs,data,domain_bak}
  • Go to AdminServer folder and delete cache, data, tmp folder
bash-3.2$ pwd 
bash-3.2$ rm -rf cache/ data/ tmp/
  • Go to your New Domain and start Weblogic
chandans-imac:bin chandan$ pwd  
chandans-imac:bin chandan$
bash-3.2$ ./startWebLogic.sh
<Jan 8, 2013 11:32:53 PM SGT> <Notice> <WebLogicServer> <BEA-000329> <Started WebLogic Admin Server "AdminServer" for  domain "new_domain" running in Production Mode>
<Jan 8, 2013 11:32:53 PM SGT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<Jan 8, 2013 11:32:53 PM SGT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

That’s all! I started WebLogic managed server as well with no issues.

Learn more about Oracle Weblogic Administration here.

Thanks to our Sponsors
More great readings on Development
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder