Redhat 7.9x64 安装 weblogic 12.2.1.4.0


安装包(jdk + weblogic):

https://www.oracle.com/java/technologies/downloads/#java8

https://download.oracle.com/otn/java/jdk/8u311-b11/4d5417147a92418ea8b615e228bb6935/jdk-8u311-linux-x64.tar.gz

https://www.oracle.com/middleware/technologies/weblogic-server-installers-downloads.html

下载中间那个826M 的,文件名为: fmw_12.2.1.4.0_wls_Disk1_1of1.zip

1、root创建用户、组

groupadd weblogic

useradd -g weblogic weblogic

2、创建安装目录并指定目录用户及属组

mkdir -p /weblogic

mkdir -p /webdomain

chown -R weblogic /weblogic

chown -R weblogic /webdomain

passwd woblogic # 修改weblogic用户密码

3、切换用户至weblogic 配置jdk,创建安装配置文件及目录

上传jdk安装包到 /weblogic 下并解压

cd /weblogic
tar
-xvf jdk-8u311-linux-x64.tar.gz

环境变量:

vi ~/.bashrc

export JAVA_HOME=/weblogic/jdk1.8.0_311/
export CLASSPATH=.$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

刷新环境变量

source ~/.bashrc

配置文件:

mkdir -p /weblogic/installFile

上传安装包到该目录,并解压:

unzip fmw_12.2.1.4.0_wls_Disk1_1of1.zip

配置文件1:

vi /weblogic/installFile/oraInst.loc

inst_group=weblogic
inventory_loc=/weblogic/oraInventory/

配置文件2:

vi /weblogic/installFile/wls.rsp

[ENGINE]
Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/weblogic/wls12c/
INSTALL_TYPE=WebLogic Server

MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
DECLINE_SECURITY_UPDATES=ture
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
COLLECTOR_SUPPORTTHUB_URL=

创建安装路径及安装配置路径:

mkdir -p /weblogic/wls12c

mkdir -p /weblogic/oraInventory

4、进行安装:

java -jar fmw_12.2.1.4.0_wls.jar -silent -responseFile /home/installFile/wls.rsp -invPtrLoc /home/installFile/oraInst.loc  # 绝对路径

5、使用 wlst.sh 配置域

cd /weblogic/wls12c/wlserver/common/bin/
./wlst.sh

wls:/offline>readTemplateForUpdate('/weblogic/wls12c/wlserver/common/templates/wls/wls.jar')
wls:/offline/base_domain>cd ('Server/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','')
wls:/offline/base_domain/Server/AdminServer>set('ListenPort',9002) # 自定义控制台程序访问端口 防火墙未关闭需要配置端口访问
wls:/offline/base_domain/Server/AdminServer>cd('/')
wls:/offline/base_domain>cd('Security/base_domain/User/weblogic')
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('weblogic1234') # 设置密码英文加数字
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain','true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/webdomain/domains/base_domain/') # 刚才创建的域目录
wls:/offline/base_domain/Security/base_domain/User/weblogic>closeTemplate()
wls:/offline>exit()

6、启动服务访问:

nohup sh /webdomain/domains/base_domain/startWebLogic.sh & # 后台启动

控制台程序访问地址:http://xxx.xxx.xxx.xxx:9002/console