WebLogic Server安装

2021年11月27日 · 缤纷网络 · 723次阅读

WebLogic Server安装

1.安装java环境

2.创建weblogic用户

# useradd weblogic

# passwd weblogic

# su - weblogic

$ java -version

3.安装准备

$ vim wls.rsp #创建响应文件

[ENGINE]

#DO NOT CHANGE THIS.

Response File Version=1.0.0.0.0

[GENERIC]

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home

ORACLE_HOME=/home/weblogic/oracle               #指定weblogic安装目录,自动创建

#Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples.

INSTALL_TYPE=WebLogic Server

#Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name.

MYORACLESUPPORT_USERNAME=

#Provide the My Oracle Support Password

MYORACLESUPPORT_PASSWORD=<SECURE VALUE>

#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration

DECLINE_SECURITY_UPDATES=true

#Set this to true if My Oracle Support Password is specified

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

#Provide the Proxy Host

PROXY_HOST=

#Provide the Proxy Port

PROXY_PORT=

#Provide the Proxy Username

PROXY_USER=

#Provide the Proxy Password

PROXY_PWD=<SECURE VALUE>

#Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port]

COLLECTOR_SUPPORTHUB_URL=

$ vim oraInst.loc #创建Loc文件

inventory_loc=/home/weblogic/oraInventory

inst_group=weblogic

4.安装weblogic

# cp -r fmw_12.2.1.4.0_wls.jar /home/weblogic/

# chown -R weblogic:weblogic /home/weblogic/

# su - weblogic

$ chmod +x fmw_12.2.1.4.0_wls.jar

$ java -jar fmw_12.2.1.4.0_wls.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc ORACLE_HOME=/home/weblogic/oracle          #静默安装,需要绝对路径

Copying Files...
-----------20%----------40%----------60%----------80%--------100%

The installation of WebLogic Server 12.1.2.0.0 completed successfully.

5.创建domain(域)

纯命令行创建:

$ export MW_HOME="/home/weblogic/oracle"

$ export WL_HOME="/home/weblogic/oracle/oracle_common"

$ cd /home/weblogic/oracle/wlserver/common/bin/

$ ./commEnv.sh

$ ./wlst.sh

wls:/offline> readTemplate('/home/weblogic/oracle/wlserver/common/templates/wls/wls.jar')                             

wls:/offline/base_domain>cd('Servers/AdminServer')

wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','')

wls:/offline/base_domain/Server/AdminServer>set('ListenPort',7001)

wls:/offline/base_domain/Server/AdminServer>cd('../..')

wls:/offline/base_domain>cd('Security/base_domain/User/weblogic')               #用户为weblogic

wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('weblogic1')                  #密码是weblogic1

wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain','true')

wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/home/weblogic/oracle/user_projects/domains/base_domain')

wls:/offline/base_domain/Security/base_domain/User/weblogic>closeTemplate()

wls:/offline>exit()

参数文件创建:

$ cd /home/weblogic/oracle/wlserver/common/bin/

$ vim create_domains.py
readTemplate('/home/weblogic/oracle/wlserver/common/templates/wls/wls.jar')
cd('Servers/AdminServer')
set('ListenAddress','')
set('ListenPort', 7001)
cd('/Security/base_domain/User/weblogic')
cmo.setPassword('weblogic1')
setOption('OverwriteDomain', 'true')
writeDomain('/home/weblogic/oracle/user_projects/domains/base_domain')

closeTemplate()
exit()
$ ./wlst.sh ./create_domains.py

6.启动weblogic

$ cd /home/weblogic/oracle/user_projects/domains/base_domain/bin/

$ ./startWebLogic.sh

$ netstat -lntp |grep java

访问http://ip:7001/console/login/LoginForm.jsp,出现登录页面,输入用户密码登录

参考内容

https://blog.csdn.net/miss1181248983/article/details/90376302

https://www.javazxz.com/thread-7818-1-1.html

标签:weblogic

最后编辑于:2021-11-27 18:06