WEB2014. 8. 5. 09:40

OHS 12c에서는 ohs component start/stop 수행 시, nodemanager에 connect 하기 위한 password 입력이 꼭 필요합니다. 

 

[weblogic@linuxdev bin]$ ./startComponent.sh testWeb
Starting System Component testWeb ...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Reading domain from /oracle/web/ohs121200/domains/testDomain
 
Please enter your password :
Connecting to Node Manager ...
Successfully Connected to Node Manager.
Starting server testWeb ...
Successfully started server testWeb ...
Successfully disconnected from Node Manager.


Exiting WebLogic Scripting Tool.

Done

 

하지만, 매번 password를 입력해야 하는 번거로움을 피하기 위해서는 storeUserConfig 라는 옵션으로 cfg(config)와 key를 생성해 주시면 됩니다.

 

cmd > ./startComponent.sh [component name] storeUserConfig

 

storeUserConfig 옵션이 추가되면, password 입력 후에 "Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Do you want to create the key file? y or n"라는 메시지를 확인할 수 있습니다.

 

이 때, "y"를 입력하면, 사용자 홈디렉토리에 .wlst/nm-cfg-[domain name].props, .wlst/nm-key-[domain name].props 두 개의 파일이 생성되는 것을 확인할 수 있습니다.

 

[weblogic@linuxdev bin]$ ./startComponent.sh testWeb storeUserConfig
Starting System Component testWeb ...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Reading domain from /oracle/web/ohs121200/domains/testDomain
 
Please enter your password :
Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Do you want to create the key file? y or n
The username and password that were used for this WebLogic NodeManager connection are stored in /home/weblogic/.wlst/nm-cfg-testDomain.props and /home/weblogic/.wlst/nm-key-testDomain.props.
Connecting to Node Manager ...
Successfully Connected to Node Manager.
Starting server testWeb ...
Successfully started server testWeb ...
Successfully disconnected from Node Manager.


Exiting WebLogic Scripting Tool.

Done

 

cfg와 key 파일이 한 번 생성되면, 더 이상 password를 체크하지 않습니다. 또한 storeUserConfig 옵션을 사용할 필요도 없습니다. (cfg, key를 생성할 때만 사용)

 

반대로 사용자 홈디렉토리에서 cfg, key 파일을 삭제하면, 다시 password 입력을 요청하게 됩니다.

[출처] [OHS] OHS 12.1.2 start/stop component password 생략 방법|작성자 시후아빠

 

 


 

 

추가적으로 Oracle Support 문서 내용...

How to avoid password prompt when using startComponent.sh to start OHS 12c (문서 ID 1671654.1)

Applies to: 
 Oracle Fusion Middleware - Version 12.1.2.0.0 and later
Oracle HTTP Server - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Goal

When starting OHS , the following  password prompt appears: 

 ./startComponent.sh ohs1

Starting System Component ohs1 ...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Reading domain from /opt/ows/Oracle/Middleware/OHS_Home/user_projects/domains/base_domain

Please enter your password :

How to avoid this prompt?

Solution

You can avoid password every time you launch the server with startComponent.sh/.cmd by starting it with the storeUserConfig option for the first time. Do the following:

1.At the prompt, enter the following command: 

$DOMAIN_HOME/bin/startComponent.sh componentName storeUserConfig

Please enter your password :

The system will prompt for your Node Manager password.

2.Type the password and press Enter. The system responds with this message: 

 Creating a key file can reduce the security of your system if it is not a secured location after it is created. Do you want to create the key file? y or n.

3.Type y to store your Node manager password. When you subsequently use this command, you will not need to enter a password. 

It creates hidden files in the users home directory after the above steps.
These files contain domain infomation. 

 for example

.wlst/nm-key-base_domain.props
.wlst/nm-cfg-base_domain.props

When using startComponent.sh to start and stop OHS 12c after the above steps,
password prompt is omitted.

How to return to the original operation

1.stop OHS
2.delete hidden files in the users home directory. 

 for example

.wlst/nm-key-base_domain.props
.wlst/nm-cfg-base_domain.props

By removing the files , you will be prompted for the password used to configure the component.
Posted by 달콤한녀석

댓글을 달아 주세요