华为云weblogic10.3.6打补丁

华为云weblogic10.3.6打补丁

首先,很感谢热心网友的博客分享(具体参考的博客记不清了,这里表示抱歉);
没有绝对安全的系统,同样也没有绝对完美的应用、软件;很多都是需要通过不断发现问题,查漏补缺,才会更加的安全与完整!
这里是有关weblogic10.3.6版本的补丁安装的简单方法,希望有助于你!

1、查看当前的weblogic版本

如果安装没有设置环境变量会报如下错误:

[root@Geray local]# java weblogic.version
Error: Could not find or load main class weblogic.version

是能够通过java命令查看weblogic版本

#到weblogic安装目录下
cd /root/Oracle/Middleware/wlserver_10.3/server/bin
#执行命令
source setWLSEnv.sh > /dev/null
#查看版本
java weblogic.version

2、查看已经安装过的补丁包

#执行
./bsu.sh -prod_dir=/root/Oracle/Middleware/wlserver_10.3 -status=applied -verbose -view

如果出现如下错误:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at org.apache.xmlbeans.impl.store.Cur.createElementXobj(Cur.java:257)
        at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.startElement(Cur.java:2992)
        at org.apache.xmlbeans.impl.store.Locale$SaxHandler.startElement(Locale.java:3194)
        at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportStartTag(Piccolo.java:1082)
        at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.parseOpenTagNS(PiccoloLexer.java:1473)
        at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.parseTagNS(PiccoloLexer.java:1362)
        at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.parseXMLNS(PiccoloLexer.java:1293)
        at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.parseXML(PiccoloLexer.java:1261)
        at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.java:4808)
        at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290)
        at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400)
        at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714)
        at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3435)
        at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1270)
        at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257)
        at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
        at com.bea.cie.common.dao.xbean.XBeanDataHandlerSpiImpl.create(XBeanDataHandlerSpiImpl.java:130)
        at com.bea.plateng.patch.dao.cat.PatchCatalogFactory.createDataHandler(PatchCatalogFactory.java:49)
        at com.bea.plateng.patch.dao.cat.PatchCatalogFactory.create(PatchCatalogFactory.java:175)
        at com.bea.plateng.patch.dao.cat.PatchCatalogFactory.create(PatchCatalogFactory.java:99)
        at com.bea.plateng.patch.dao.cat.PatchCatalogFactory.create(PatchCatalogFactory.java:85)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchCatalog(PatchCatalogHelper.java:84)
        at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:363)
        at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
        at com.bea.plateng.patch.PatchSystem.<init>(PatchSystem.java:114)
        at com.bea.plateng.patch.PatchSystem.<clinit>(PatchSystem.java:41)
        at com.bea.plateng.patch.PatchClientHelper.getAllPatchDetails(PatchClientHelper.java:74)
        at com.bea.plateng.patch.PatchInstallationHelper.cleanupPatchSets(PatchInstallationHelper.java:130)
        at com.bea.plateng.patch.PatchTarget.<init>(PatchTarget.java:272)
        at com.bea.plateng.patch.PatchTargetFactory.create(PatchTargetFactory.java:30)
        at com.bea.plateng.patch.PatchTargetHelper.getPatchTargets(PatchTargetHelper.java:204)
        at com.bea.plateng.patch.PatchTargetHelper.updatePatchTargets(PatchTargetHelper.java:119)
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not initialize class com.bea.plateng.patch.PatchSystem
        at com.bea.plateng.patch.PatchClientHelper.getAllPatchDetails(PatchClientHelper.java:74)
        at com.bea.plateng.patch.PatchInstallationHelper.cleanupPatchSets(PatchInstallationHelper.java:130)
        at com.bea.plateng.patch.PatchTarget.<init>(PatchTarget.java:272)
        at com.bea.plateng.patch.PatchTargetFactory.create(PatchTargetFactory.java:30)
        at com.bea.plateng.patch.ProductAliasTarget.constructPatchTargetList(ProductAliasTarget.java:88)
        at com.bea.plateng.patch.ProductAliasTarget.<init>(ProductAliasTarget.java:46)
        at com.bea.plateng.patch.ProductAliasTargetHelper.getProdAliasTargetList(ProductAliasTargetHelper.java:55)
        at com.bea.plateng.patch.ProductAliasTargetHelper.getAllHomeToProdAliasesTargetMap(ProductAliasTargetHelper.java:32)
        at com.bea.plateng.patch.ProductAliasTargetHelper.checkProfilesInProductAliases(ProductAliasTargetHelper.java:133)
        at com.bea.plateng.patch.Patch$1.run(Patch.java:376)
        at java.lang.Thread.run(Thread.java:748)

jvm堆内存不够,可以增大内存;

#修改bsu.sh文件
vim bsu.sh
#下面参数默认为初始化内存为128和256,可以进行相应的增大
MEM_ARGS="-Xms512m -Xmx2048m"

3、打补丁

查看文件

#查看cache_dir目录是否存在
cd /root/Oracle/Middleware/utils/bsu
#没有进行创建(有则不用)
mkdir cache_dir

将补丁包上传至cache_dir目录下,进行解压(解压后的jar包名就是patchID)

#[root@Geray cache_dir]# ll
total 99988
-rw-r--r-- 1 root root 102385911 Jun 17 12:00 p29633432_1036_Generic_20190716.zip
[root@Geray cache_dir]# unzip p29633432_1036_Generic_20190716.zip 
Archive:  p29633432_1036_Generic_20190716.zip
  inflating: README.txt              
  inflating: patch-catalog_26707.xml  
  inflating: MXLE.jar    #这里包名MXLE就是patchID            
  inflating: 说明.txt              
[root@Geray cache_dir]# 

退回bsu目录下开始打补丁(注意:patchlist后面就是patchID,也就是前面解压的包名)

#执行下面命令,打补丁
./bsu.sh -install -patch_download_dir=/root/Oracle/Middleware/utils/bsu/cache_dir -patchlist=MXLE -prod_dir=/root/Oracle/Middleware/wlserver_10.3 -verbose
#如果安装时冲突(之前安装过),可以进行卸载,即install改为remove
./bsu.sh -remove -patchlist=MXLE -prod_dir=/root/Oracle/Middleware/wlserver_10.3 -verbose

有问题的或是有其他技术上的交流的,欢迎一起探讨,来自一个热爱技术的陌生小白的盛情([email protected]

你可能感兴趣的:(华为云,CentOS7)