weblogic12c和11g安装
一、Weblogic12c安装
1. 卸载自带jdk
2. 安装sun jdk
解压包,放到相应的位置(如:/usr/java)
设置环境变量
创建weblogic用户组
useradd weblogic
passwd weblogic
创建安装相关文件
su - weblogic
cd /home/weblogic
创建oraInst.loc文件
vim oraInst.loc
#产品安装清单目录,方便后来人员升级维护时查看
inventory_loc=/home/weblogic/oraInventory
#用户的组名称,谨慎,一旦确定,安装后读写都将以此为基准
inst_group=weblogic
创建wls.rsp文件
vim wls.rsp
[ENGINE]
Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/home/weblogic/Oracle/Middleware
INSTALL_TYPE=WebLogic Server
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
DECLINE_SECURITY_UPDATES=true
注意不能带中午注释 另外ORACLE_HOME必须是一个空的目录。inventory_loc目录与ORACLE_HOME不能在同一个目录。不然报错。
安装weblogic
cd /software
java -jar fmw_12.1.3.0.0_wls.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc
具体内容如下:
Extracting files......
Starting Oracle Universal Installer
Checking if CPU speed is above 300 MHz. Actual 2112.053 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 2097148 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Checking temp space: must be greater than 300 MB. Actual 6233 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2020-08-26_07-01-51AM
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Log: /tmp/OraInstall2020-08-26_07-01-51AM/install2020-08-26_07-01-51AM.log
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Starting check : CertifiedVersions
Expected result: One of enterprise-4,enterprise-5,enterprise-6,redhat-6,redhat-4,redhat-5,SuSE-11
Actual Result: (Unknown
Check complete. The overall result of this check is: Failed <<<<
Problem: This Oracle software is not certified on the current operating system.
Recommendation: Make sure you are installing the software on the correct platform.
Warning: Check:CertifiedVersions failed.
Starting check : CheckJDKVersion
Expected result: 1.7.0_15
Actual Result: 1.8.0_261
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.
Validations are enabled for this session.
Verifying data......
Copying Files...
You can find the log of this install session at:
/tmp/OraInstall2020-08-26_07-01-51AM/install2020-08-26_07-01-51AM.log
-----------20%----------40%----------60%----------80%--------100%
The installation of Oracle Fusion Middleware 12c WebLogic Server and Coherence 12.1.3.0.0 completed successfully.
Logs successfully copied to /home/weblogic/oraInventory/logs.
创建域
cd /home/weblogic/Oracle/Middleware/wlserver/common/bin
./wlst.sh
wls:/offline>readTemplate ('/home/weblogic/Oracle/Middleware/wlserver/common/templates/wls/wls.jar')
wls:/offline/base_domain>cd('Servers/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','192.168.6.132')
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')
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('welcome1')
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/Middleware/use_projects/domain')
wls:/offline/domain/Security/domain/User/weblogic>closeTemplate()
wls:/offline>exit()
读取模板:
进入管理服务并设置监听地址和端口:
创建域相关文件并写入:
启动weblogic
cd / home/weblogic/Oracle/Middleware/use_projects/domain
./startWebLogic.sh
# 后台启动:
nohup ./startWebLogic.sh &
关闭weblogic
./stopWeblogic.sh
异机安装受管理服务
不在赘述
将AdminServer的安装目录复制过去
scp -r Middleware/ weblogic\@192.168.71.131:/home/weblogic/Oracle/
删除受管理服务节点文件夹(如果Admin配置过受管理服务)
管理控制台配置受管理服务
通过startManagedWebLogic.sh启动脚本,启动服务,自动创建对应的受管理服务文件夹
./startManagedWebLogic.sh Server-1 http://192.168.71.131:7001
配置boot.properties文件
vim boot.properties
username=weblogic
password=welcome1
后台启动
nohup ./startManagedWebLogic.sh Server-1 http://192.168.71.131:7001 &
集群搭建
安装好一台之后可以打包到其他服务器上即可
tar -zcvf Oracle.tar.gz Oracle
scp Oracle.tar.gz weblogic@IP:~/
# 登陆服务解压
tar xf Oracle.tar.gz
# 修改config.xml中的IP等信息(如果存在)
补丁
上传补丁包到weblogic的安装目录下的Opatch目录下并解压,解压的目录为补丁id
1.将补丁zip文件解压缩到PATCH_TOP中。
unzip -d PATCH_TOP p31656851_121300_Generic.zip
unzip p31656851_121300_Generic.zip
2.安装( OPatch 13.9.4,win平台需要添加参数 -oop)
<ORACLE_HOME>\OPatch\opatch apply <PATCH_HOME> -oop
例如:
./opatch lsinventory
./opatch apply /home/weblogic/Oracle/Middleware/OPatch/32052261
3.补丁回滚
./opatch rollback -id 31656851
4.补丁查询
./opatch lsinventory
./opatch version
补丁过程中遇到的某些问题
1、用户权限
使用了其他用户来操作补丁,导致卸载时不能备份
2、opatch找不到JAVA_HOME?(12.1.3)
更改了jdk导致需要修改一下文件中的jdk路径
weblogic1213/oui/bin/launch.sh ---->JRELOC="/app/jdk1.8.0_172"
weblogic1213/oracle_common/common/bin/setHomeDirs.sh ------> COMMON_JAVA_HOME=/app/jdk1.8.0_172
Oracle官方建议更改一下值
12.1.3:
ORACLE_HOME/install/envVars.properties
ORACLE_HOME/oracle_common/common/bin/commEnv.sh | .cmd
ORACLE_HOME/oracle_common/common/bin/setHomeDirs.sh | .cmd
ORACLE_HOME/oui/bin/compareInventory.sh | .cmd
ORACLE_HOME/oui/bin/install.sh | .cmd ORACLE_HOME/oui/bin/viewInventory.sh | .cmd
ORACLE_HOME/wlserver/.product.properties DOMAIN_HOME/bin/setDomainEnv.sh | .cmd
DOMAIN_HOME/nodemanager/nodemanager.properties
12.2.1 adds the following:
ORACLE_HOME/oui/.globalEnv.properties
DOMAIN_HOME/bin/setNMJavaHome.sh | .cmd
3、opatch需要jdk1.6及以上版本,使用一下清除变量(12.1.3)
- OPatch get_opatch_version requires jdk1.6 or later
The java version at /home/oracle/ora_base/product/11.2.0/client_1/jdk/bin/java is "1.5.0_17"
# 解决办法
unset -v ORACLE_HOME
4、./opatch lsinventory 错误状态吗104 什么文件无效?(12.1.3)
执行一下命令:
export LANG=zh_cn.gbk
unset -v ORACLE_HOME
./opatch lsinventory
问题处理
问题1:JDK8元空间取代永久代
原因:JDK1.8结合了HotSpot和JRockit,使用元空间取代了永久代,解决了永久代遗留的的复杂问题
感谢博主(paddix):https://blog.csdn.net/paddix/article/details/50992472
解决:在setDomainEnv.sh中将相应参数注释掉
weblogic12.1.3版本补丁生成日志
需要在 JAVA_OPTIONS 中添加如下参数:
-Dweblogic.log.DisplayPatchInfo=true
二、安装weblogic11g
配置jdk
export JAVA_HOME=/opt/jdk1.8.0_40/ # 只需修改这里即可
export JAVA_JRE=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
安装weblogic
1、创建用户
useradd app
2、执行安装
# 修改安装包的用户和用户组
chown -R app.app wls1036_generic.jar
# 切换到weblogic用户app
su - app
# 正式进入安装
[app@VM-0-16-centos src]$ java -jar wls1036_generic.jar -mode=console
Extracting 0%....................................................................................................100%
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Welcome:
--------
This installer will guide you through the installation of WebLogic 10.3.6.0.
Type "Next" or enter to proceed to the next prompt. If you want to change data entered previously, type "Previous". You may quit the installer at any time by typing "Exit".
Enter [Exit][Next]>
这面这一步直接回车,之后如下,进行选择安装目录(我的习惯默认安装位置:~/Oracle/Middleware),所以直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Choose Middleware Home Directory:
---------------------------------
"Middleware Home" = [Enter new value or use default
"/home/app/Oracle/Middleware"]
Enter new Middleware Home OR [Exit][Previous][Next]>
接下来这一步是要去掉安全提醒,步骤先输入3,回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Register for Security Updates:
------------------------------
Provide your email address for security updates and to initiate configuration manager.
1|Email:[]
2|Support Password:[]
3|Receive Security Update:[Yes]
Enter index number to select OR [Exit][Previous][Next]> 3
默认值为yes表示接受,这里选择no,然后回车,之后输入yes,回车(省略)
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Register for Security Updates:
------------------------------
Provide your email address for security updates and to initiate configuration manager.
"Receive Security Update:" = [Enter new value or use default "Yes"]
Enter [Yes][No]? No
接下来发现变为No状态,直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->
Register for Security Updates:
------------------------------
Provide your email address for security updates and to initiate configuration manager.
1|Email:[]
2|Support Password:[]
3|Receive Security Update:[No]
Enter index number to select OR [Exit][Previous][Next]>
接下来选择典型,直接回车(省略…)
下面都直接回车即可
创建新的域
进入wlserver_10.3/common/bin下
cd /home/app/Oracle/Middleware/wlserver_10.3/common/bin
执行
./config.sh
for Security Updates:
Provide your email address for security updates and to initiate configuration manager.
1|Email:[]
2|Support Password:[]
3|Receive Security Update:[No]
Enter index number to select OR [Exit][Previous][Next]>
接下来选择典型,直接回车(省略…)
下面都直接回车即可
创建新的域
进入wlserver_10.3/common/bin下
cd /home/app/Oracle/Middleware/wlserver_10.3/common/bin
执行
./config.sh
三、Windows10安装weblogic12.1.3
1、安装
使用管理员运行cmd
到weblogic安装包目录下(不要带有中文的目录)执行:
java -jar fmw_12.1.3.0.0_wls.jar
命令行安装在命令后加参数:-mode=console
按照图形界面提示一步步操作
2、配置域
如果没有自动启动配置域
启动文件:Configuration Wizard
3、weblogic12c卸载
不同于weblogic10的卸载
weblogic12卸载,Oracle以改名为deinstall.cmd或deinstall.sh
文件位置为:oui/bin
Windows卸载直接运行该文件
Linux下卸载执行:deinstall.sh -silent
4、问题处理
1)不是有效的jdk
解决:
将安装包放置jdk的bin目录下
重新安装操作
2)配置域时启动Configuration Wizard一闪而过
jdk或者weblogic的安装目录有空格,全部卸载重新安装即可
3)weblogic12.1.3版本补丁生成日志
需要在 JAVA_OPTIONS 中添加如下参数:
-Dweblogic.log.DisplayPatchInfo=true
写的很难受,感谢浏览