目录

WebLogic Server安装

# WebLogic Server安装

# 1.安装java环境

# 2.创建weblogic用户

# useradd weblogic

# passwd weblogic

# su - weblogic

$ java -version
1
2
3
4
5
6
7

# 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=
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

$ vim oraInst.loc #创建Loc文件

inventory_loc=/home/weblogic/oraInventory

inst_group=weblogic
1
2
3

# 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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# 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()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

# 参数文件创建:

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

$ vim create_domains.py
1
2
3
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()
1
2
3
4
5
6
7
8
9
10
11
$ ./wlst.sh ./create_domains.py
1

# 6.启动weblogic

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

$ ./startWebLogic.sh

$ netstat -lntp |grep java
1
2
3
4
5

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

# 参考内容

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

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

上次更新: 2024/03/20, 23:57:47
最近更新
01
使用 acme.sh 自动化SSL证书管理
03-25
02
COSCLI 的使用记录
03-25
03
腾讯云命令行工具 TCCLI
03-25
更多文章>