- Oracle WebLogic Server 12c Advanced Administration Cookbook
- Dalton Iwazaki
- 366字
- 2021-08-20 16:48:44
Distributing the domain files to remote machines
A new domain is installed and configured in one machine (prod01
). Since the architecture includes another machine (prod02
), the domain files now have to be distributed in all the machines of the domain.
This recipe contains the steps to distribute the files either by using the built-in WebLogic tools pack
and unpack
or by copying them manually in the command line of the shell.
Getting ready
Create a new template of the domain using the pack
command in the prod01
machine. With the template created in prod01
, use the unpack
command to distribute the files to the machine prod02
(and to all machines used by the WebLogic cluster).
How to do it...
Carry out the following steps to distribute the domain files:
- Log in as a
wls
user on the first machineprod01
and navigate to the folder:[wls@prod01]$ cd $WL_HOME/common/bin
- Run the following command:
[wls@prod01]$ ./pack.sh -domain=$DOMAIN_HOME-template=$WL_HOME/common/templates/domains/PROD_DOMAIN_template.jar -template_name=PROD_DOMAIN –managed=true
A file
$WL_HOME/common/templates/domains/PROD_DOMAIN_template.jar
will be created. - Log in as a
wls
user on the second machineprod02
and copy the template fromprod01
toprod02
:[wls@prod02]$ scp wls@prod01:$WL_HOME/common/templates/domains/PROD_DOMAIN_template.jar $WL_HOME/common/templates/domains/
- Run the following commands to unpack the template:
[wls@prod02]$ cd $WL_HOME/common/bin [wls@prod02]$ ./unpack.sh -template=$WL_HOME/common/templates/domains/PROD_DOMAIN_template.jar –domain=$DOMAIN_HOME
How it works...
The unpack
command will create the necessary files to host the WebLogic domain PROD_DOMAIN
on the prod02
machine based on the template created with the pack
command on prod01
.
An entry to the PROD_DOMAIN
domain will automatically be added to the nodemanager.properties
file.
There's more...
We can also distribute the WebLogic domain files manually. In this section, we will see how this can be achieved.
Distributing WebLogic domain files manually
You can simply copy the domain files manually too; just don't forget to edit the nodemanager.domains
file and add the domain entry.
As in the prior chapter and the rest of the book, the $DOMAIN_HOME
environment variable points to the/oracle/Middleware/user_projects/domains/PROD_DOMAIN
directory.
- Log in as a
wls
user on the machineprod02
and copy the domain fromprod01
:[wls@prod02]$ mkdir –p $DOMAIN_HOME [wls@prod02]$ scp –rp wls@prod01:$DOMAIN_HOME $DOMAIN_HOME/..
- Edit the
nodemanager.domains
file:[wls@prod01]$ vi $WL_HOME/common/nodemanager/nodemanager.domains
- Add the following entry if it doesn't exist:
PROD_DOMAIN=/oracle/Middleware/user_projects/domains/PROD_DOMAIN/
See also
- Starting the Node Manager
- 32位嵌入式系統與SoC設計導論
- 機器學習及應用(在線實驗+在線自測)
- 極簡AI入門:一本書讀懂人工智能思維與應用
- 工業機器人入門實用教程(KUKA機器人)
- Multimedia Programming with Pure Data
- Cloudera Administration Handbook
- 計算機網絡安全
- 項目管理成功利器Project 2007全程解析
- 云原生架構進階實戰
- ESP8266 Robotics Projects
- 人工智能:語言智能處理
- Mastering OpenStack(Second Edition)
- Cortex-M3嵌入式處理器原理與應用
- Mastering DynamoDB
- 大話數據科學:大數據與機器學習實戰(基于R語言)