Linux Weblogic 10.3.6安装和漏洞补丁过程

Weblogic 10.3.6安装过程(含打补丁漏洞)

测试开发环境搭建过程中需要安装weblogic11g中间件,安装过程中也踩了不少坑。在网上也参考了不少资料,特意把安装过程记录下来方便以后查看。

Linux Weblogic 10.3.6 安装 p27395085_1036_Generic.zip
weblogic安装教程(以weblogic 11g为例)

安装前准备

  1. 下载安装包
    weblogic官网下载地址
    安装过程是使用jar包安装,所以选择这页官网最下面的10.3.6的版本的Generic点击安装。如下图所示:
    下载weblogic的jar包
    下载weblogic的jar包
  2. 确认系统对应的JDK版本
    这里查看资料显示:官方文档表示WebLogic 11g只支持JDK 6,不兼容JDK 7所以要重新安装JDK
//查看对应的JAVA版本
[root@gztvtest ~]# java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

JDK的安装参考linux安装各版本JDK

安装步骤

  1. 新建用户和组
    //新建用户为weblogic11g, 组为weblogic的用户
[root@gztvtest ~]# groupadd weblogic
[root@gztvtest ~]# useradd weblogic11g -g weblogic
[root@gztvtest ~]# passwd weblogic11g
Changing password for user weblogic11g.
New password: 
BAD PASSWORD: it is based on a dictionary word
Retype new password: 
passwd: all authentication tokens updated successfully.
查看新建用户
[root@gztvtest ~]# cat /etc/passwd
weblogic11g:x:501:501::/home/weblogic11g:/bin/bash

  1. 上传文件到/weblogic目录(安装目录)然后修改权限
    上传过程:
sftp> lcd d:/
sftp> cd /weblogic/
sftp> put wls1036_generic.jar
Uploading wls1036_generic.jar to /weblogic/wls1036_generic.jar
  100% 1043463KB  23715KB/s 00:00:44     
d:\wls1036_generic.jar: 1068506707 bytes transferred in 44 seconds (23715 KB/s)

修改权限:

[root@gztvtest /]# chown -R weblogic11g:weblogic /weblogic/
[root@gztvtest weblogic]# su - weblogic11g    //切换用户
[weblogic11g@gztvtest ~]$ cd /weblogic/
[weblogic11g@gztvtest weblogic]$ ll
total 1043484
drwx------. 2 weblogic11g weblogic      16384 Aug 14 15:15 lost+found
-rw-r--r--. 1 weblogic11g weblogic 1068506707 Aug 22 17:29 wls1036_generic.jar
[weblogic11g@gztvtest weblogic]$ chmod u+x wls1036_generic.jar      //可执行权限
[weblogic11g@gztvtest weblogic]$ ll
total 1043484
drwx------. 2 weblogic11g weblogic      16384 Aug 14 15:15 lost+found
-rwxr--r--. 1 weblogic11g weblogic 1068506707 Aug 22 17:29 wls1036_generic.jar
  1. 开始安装
[weblogic11g@gztvtest weblogic]$ java -jar wls1036_generic.jar 
Unable to instantiate GUI, defaulting to console mode.
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 Installer - WebLogic 10.3.6.0 ------------------->

Choose Middleware Home Directory:
---------------------------------

    "Middleware Home" = [Enter new value or use default 
"/home/weblogic11g/Oracle/Middleware"]



//填写安装路径
Enter new Middleware Home OR [Exit][Previous][Next]> /weblogic/Oracle/Middleware        
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Choose Middleware Home Directory:
---------------------------------

    "Middleware Home" = [/weblogic/Oracle/Middleware]

Use above value or select another option:
    1 - Enter new Middleware Home
    2 - Change to default [/home/weblogic11g/Oracle/Middleware]



 //回车确认路径,1是重新填写,2是默认路径
Enter option number to select OR [Exit][Previous][Next]> 直接回车    
<-------------------- 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]


//选择3,把YES修改成NO,不接受安全更新
Enter index number to select 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.

    "Receive Security Update:" = [Enter new value or use default "Yes"]


//修改成No
Enter [Yes][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.

    "Receive Security Update:" = [Enter new value or use default "Yes"]


    ** Do you wish to bypass initiation of the configuration manager and
    **  remain uninformed of critical security issues in your configuration?

// 确认刚刚的修改
Enter [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.

   1|Email:[]
   2|Support Password:[]
   3|Receive Security Update:[No]


//修改后显示为No.直接回车
Enter index number to select OR [Exit][Previous][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Choose Install Type:
--------------------

Select the type of installation you wish to perform. 

 ->1|Typical
    |  Install the following product(s) and component(s):
    | - WebLogic Server
    | - Oracle Coherence

   2|Custom
    |  Choose software products and components to install and perform optional 
    |configuration.




//选择安装的类型,回车选择1默认的安装类型
Enter index number to select OR [Exit][Previous][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

JDK Selection (Any * indicates Oracle Supplied VM):
---------------------------------------------------

JDK(s) chosen will be installed.  Defaults will be used in script string-substitution if installed.

   1|Add Local Jdk
   2|/usr/local/jdk1.6.0_45[x]



   *Estimated size of installation:  690.2 MB

//选择使用的JDK,这里默认的是系统的1.6,没有问题
Enter 1 to add or >= 2 to toggle selection  OR [Exit][Previous][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Choose Product Installation Directories:
----------------------------------------

Middleware Home Directory: [/weblogic/Oracle/Middleware]

Product Installation Directories:


   1|WebLogic Server: [/weblogic/Oracle/Middleware/wlserver_10.3]
   2|Oracle Coherence: [/weblogic/Oracle/Middleware/coherence_3.7]



//显示即将安装的路径信息
Enter index number to select OR [Exit][Previous][Next]> 直接回车
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

The following Products and JDKs will be installed:
--------------------------------------------------

    WebLogic Platform 10.3.6.0
    |_____WebLogic Server
    |    |_____Core Application Server
    |    |_____Administration Console
    |    |_____Configuration Wizard and Upgrade Framework
    |    |_____Web 2.0 HTTP Pub-Sub Server
    |    |_____WebLogic SCA
    |    |_____WebLogic JDBC Drivers
    |    |_____Third Party JDBC Drivers
    |    |_____WebLogic Server Clients
    |    |_____WebLogic Web Server Plugins
    |    |_____UDDI and Xquery Support
    |    |_____Evaluation Database
    |_____Oracle Coherence
         |_____Coherence Product Files

    *Estimated size of installation: 690.3 MB



//显示即将安装的包和JDKs
Enter [Exit][Previous][Next]> 直接回车
Aug 26, 2019 4:09:15 PM java.util.prefs.FileSystemPreferences$2 run
INFO: Created user preferences directory.
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Installing files..

0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]

Performing String Substitutions... 

<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Configuring OCM...

0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]


Creating Domains...

<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Installation Complete


Congratulations! Installation is complete.

//显示安装过程
Press [Enter] to continue or type [Exit]> 直接回车
//安装完毕
<-------------------- Oracle Installer - WebLogic 10.3.6.0 ------------------->

Clean up process in progress ...

创建weblogic域

安装完成后需要创建WebLogic domain,下面是创建过程:

[weblogic11g@gztvtest weblogic]$ cd Oracle/Middleware/wlserver_10.3/common/bin/
[weblogic11g@gztvtest bin]$ ll
total 112
-rwxr-x---. 1 weblogic11g weblogic 22803 Aug 26 16:09 commEnv.sh
-rwxr-x---. 1 weblogic11g weblogic  2124 Aug 26 16:09 config_builder.sh
-rwxr-x---. 1 weblogic11g weblogic  2276 Aug 26 16:09 config.sh
-rwxr-x---. 1 weblogic11g weblogic  2581 Aug 26 16:09 pack.sh
-rwxr-x---. 1 weblogic11g weblogic  2150 Aug 26 16:09 setPatchEnv.sh
-rwxr-x---. 1 weblogic11g weblogic  4084 Aug 26 16:09 startDerby.sh
-rwxr-x---. 1 weblogic11g weblogic  4090 Aug 26 16:09 startManagedWebLogic.sh
-rwxr-x---. 1 weblogic11g weblogic  1450 Aug 26 16:09 stopDerby.sh
-rwxr-x---. 1 weblogic11g weblogic  2089 Aug 26 16:09 unpack.sh
-rwxr-x---. 1 weblogic11g weblogic  3300 Aug 26 16:09 upgrade.sh
-rwxr-x---. 1 weblogic11g weblogic 31219 Aug 26 16:09 wlscontrol.sh
-rwxr-x---. 1 weblogic11g weblogic 13740 Aug 26 16:09 wlsifconfig.sh
-rwxr-x---. 1 weblogic11g weblogic   786 Aug 26 16:09 wlst.sh

执行脚本config.sh

[weblogic11g@gztvtest bin]$ ./config.sh 
Unable to instantiate GUI, defaulting to console mode.

<------------------- Fusion Middleware Configuration Wizard ------------------>

Welcome:
--------

Choose between creating and extending a domain. Based on your selection, 
the Configuration Wizard guides you through the steps to generate a new or 
extend an existing domain.

 ->1|Create a new WebLogic domain
    |    Create a WebLogic domain in your projects directory.  

   2|Extend an existing WebLogic domain
    |    Use this option to add new components to an existing domain and modify     |configuration settings. 

//默认1创建新的WebLogic domain,2是增加一个WebLogic domain
Enter index number to select OR [Exit][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>

Select Domain Source:
---------------------

Select the source from which the domain will be created. You can create the 
domain by selecting from the required components or by selecting from a 
list of existing domain templates.

 ->1|Choose Weblogic Platform components
    |    You can choose the Weblogic component(s) that you want supported in 
    |your domain. 

   2|Choose custom template
    |    Choose this option if you want to use an existing  template. This 
    |could be a custom created template using the Template Builder. 

//1是默认使用weblogic组件,2是选择自定义
Enter index number to select OR [Exit][Previous][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>

Application Template Selection:
-------------------------------
    Available Templates
    |_____Basic WebLogic Server Domain - 10.3.6.0 [wlserver_10.3]x
    |_____Basic WebLogic SIP Server Domain - 10.3.6.0 [wlserver_10.3] [2] 
    |_____WebLogic Advanced Web Services for JAX-RPC Extension - 10.3.6.0 [wlserver_10.3] [3] 
    |_____WebLogic Advanced Web Services for JAX-WS Extension - 10.3.6.0 [wlserver_10.3] [4] 

//显示weblogic支持的组件
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> 直接回车

<------------------- Fusion Middleware Configuration Wizard ------------------>

Edit Domain Information:
------------------------

    |  Name  |    Value    |
   _|________|_____________|
   1| *Name: | base_domain |

//填写domain的名字
Enter value for "Name" OR [Exit][Previous][Next]> cbossdomain
<------------------- Fusion Middleware Configuration Wizard ------------------>

Edit Domain Information:
------------------------

    |  Name  |    Value    |
   _|________|_____________|
   1| *Name: | cbossdomain |

Use above value or select another option:
    1 - Modify "Name"
    2 - Discard Changes
//1 修改名字,2,放弃修改
Enter option number to select OR [Exit][Previous][Next]> 直接回车

<------------------- Fusion Middleware Configuration Wizard ------------------>

Select the target domain directory for this domain:
---------------------------------------------------

    "Target Location" = [Enter new value or use default 
"/weblogic/Oracle/Middleware/user_projects/domains"]
//显示创建的domains路径位置
Enter new Target Location OR [Exit][Previous][Next]> 直接回车
<------------------- Fusion Middleware Configuration Wizard ------------------>

Configure Administrator User Name and Password:
-----------------------------------------------

Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.

    |          Name           |                  Value                  |
   _|_________________________|_________________________________________|
   1|         *Name:          |                weblogic                 |
   2|     *User password:     |                                         |
   3| *Confirm user password: |                                         |
   4|      Description:       | This user is the default administrator. |

Use above value or select another option:
    1 - Modify "Name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
//1修改名字 2.修改密码 3确认密码 4修改描述
Enter option number to select OR [Exit][Previous][Next]> 2
<------------------- Fusion Middleware Configuration Wizard ------------------>

Configure Administrator User Name and Password:
-----------------------------------------------

Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.

    "*User password:" = []
//输入密码
Enter new *User password: OR [Exit][Reset][Accept]>abc123
<------------------- Fusion Middleware Configuration Wizard ------------------>

Configure Administrator User Name and Password:
-----------------------------------------------

Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.

    |          Name           |                  Value                  |
   _|_________________________|_________________________________________|
   1|         *Name:          |                weblogic                 |
   2|     *User password:     |                ********                 |
   3| *Confirm user password: |                                         |
   4|      Description:       | This user is the default administrator. |

Use above value or select another option:
    1 - Modify "Name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes
//3确认密码
Enter option number to select OR [Exit][Previous][Next]> 3
<------------------- Fusion Middleware Configuration Wizard ------------------>

Configure Administrator User Name and Password:
-----------------------------------------------

Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.

    "*Confirm user password:" = []
//确认密码
Enter new *Confirm user password: OR [Exit][Reset][Accept]> abc123

<------------------- Fusion Middleware Configuration Wizard ------------------>

Configure Administrator User Name and Password:
-----------------------------------------------

Create a user to be assigned to the Administrator role. This user is the 
default administrator used to start development mode servers.

    |          Name           |                  Value                  |
   _|_________________________|_________________________________________|
   1|         *Name:          |                weblogic                 |
   2|     *User password:     |                ********                 |
   3| *Confirm user password: |                ********                 |
   4|      Description:       | This user is the default administrator. |

Use above value or select another option:
    1 - Modify "Name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes

Enter option number to select OR [Exit][Previous][Next]> 直接回车

<------------------- Fusion Middleware Configuration Wizard ------------------>

Domain Mode Configuration:
--------------------------

Enable Development or Production Mode for this domain. 

 ->1|Development Mode

   2|Production Mode

//选择2生产模式,默认1是开发模式
Enter index number to select OR [Exit][Previous][Next]> 2

<------------------- Fusion Middleware Configuration Wizard ------------------>

Java SDK Selection:
-------------------

 ->1|Sun SDK 1.6.0_45 @ /usr/local/jdk1.6.0_45
   2|Other Java SDK

//选择SDK,1默认本地1.6
Enter index number to select OR [Exit][Previous][Next]> 直接回车

<------------------- Fusion Middleware Configuration Wizard ------------------>

Select Optional Configuration:
------------------------------

   1|Administration Server [ ]
   2|Managed Servers, Clusters and Machines [ ]
   3|RDBMS Security Store [ ]
这里不做配置,做集群配置在管理页面做
Enter index number to select OR [Exit][Previous][Next]> 直接回车

备注:
可以在命令行中配置管理服务器、受管服务器、集群和计算机,此处选择在控制台中配置

安装完毕

<------------------- Fusion Middleware Configuration Wizard ------------------>

Creating Domain...

0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]


**** Domain Created Successfully! ****
[weblogic11g@gztvtest bin]$ 

配置AdminServer后台运行,并优化JVM参数

  1. 第一次前台运行AdmininServer
[weblogic11g@gztvtest bin]$ cd /weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/bin/
[weblogic11g@gztvtest bin]$ ll
total 48
drwxr-x---. 2 weblogic11g weblogic  4096 Aug 26 17:13 nodemanager
drwxr-x---. 2 weblogic11g weblogic  4096 Aug 26 17:13 server_migration
drwxr-x---. 2 weblogic11g weblogic  4096 Aug 26 17:13 service_migration
-rwxr-x---. 1 weblogic11g weblogic 13251 Aug 26 17:13 setDomainEnv.sh
-rwxr-x---. 1 weblogic11g weblogic  3193 Aug 26 17:13 startManagedWebLogic.sh
-rwxr-x---. 1 weblogic11g weblogic  5694 Aug 26 17:13 startWebLogic.sh
-rwxr-x---. 1 weblogic11g weblogic  2406 Aug 26 17:13 stopManagedWebLogic.sh
-rwxr-x---. 1 weblogic11g weblogic  1974 Aug 26 17:13 stopWebLogic.sh

执行./startWebLogic.sh,前台运行要输入账号密码

[weblogic11g@gztvtest bin]$ ./startWebLogic.sh 
.
.
JAVA Memory arguments: -Xms256m -Xmx512m  -XX:MaxPermSize=256m
.
WLS Start Mode=Production
.
CLASSPATH=/weblogic/Oracle/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/weblogic/Oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/jdk1.6.0_45/lib/tools.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/weblogic/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/weblogic/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/weblogic/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/weblogic/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar:/usr/local/jdk1.6.0_45//lib/tools.jar:/usr/local/jdk1.6.0_45//lib/dt.jar
.
PATH=/weblogic/Oracle/Middleware/wlserver_10.3/server/bin:/weblogic/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/usr/local/jdk1.6.0_45/jre/bin:/usr/local/jdk1.6.0_45/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/jdk1.6.0_45//bin:/bin:/home/weblogic11g/bin
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
starting weblogic with Java version:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
Starting WLS with line:
/usr/local/jdk1.6.0_45/bin/java -server   -Xms256m -Xmx512m  -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy  -Dweblogic.ProductionModeEnabled=true   -da -Dplatform.home=/weblogic/Oracle/Middleware/wlserver_10.3 -Dwls.home=/weblogic/Oracle/Middleware/wlserver_10.3/server -Dweblogic.home=/weblogic/Oracle/Middleware/wlserver_10.3/server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/weblogic/Oracle/Middleware/patch_wls1036/profiles/default/sysext_manifest_classpath:/weblogic/Oracle/Middleware/patch_ocp371/profiles/default/sysext_manifest_classpath  weblogic.Server
<Aug 26, 2019 5:23:47 PM CST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true> 
<Aug 26, 2019 5:23:47 PM CST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true> 
<Aug 26, 2019 5:23:48 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 20.45-b01 from Sun Microsystems Inc.> 
<Aug 26, 2019 5:23:48 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 > 
<Aug 26, 2019 5:23:49 PM CST> <Info> <Security> <BEA-090065> <Getting boot identity from user.> 
Enter username to boot WebLogic server:

当出现以下内容时表示启动成功

0:0:0:0:1> 
<Aug 26, 2019 5:35:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.> 
<Aug 26, 2019 5:35:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.> 
<Aug 26, 2019 5:35:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fe80:0:0:0:250:56ff:fe80:2f1d:7001 for protocols iiop, t3, ldap, snmp, http.> 
<Aug 26, 2019 5:35:05 PM CST> <Notice> <WebLogicServer> <BEA-000329> <Started WebLogic Admin Server "AdminServer" for domain "cbossdomain" running in Production Mode> 
<Aug 26, 2019 5:35:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING> 
<Aug 26, 2019 5:35:05 PM CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
  1. 配置AdminServer后台运行
    Ctrl + c结束前台运行的AdminServer,首次运行AdminServer后,会自动在cbossdomain目录下创建servers/AdminServer目录
[weblogic11g@gztvtest cbossdomain]$ ll
total 40
drwxr-x---.  2 weblogic11g weblogic 4096 Aug 26 17:13 autodeploy
drwxr-x---.  5 weblogic11g weblogic 4096 Aug 26 17:13 bin
drwxr-x---. 10 weblogic11g weblogic 4096 Aug 26 17:23 config
drwxr-x---.  2 weblogic11g weblogic 4096 Aug 26 17:13 console-ext
-rw-r-----.  1 weblogic11g weblogic  462 Aug 26 17:13 fileRealm.properties
drwxr-x---.  2 weblogic11g weblogic 4096 Aug 26 17:13 init-info
drwxr-x---.  2 weblogic11g weblogic 4096 Aug 26 17:13 lib
drwxr-x---.  2 weblogic11g weblogic 4096 Aug 26 17:13 security
drwxr-----.  3 weblogic11g weblogic 4096 Aug 26 17:23 servers
-rwxr-x---.  1 weblogic11g weblogic  277 Aug 26 17:13 startWebLogic.sh
[weblogic11g@gztvtest cbossdomain]$ pwd
/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain

创建文件然后编辑

[weblogic11g@gztvtest AdminServer]$ pwd
/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/servers/AdminServer
[weblogic11g@gztvtest AdminServer]$ mkdir security
[weblogic11g@gztvtest AdminServer]$ cd security/
[weblogic11g@gztvtest security]$ vi boot.properties
username=weblogic
password=abc12345678
  1. 优化JVM参数
[weblogic11g@gztvtest bin]$ pwd
/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/bin
[weblogic11g@gztvtest bin]$ vi startWebLogic.sh 
[weblogic11g@gztvtest bin]$ vi setDomainEnv.sh 
startWebLogic.sh会调用setDomainEnv.sh,所以优先级比setDomainEnv.sh高
此处选择修改startWebLogic.sh

(1)trap ‘stopAll’ 1 2 3 15上方加入代码:MEM_ARGS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m"

SAVE_CLASSPATH=""
MEM_ARGS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m"
trap 'stopAll' 1 2 3 15

(2)如果应用程序需要在网页中显示验证码,则增加JVM参数-Djava.awt.headless=true
将SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"修改为

SAVE_JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.awt.headless=true"

  1. 后台启动weblogic
[weblogic11g@gztvtest bin]$ nohup ./startWebLogic.sh &          //记录会保存到自动创建的nohup.out文件中
[1] 19314
[weblogic11g@gztvtest bin]$ nohup: ignoring input and appending output to `nohup.out'

之前编辑的密码文件已经变成加密格式了

/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/servers/AdminServer/security
[weblogic11g@gztvtest security]$ cat boot.properties 
#Mon Aug 26 17:50:20 CST 2019
password={AES}tSv1+qpUFx6otq0Hi83+/IyLhKozU1s7VXN18wzZfXA\=
username={AES}HON39b8L8+lnF8gSCYT5QGH3VWCAg+SSuitGUmuAFko\=

后台关闭weblogic:

[weblogic11g@gztvtest bin]$ nohup ./stopWebLogic.sh &          //记录会保存到自动创建的nohup.out文件中

在浏览器输入网址:

http://192.168.1.220:7001/console

打开控制台,并输入用户名weblogic和密码abc12345678:
登录页面

登录页面

管理界面
登录后的管理界面

如果登录后界面一直是白色的刷新界面,我重启一遍服务器就再开启服务就没有出现这个问题了。

  1. 修改weblogic的console管理平台的端口
    依次点左边的Lock&Edit 修改------左边Enviroment—Server—点右边出现的属性框里的AdminServer–修改Listen Port为10000如下图所示:
    修改weblogic端口
    修改weblogic端口

    修改后也要记得修改:
[weblogic11g@gztvtest bin]$ pwd
/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/bin
[weblogic11g@gztvtest bin]$ vi stopWebLogic.sh
把其中的7001端口修改成10000
不然会报错
[weblogic11g@gztvtest bin]$ ./stopWebLogic.sh 
Stopping Weblogic Server...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://gztvtest:7001 with userid weblogic ...
This Exception occurred at Tue Aug 27 01:23:01 CST 2019.
javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://gztvtest:7001: Destination unreachable; nested exception is: 
        java.net.ConnectException: Connection refused; No available router to destination]
Problem invoking WLST - Traceback (innermost last):
  File "/weblogic/Oracle/Middleware/user_projects/domains/cbossdomain/shutdown.py", line 3, in ?
  File "<iostream>", line 22, in connect
  File "<iostream>", line 648, in raiseWLSTException
WLSTException: Error occured while performing connect : Error getting the initial context. There is no server running at t3://gztvtest:7001 
Use dumpStack() to view the full stacktrace

Done
Stopping Derby Server...
  1. 解决进入console界面慢的问题
    如果输入账号密码后界面一直转圈圈卡的情况,查资料显示一般是:
实际是JVM在Linux下的bug
  他想调用一个随机函数
  但取不到
  暂时的解决办法是
  1)较好的解决办法: 在Weblogic启动参数里添加 “-
  Djava.security.egd=file:/dev/./urandom” (/dev/urandom 无法启动)
  2)最差的解决办法: 执行命令 mv /dev/random /dev/random.ORIG ; ln /dev/urandom /dev/random
  将/dev/random 指向/dev/urandom
  3)最好的解决办法:  修改Linux上Weblogic使用的jdk $JAVA_HOME/jre/lib/security/java.security 文件
  将securerandom.source=file:/dev/urandom 修改为
  securerandom.source=file:/dev/./urandom
  这样可以解决任何一个域Weblogic启动慢的问题

打补丁过程

安装完后向维护厂商要了官网最新的11g的weblogic补丁:
p29633432_1036_Generic.zip

  1. 查看weblogic版本
[weblogic11g@gztvtest bin]$ pwd
/weblogic/Oracle/Middleware/wlserver_10.3/server/bin
[weblogic11g@gztvtest bin]$ source setWLSEnv.sh > /dev/null
[weblogic11g@gztvtest bin]$ java weblogic.version

WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 

Use 'weblogic.version -verbose' to get subsystem information

Use 'weblogic.utils.Versions' to get version information for all modules

  1. 上传补丁
    安装前把所有的weblogic进程都杀掉,然后上传压缩包上去解压
[weblogic11g@gztvtest bin]$ ps -ef | grep java
501       4024  3975  5 01:34 pts/1    00:00:18 /usr/local/jdk1.6.0_45/bin/java -server -Xms1024m -Xmx1024m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.security.policy=/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -da -Dplatform.home=/weblogic/Oracle/Middleware/wlserver_10.3 -Dwls.home=/weblogic/Oracle/Middleware/wlserver_10.3/server -Dweblogic.home=/weblogic/Oracle/Middleware/wlserver_10.3/server -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/weblogic/Oracle/Middleware/patch_wls1036/profiles/default/sysext_manifest_classpath:/weblogic/Oracle/Middleware/patch_ocp371/profiles/default/sysext_manifest_classpath weblogic.Server
501       4124  3946  0 01:39 pts/1    00:00:00 grep java
[weblogic11g@gztvtest bin]$ kill -9 4024     //杀掉

//因为上传是root上传的要改权限
[weblogic11g@gztvtest bin]$ exit
logout
[root@gztvtest ~]# mv /root/p29633432_1036_Generic.zip /weblogic/
[root@gztvtest ~]# cd /weblogic/
[root@gztvtest weblogic]# ll
total 1143476
drwx------. 2 weblogic11g weblogic      16384 Aug 14 15:15 lost+found
drwxr-xr-x. 3 weblogic11g weblogic       4096 Aug 26 16:09 Oracle
-rw-r--r--. 1 root        root      102385703 Aug 23 17:16 p29633432_1036_Generic.zip
-rwxr--r--. 1 weblogic11g weblogic 1068506707 Aug 22 17:29 wls1036_generic.jar
[root@gztvtest weblogic]# chown weblogic11g:weblogic p29633432_1036_Generic.zip 
[root@gztvtest weblogic]# su - weblogic11g
[weblogic11g@gztvtest ~]$ cd /weblogic/
[weblogic11g@gztvtest weblogic]$ unzip p29633432_1036_Generic.zip 
Archive:  p29633432_1036_Generic.zip
  inflating: README.txt              
  inflating: patch-catalog_26707.xml  
  inflating: MXLE.jar                
[weblogic11g@gztvtest weblogic]$ 

  1. 查看补丁信息
[weblogic11g@gztvtest bsu]$ pwd
/weblogic/Oracle/Middleware/utils/bsu
[weblogic11g@gztvtest bsu]$ ./bsu.sh -view -verbose -prod_dir=/weblogic/Oracle/Middleware/wlserver_10.3/ -status=applied
ProductName:       WebLogic Server
ProductVersion:    10.3 MP6
Components:        WebLogic Server/Core Application Server,WebLogic Server/Admi
                   nistration Console,WebLogic Server/Configuration Wizard and 
                   Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
                   r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
                    Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic S
                   erver/WebLogic Server Clients,WebLogic Server/WebLogic Web S
                   erver Plugins,WebLogic Server/UDDI and Xquery Support,WebLog
                   ic Server/Evaluation Database,WebLogic Server/Workshop Code 
                   Completion Support
BEAHome:           /weblogic/Oracle/Middleware
ProductHome:       /weblogic/Oracle/Middleware/wlserver_10.3
PatchSystemDir:    /weblogic/Oracle/Middleware/utils/bsu
PatchDir:          /weblogic/Oracle/Middleware/patch_wls1036
Profile:           Default
DownloadDir:       /weblogic/Oracle/Middleware/utils/bsu/cache_dir
JavaVersion:       1.6.0_29
JavaVendor:        Sun

上面没有PATCH选项所以没有打补丁
4. 打补丁过程
把上传上去的zip文件解压到存放补丁的目录:

如果没有放补丁文件则新建:
[weblogic11g@gztvtest bsu]$ pwd
/weblogic/Oracle/Middleware/utils/bsu
[weblogic11g@gztvtest bsu]$ mkdir cache_dir
mkdir: cannot create directory `cache_dir': File exists
压缩zip包到这个文件夹
[weblogic11g@gztvtest weblogic]$ unzip p29633432_1036_Generic.zip  -d  /weblogic/Oracle/Middleware/utils/bsu/cache_dir/
Archive:  p29633432_1036_Generic.zip
  inflating: /weblogic/Oracle/Middleware/utils/bsu/cache_dir/README.txt  
  inflating: /weblogic/Oracle/Middleware/utils/bsu/cache_dir/patch-catalog_26707.xml  
  inflating: /weblogic/Oracle/Middleware/utils/bsu/cache_dir/MXLE.jar  

[weblogic11g@gztvtest cache_dir]$ ll
total 237204
-rw-r--r--. 1 weblogic11g weblogic  93702950 May 23 06:43 MXLE.jar
-rw-r--r--. 1 weblogic11g weblogic 149124378 May 23 06:43 patch-catalog_26707.xml
-rw-rw-r--. 1 weblogic11g weblogic     61935 Jul  1 15:09 README.txt
修改压缩后的文件名称
[weblogic11g@gztvtest cache_dir]$ mv patch-catalog_26707.xml patch-catalog.xml

查看机器内存
[weblogic11g@gztvtest bsu]$ free -g       
             total       used       free     shared    buffers     cached
Mem:             7          0          6          0          0          0
-/+ buffers/cache:          0          7
Swap:            7          0          7

修改bsu.s脚本中JVM占用内存的范围,根据自身机器内存大小分配,占比过大会导致机器卡死
[weblogic11g@gztvtest bsu]$ vi bsu.sh
MEM_ARGS="-Xms1024m -Xmx2048m"
打补丁:
[weblogic11g@gztvtest bsu]$ ./bsu.sh -install -patch_download_dir=/weblogic/Oracle/Middleware/utils/bsu/cache_dir -patchlist=MXLE -prod_dir=/weblogic/Oracle/Middleware/wlserver_10.3

结果报错信息如下:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.addEntry(HashMap.java:753)
        at java.util.HashMap.put(HashMap.java:385)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.loadPropertyMap(XBeanDataHandler.java:778)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.<init>(XBeanDataHandler.java:99)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.createDataHandler(XBeanDataHandler.java:559)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.getComplexValue(XBeanDataHandler.java:455)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:442)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:464)
        at com.bea.plateng.patch.dao.cat.PatchCatalog.getPatchDependencies(PatchCatalog.java:56)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1621)
        at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
        at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
        at com.bea.plateng.patch.PatchSystem.setCacheDir(PatchSystem.java:201)
        at com.bea.plateng.patch.Patch.main(Patch.java:281)

分析是内存溢出导致的,即通常认为的内存不足,java虚拟机内存不够用,修改
[weblogic11g@gztvtest bsu]$ vi bsu.sh
MEM_ARGS="-Xms2048m -Xmx2048m"
后继续执行又报错:

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
        at java.lang.Class.getInterfaces(Native Method)
        at java.lang.Class.getMethod0(Class.java:2694)
        at java.lang.Class.getMethod0(Class.java:2697)
        at java.lang.Class.getMethod0(Class.java:2697)
        at java.lang.Class.getMethod0(Class.java:2697)
        at java.lang.Class.getMethod0(Class.java:2688)
        at java.lang.Class.getMethod0(Class.java:2688)
        at java.lang.Class.getMethod(Class.java:1605)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.isValueSet(XBeanDataHandler.java:958)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.getValueFromObject(XBeanDataHandler.java:589)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.getSimpleValue(XBeanDataHandler.java:431)
        at com.bea.plateng.patch.dao.cat.PatchDependency.getRule(PatchDependency.java:48)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1625)
        at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
        at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
        at com.bea.plateng.patch.PatchSystem.setCacheDir(PatchSystem.java:201)
        at com.bea.plateng.patch.Patch.main(Patch.java:281)

通常是设置的堆内存太小,导致没有足够的内存。继续修改最大值为:
[weblogic11g@gztvtest bsu]$ vi bsu.sh
MEM_ARGS="-Xms2048m -Xmx3026m"

[weblogic11g@gztvtest bsu]$ ./bsu.sh -install -patch_download_dir=/weblogic/Oracle/Middleware/utils/bsu/cache_dir -patchlist=MXLE -prod_dir=/weblogic/Oracle/Middleware/wlserver_10.3
Checking for conflicts..........
No conflict(s) detected

Installing Patch ID: MXLE..
Result: Success

这次运行就成功了,查看补丁的最新信息如下:

[weblogic11g@gztvtest bsu]$ ./bsu.sh -view -verbose -prod_dir=/weblogic/Oracle/Middleware/wlserver_10.3/ -status=applied
ProductName:       WebLogic Server
ProductVersion:    10.3 MP6
Components:        WebLogic Server/Core Application Server,WebLogic Server/Admi
                   nistration Console,WebLogic Server/Configuration Wizard and 
                   Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
                   r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
                    Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic S
                   erver/WebLogic Server Clients,WebLogic Server/WebLogic Web S
                   erver Plugins,WebLogic Server/UDDI and Xquery Support,WebLog
                   ic Server/Evaluation Database,WebLogic Server/Workshop Code 
                   Completion Support
BEAHome:           /weblogic/Oracle/Middleware
ProductHome:       /weblogic/Oracle/Middleware/wlserver_10.3
PatchSystemDir:    /weblogic/Oracle/Middleware/utils/bsu
PatchDir:          /weblogic/Oracle/Middleware/patch_wls1036
Profile:           Default
DownloadDir:       /weblogic/Oracle/Middleware/utils/bsu/cache_dir
JavaVersion:       1.6.0_29
JavaVendor:        Sun


Patch ID:          MXLE
PatchContainer:    MXLE.jar
Checksum:          -1438222202
Severity:          optional
Category:          General
CR/BUG:            29633432
Restart:           true
Description:       WLS PATCH SET UPDATE 10.3.6.0.190716
WLS PATCH SET UPDATE 10
                   .3.6.0.190716

有Patch ID的信息就代表补丁打成功了,Description: WLS PATCH SET UPDATE 10.3.6.0.190716,代表19年7月份的最新补丁。
5. 卸载补丁

[weblogic11g@gztvtest bsu]$./bsu.sh -remove -patchlist=MXLE -prod_dir=/weblogic/Oracle/Middleware/wlserver_10.3/

结尾

到此,weblogic的安装就完成了,后续还要研究下集群的和各个域的搭建过程。

参与评论 您还未登录,请先 登录 后发表或查看评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:编程工作室 设计师:CSDN官方博客 返回首页

打赏作者

看不见阿唱

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值