欢迎光临
我们一直在努力

如何在CentOS 7中设置和安装Oracle Weblogic

如何在CentOS 7中设置和安装Oracle Weblogic

在本教程中,我将指导您如何在CentOS 7操作系统上设置和安装Oracle Weblogic。 Oracle Weblogic是一种中间件工具,大型公司广泛使用它来为使用Java EE作为编程语言的应用程序提供服务。 凭借其酷炫的UI,经过验证的功能,如一致性模块(用于缓存目的),数据库集群(用于处理多个数据库连接),与其他类似工具(如Apache Tomcat,JBoss和WebSphere)相比,Oracle Weblogic显示了相当令人印象深刻的优势。 正如Oracle本身所述,WebLogic为这些模块提供了一整套服务,并自动处理应用程序行为的许多细节,而无需编程。 以下是Oracle Weblogic在高级设计中的位置示例:

在CentOS 7中安装Oracle Weblogic

1.初步说明

在本教程中,我将使用64位版本的CentOS 7.4。 请注意,即使配置是在CentOS 7下进行的,但在使用RedHat或Oracle Linux风格时,步骤和修改主要是相同的。 我之所以提到这一点的原因是Oracle Weblogic的大多数生产安装都将使用Oracle Linux本身作为操作系统。

在本教程结束时,我们将设法启动2个服务器节点,这些节点将充当由Weblogic Admin Server创建的Weblogic Managed Server。 除此之外,我们将使用管理服务器仪表板将两个受管服务器组合到一个群集组中。

2.安装阶段

由于Oracle Weblogic的目的是用JAVA编程语言提供高性能的应用程序代码,很明显中间件服务器本身的安装需要内置java运行时。因此,对于安装先决条件,我们需要安装JAVA打包到我们的管理服务器和两个受管节点。 步骤如下:

[root@weblogic_mgr opt]# wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm”
–2018-06-09 12:57:05– http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
Resolving download.oracle.com (download.oracle.com)… 23.49.16.62
Connecting to download.oracle.com (download.oracle.com)|23.49.16.62|:80… connected.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm [following]
–2018-06-09 12:57:10– https://edelivery.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
Resolving edelivery.oracle.com (edelivery.oracle.com)… 104.103.48.174, 2600:1417:58:181::2d3e, 2600:1417:58:188::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.103.48.174|:443… connected.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm?AuthParam=1528549151_b1fd01d854bc0423600a83c36240028e [following]
–2018-06-09 12:57:11– http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm?AuthParam=1528549151_b1fd01d854bc0423600a83c36240028e
Connecting to download.oracle.com (download.oracle.com)|23.49.16.62|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 169983496 (162M) [application/x-redhat-package-manager]
Saving to: ‘jdk-8u131-linux-x64.rpm’

100%[==============================================================================>] 169,983,496 2.56MB/s in 64s

2018-06-09 12:58:15 (2.54 MB/s) – ‘jdk-8u131-linux-x64.rpm’ saved [169983496/169983496]

[root@weblogic_mgr opt]# yum localinstall -y jdk-8u131-linux-x64.rpm

完成后,我们继续修改环境路径,在每个服务器节点内创建JAVA_HOME变量。 以下是步骤:

[root@weblogic_mgr opt]# vi /root/.bash_profile
export JAVA_HOME=/usr/java/jdk1.8.0_131
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin
export PATH

[root@weblogic_mgr opt]# source /root/.bash_profile
[root@weblogic_mgr opt]# java -version
java version “1.8.0_131”
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

对于Oracle数据库安装,必须使用非root用户完成安装。 这也适用于Oracle Weblogic安装。 至于该策略,继续让我们创建其他用户以成为Oracle Weblogic的所有者。 以下是步骤:

[root@weblogic_mgr opt]# useradd -s /bin/bash shahril

[root@weblogic_mgr opt]# passwd shahril
Changing password for user shahril.
New password:
BAD PASSWORD: The password fails the dictionary check – it is too simplistic/systematic
Retype new password:
passwd: all authentication tokens updated successfully.

[root@weblogic_mgr opt]# su – shahril
[shahril@weblogic_mgr ~]$ pwd
/home/shahril

在我们继续之前,让我们为weblogic所有者用户配置所需变量的环境变量。 以下是需要分配的最佳实践变量:

  1. ORACLE_BASE ::默认Oracle安装程序目录位置
  2. ORACLE_HOME ::默认Oracle数据库目录位置/可选(如果有Oracle客户端)
  3. MW_HOME ::默认中间件安装程序目录位置
  4. WLS_HOME ::默认Oracle Weblogic受管服务器目录位置
  5. WL_HOME ::默认Oracle Weblogic管理服务器目录位置
  6. DOMAIN_BASE ::默认的Oracle Weblogic全局域
  7. DOMAIN_HOME ::默认的Oracle Weblogic特定域

[shahril@weblogic_mgr wls]$ vi /home/shahril/.bash_profile

export ORACLE_BASE=/home/shahril/wls/oracle
export ORACLE_HOME=$ORACLE_BASE/product/fmw12
export MW_HOME=$ORACLE_HOME
export WLS_HOME=$MW_HOME/wlserver
export WL_HOME=$WLS_HOME
export DOMAIN_BASE=$ORACLE_BASE/config/domains
export DOMAIN_HOME=$DOMAIN_BASE/TEST

export JAVA_HOME=/usr/java/jdk1.8.0_131
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin
export PATH

[shahril@weblogic_mgr wls]$ source /home/shahril/.bash_profile
[shahril@weblogic_mgr wls]$ mkdir -p $ORACLE_BASE
[shahril@weblogic_mgr wls]$ mkdir -p $DOMAIN_BASE
[shahril@weblogic_mgr wls]$ mkdir -p $ORACLE_HOME
[shahril@weblogic_mgr wls]$ mkdir -p $ORACLE_BASE/config/applications
[shahril@weblogic_mgr wls]$ mkdir -p /home/shahril/wls/oraInventory

完成后,让我们创建一个名为oraInst.loc和wls.rsp的文件。 对于文件名oraInst.loc:在Oracle Weblogic安装期间需要此文件来定义库存位置。 对于文件名wls.rsp,它是可选的,因为它充当将在安装期间使用的响应文件。 然而,随着我们将继续从命令行界面(CLI)进行安装,wls.rsp将是我们必须拥有的。 现在,让我们按照以下步骤继续:

[shahril@weblogic_mgr wls]$ pwd
/home/shahril/wls
[shahril@weblogic_mgr wls]$ vi oraInst.loc

inventory_loc=/home/shahril/wls/oraInventory
inst_group=shahril

[shahril@weblogic_mgr wls]$ vi wls.rsp

[ENGINE]
Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/home/shahril/wls/oracle/product/fmw12
INSTALL_TYPE=WebLogic Server
DECLINE_SECURITY_UPDATES=true
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

随着exthingthing到位,让我们继续下载Oracle Weblogic安装程序。 您可以在此处访问网站URL并选择您喜欢的Oracle Weblogic版本。

在我们的例子中,我们将继续下载Oracle Weblogic版本12.1.3,因为它是迄今为止最新且最稳定的版本(基于我目前面临的经验)。 以下是步骤:

[shahril@weblogic_mgr ~]$ cd $ORACLE_BASE
[shahril@weblogic_mgr oracle]$ wget http://download.oracle.com/otn/nt/middleware/12c/wls/1213/fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df
–2018-06-28 16:24:15– http://download.oracle.com/otn/nt/middleware/12c/wls/1213/fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df
Resolving download.oracle.com (download.oracle.com)… 23.74.208.198
Connecting to download.oracle.com (download.oracle.com)|23.74.208.198|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 923179081 (880M) [application/x-jar]
Saving to: ‘fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df’

100%[=================================================================>] 923,179,081 1.05MB/s in 16m 4s

2018-06-28 16:40:24 (935 KB/s) – ‘fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df’ saved [923179081/923179081]

[shahril@weblogic_mgr oracle]$ mv fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df fmw_12.1.3.0.0_wls.jar

接下来,继续安装。 步骤如下所示:

[shahril@weblogic_mgr wls]$ java -jar /home/shahril/wls/oracle/fmw_12.1.3.0.0_wls.jar -silent -responseFile /home/shahril/wls/wls.rsp -invPtrLoc /home/shahril/wls/oraInst.loc
Launcher log file is /tmp/OraInstall2018-06-10_12-44-24PM/launcher2018-06-10_12-44-24PM.log.
Extracting files…….
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz. Actual 3199.968 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 7815164 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 393285 MB Passed

Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2018-06-10_12-44-24PM
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Log: /tmp/OraInstall2018-06-10_12-44-24PM/install2018-06-10_12-44-24PM.log
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Starting check : CertifiedVersions
/bin/cat: /proc/sys/net/core/wmem_default: No such file or directory
Starting check : CheckJDKVersion
Expected result: 1.7.0_15
Actual Result: 1.8.0_131
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/OraInstall2018-06-10_12-44-24PM/install2018-06-10_12-44-24PM.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/shahril/wls/oraInventory/logs.

优秀! 现在我们已经在CentOS 7服务器上成功安装了Oracle Weblogic。 接下来,我们将继续进行配置阶段。

3.配置阶段

现在我们在配置部分,需要进行2级配置,它们是:

  1. Weblogic配置
  2. 域配置

对于Weblogic Administration服务器,我们需要将两个配置作为weblogic的主命令进行weblogic配置。 但是对于每个将充当实例节点的Weblogic托管服务器,它只需要在域初始化期间设置Weblogic配置,管理员可以决定哪个实例节点将用于哪个项目域。 以下是weblogic域如何工作的简单示例:

Weblogic架构

对于每个weblogic受管服务器,您可以根据需要创建任意数量的实例节点,这取决于您的服务器资源分配,因为每个实例节点都将指向其专用项目域。 指向管理服务器仪表板可以轻松完成哪个实例节点的域。

简而言之,现在让我们为管理服务器部分设置weblogic和域配置的配置。 为了简化教程过程,我们只创建一个名为TEST的域。 以下是步骤: –

[shahril@weblogic_mgr wls]$ cd $WL_HOME
[shahril@weblogic_mgr wlserver]$ cd common/bin/
[shahril@weblogic_mgr bin]$ ./commEnv.sh
[shahril@weblogic_mgr bin]$ ./wlst.sh
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Initializing WebLogic Scripting Tool (WLST) …
Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline> readTemplate(‘/home/shahril/wls/oracle/product/fmw12/wlserver/common/templates/wls/wls.jar’)
wls:/offline/base_domain>cd(‘Servers/AdminServer’)
wls:/offline/base_domain/Server/AdminServer>set(‘ListenAddress’,’172.17.0.6′)
wls:/offline/base_domain/Server/AdminServer>set(‘ListenPort’,7001) ## Port that will be assign to each domain

wls:/offline/base_domain/Server/AdminServer>create(‘AdminServer’,’SSL’)
Proxy for AdminServer: Name=AdminServer, Type=SSL

wls:/offline/base_domain/Server/AdminServer>cd(‘SSL/AdminServer’)
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set(‘Enabled’,’True’)
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set(‘ListenPort’,7002)

wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>cd(‘/’)
wls:/offline/base_domain>cd(‘Security/base_domain/User/weblogic’)
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword(‘Test1234’)
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption(‘OverwriteDomain’,’true’)
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain(‘/home/shahril/wls/oracle/config/domains/TEST’)

wls:/offline/TEST/Security/TEST/User/weblogic>closeTemplate()
wls:/offline>exit()

Exiting WebLogic Scripting Tool.

太好了,现在我们已经完成了两者的配置,现在让我们在管理服务器上启动weblogic和TEST服务。 以下是步骤:

[shahril@weblogic_mgr bin]$ cd $DOMAIN_HOME
[shahril@weblogic_mgr TEST]$ cd bin/
[shahril@weblogic_mgr bin]$ pwd
/home/shahril/wls/oracle/config/domains/TEST/bin

[shahril@weblogic_mgr bin]$ ./startWebLogic.sh &
[1] 19303
[shahril@weblogic_mgr bin]$ .
.
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m
.
CLASSPATH=/usr/java/jdk1.8.0_131/lib/tools.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/weblogic_sp.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/weblogic.jar:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/net.sf.antcontrib_1.1.0.0_1-0b3/lib/ant-contrib.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/modules/features/oracle.wls.common.nodemanager_2.0.0.0.jar:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/com.oracle.cie.config-wls-online_8.1.0.0.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/common/derby/lib/derbyclient.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/common/derby/lib/derby.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/xqrl.jar .
PATH=/home/shahril/wls/oracle/product/fmw12/wlserver/server/bin:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/org.apache.ant_1.9.2/bin:/usr/java/jdk1.8.0_131/jre/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/shahril/bin:/home/shahril/bin:/home/shahril/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.8.0_131”
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Starting WLS with line:
/usr/java/jdk1.8.0_131/bin/java -server -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/weblogic.policy -Xverify:none -Djava.endorsed.dirs=/usr/java/jdk1.8.0_131/jre/lib/endorsed:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/endorsed -da -Dwls.home=/home/shahril/wls/oracle/product/fmw12/wlserver/server -Dweblogic.home=/home/shahril/wls/oracle/product/fmw12/wlserver/server -Dweblogic.utils.cmm.lowertier.ServiceDisabled=true weblogic.Server
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Jun 10, 2018 1:11:46 PM UTC Info Security BEA-090905 Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.
Jun 10, 2018 1:11:46 PM UTC Info Security BEA-090906 Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.
Jun 10, 2018 1:11:47 PM UTC Info WebLogicServer BEA-000377 Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.131-b11 from Oracle Corporation.
Jun 10, 2018 1:11:47 PM UTC Info Management BEA-141107 Version: WebLogic Server 12.1.3.0.0 Wed May 21 18:53:34 PDT 2014 1604337
Jun 10, 2018 1:11:48 PM UTC Notice WebLogicServer BEA-000365 Server state changed to STARTING.
Jun 10, 2018 1:11:48 PM UTC Info WorkManager BEA-002900 Initializing self-tuning thread pool.
Jun 10, 2018 1:11:48 PM UTC Info WorkManager BEA-002942 CMM memory level becomes 0. Setting standby thread pool size to 256.
Jun 10, 2018 1:11:48 PM UTC Notice Log Management BEA-170019 The server log file /home/shahril/wls/oracle/config/domains/TEST/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.
Jun 10, 2018 1:11:50 PM UTC Notice Security BEA-090082 Security initializing using security realm myrealm.
Jun 10, 2018 1:11:51 PM UTC Notice WebLogicServer BEA-000365 Server state changed to STANDBY.
Jun 10, 2018 1:11:51 PM UTC Notice WebLogicServer BEA-000365 Server state changed to STARTING.
Jun 10, 2018 1:11:51 PM weblogic.wsee.WseeCoreMessages logWseeServiceStarting

INFO: The Wsee Service is starting

Jun 10, 2018 1:11:51 PM UTC Notice Log Management BEA-170027 The server has successfully established a connection with the Domain level Diagnostic Service.
Jun 10, 2018 1:11:51 PM UTC Notice WebLogicServer BEA-000365 Server state changed to ADMIN.
Jun 10, 2018 1:11:51 PM UTC Notice WebLogicServer BEA-000365 Server state changed to RESUMING.
Jun 10, 2018 1:11:51 PM UTC Notice Security BEA-090171 Loading the identity certificate and private key stored under the alias DemoIdentity from the jks keystore file /home/shahril/wls/oracle/config/domains/TEST/security/DemoIdentity.jks.
Jun 10, 2018 1:11:51 PM UTC Notice Security BEA-090169 Loading trusted certificates from the jks keystore file /home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/DemoTrust.jks.
Jun 10, 2018 1:11:51 PM UTC Notice Security BEA-090169 Loading trusted certificates from the jks keystore file /usr/java/jdk1.8.0_131/jre/lib/security/cacerts.
Jun 10, 2018 1:11:51 PM UTC Notice Server BEA-002613 Channel “DefaultSecure” is now listening on 172.17.0.6:7002 for protocols iiops, t3s, ldaps, https.
Jun 10, 2018 1:11:51 PM UTC Notice Server BEA-002613 Channel “Default” is now listening on 172.17.0.6:7001 for protocols iiop, t3, ldap, snmp, http.
Jun 10, 2018 1:11:51 PM UTC Notice WebLogicServer BEA-000331 Started the WebLogic Server Administration Server “AdminServer” for domain “TEST” running in development mode.
Jun 10, 2018 1:11:51 PM UTC Notice WebLogicServer BEA-000360 The server started in RUNNING mode.
Jun 10, 2018 1:11:52 PM UTC Notice WebLogicServer BEA-000365 Server state changed to RUNNING.

[shahril@weblogic_mgr bin]$ netstat -apn|grep -i :70
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 172.17.0.6:7001 0.0.0.0:* LISTEN 19360/java
tcp 0 0 172.17.0.6:7002 0.0.0.0:* LISTEN 19360/java

优秀! 现在我们在管理服务器部分进行了完整配置。 现在,由于复杂的部件已经完成,您可以放松,喝杯咖啡然后只复制Weblogic配置并将其粘贴到每个受管服务器节点上。 以下是步骤: –

[shahril@weblogic_mgr bin]$ $WL_HOME/common/bin/pack.sh -domain=$DOMAIN_HOME -template=$WL_HOME/common/templates/domains/TEST_template.jar -template_name=TEST -managed=true
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
<< read domain from “/home/shahril/wls/oracle/config/domains/TEST”
>> succeed: read domain from “/home/shahril/wls/oracle/config/domains/TEST”
<< set config option Managed to “true”
>> succeed: set config option Managed to “true”
<< write template to “/home/shahril/wls/oracle/product/fmw12/wlserver/common/templates/domains/TEST_template.jar”
………………………………………………………………………………
>> succeed: write template to “/home/shahril/wls/oracle/product/fmw12/wlserver/common/templates/domains/TEST_template.jar”
<< close template
>> succeed: close template

[shahril@weblogic_mgr ~]$ ls -lh $WL_HOME/common/templates/domains/TEST_template.jar
-rw-r—– 1 shahril shahril 51K Jun 10 14:11 /home/shahril/wls/oracle/product/fmw12/wlserver/common/templates/domains/TEST_template.jar

如上所示,我们已将weblogic配置的副本复制到jar文件中。 我们将只将此jar文件带到每个weblogic托管服务器并从那里进行设置。

[shahril@weblogic_mgr ~]$ scp -r /home/shahril/wls/oracle/product/fmw12/wlserver/common/templates/domains/TEST_template.jar 172.17.0.7:/home/shahril/wls/
shahril@172.17.0.7’s password:
TEST_template.jar 100% 50KB 58.2MB/s 00:00

现在转到托管服务器并解压缩复制的jar文件。 不需要配置,因为它将带来我们创建的相关域。 以下是步骤:

[shahril@weblogic_node1 ~]$ cd $WL_HOME
[shahril@weblogic_node1 wlserver]$ pwd
/home/shahril/wls/oracle/product/fmw12/wlserver
[shahril@weblogic_node1 wlserver]$ $WL_HOME/common/bin/unpack.sh -template=/home/shahril/wls/TEST_template.jar -domain=$DOMAIN_HOME
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
<< read template from “/home/shahril/wls/TEST_template.jar”
>> succeed: read template from “/home/shahril/wls/TEST_template.jar”
<< set config option DomainName to “TEST”
>> succeed: set config option DomainName to “TEST”
<< write Domain to “/home/shahril/wls/oracle/config/domains/TEST”
……………………………………………………………………………………….
>> succeed: write Domain to “/home/shahril/wls/oracle/config/domains/TEST”
<< close template
>> succeed: close template

优秀! 我们已成功提取复制的weblogic配置。 下一步,让我们在托管服务器中启动Weblogic服务。 以下是步骤:

[shahril@weblogic_node1 wlserver]$ cd $DOMAIN_HOME
[shahril@weblogic_node1 TEST]$ cd bin/
[shahril@weblogic_node1 bin]$ ./stopManagedWebLogic.sh Node_Server01 t3://172.17.0.6:7001 weblogic Test1234
Stopping Weblogic Server…
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Initializing WebLogic Scripting Tool (WLST) …
Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://172.17.0.6:7001 with userid weblogic …
Successfully connected to Admin Server “AdminServer” that belongs to domain “TEST”.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

Shutting down the server Node_Server01 with force=false while connected to AdminServer …
No stack trace available.
Problem invoking WLST – Traceback (innermost last):
File “/home/shahril/wls/oracle/config/domains/TEST/shutdown-Node_Server01.py”, line 4, in ?
File ““, line 1199, in shutdown
File ““, line 552, in raiseWLSTException
WLSTException: Error occurred while performing shutdown : No Server with name “Node_Server01” configured in the domain

Done
Stopping Derby Server…

[shahril@weblogic_node1 bin]$ ./startManagedWebLogic.sh Node_Server01 t3://172.17.0.6:7001 &
[1] 5378
[shahril@weblogic_node1 bin]$ .
.
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m
.
CLASSPATH=/usr/java/jdk1.8.0_131/lib/tools.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/weblogic_sp.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/weblogic.jar:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/net.sf.antcontrib_1.1.0.0_1-0b3/lib/ant-contrib.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/modules/features/oracle.wls.common.nodemanager_2.0.0.0.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/common/derby/lib/derbyclient.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/common/derby/lib/derby.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/xqrl.jar
.
PATH=/home/shahril/wls/oracle/product/fmw12/wlserver/server/bin:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/org.apache.ant_1.9.2/bin:/usr/java/jdk1.8.0_131/jre/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/shahril/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.8.0_131”
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Starting WLS with line:
/usr/java/jdk1.8.0_131/bin/java -server -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m -Dweblogic.Name=Node_Server01 -Djava.security.policy=/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/weblogic.policy -Dweblogic.security.SSL.trustedCAKeyStore=/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/cacerts -Xverify:none -Djava.endorsed.dirs=/usr/java/jdk1.8.0_131/jre/lib/endorsed:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/endorsed -da -Dwls.home=/home/shahril/wls/oracle/product/fmw12/wlserver/server -Dweblogic.home=/home/shahril/wls/oracle/product/fmw12/wlserver/server -Dweblogic.management.server=t3://172.17.0.6:7001 -Dweblogic.utils.cmm.lowertier.ServiceDisabled=true weblogic.Server
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Jun 10, 2018 3:29:41 PM UTC Info Security BEA-090905 Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.
Jun 10, 2018 3:29:41 PM UTC Info Security BEA-090906 Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.
Jun 10, 2018 3:29:42 PM UTC Info WebLogicServer BEA-000377 Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.131-b11 from Oracle Corporation.
Jun 10, 2018 3:29:42 PM UTC Info Management BEA-141107 Version: WebLogic Server 12.1.3.0.0 Wed May 21 18:53:34 PDT 2014 1604337
Jun 10, 2018 3:29:43 PM UTC Notice WebLogicServer BEA-000365 Server state changed to STARTING.
Jun 10, 2018 3:29:43 PM UTC Info WorkManager BEA-002900 Initializing self-tuning thread pool.
Jun 10, 2018 3:29:43 PM UTC Info WorkManager BEA-002942 CMM memory level becomes 0. Setting standby thread pool size to 256.
Jun 10, 2018 3:29:43 PM UTC Notice Log Management BEA-170019 The server log file /home/shahril/wls/oracle/config/domains/TEST/servers/Node_Server01/logs/Node_Server01.log is opened. All server side log events will be written to this file.
Jun 10, 2018 3:29:45 PM UTC Notice Security BEA-090082 Security initializing using security realm myrealm.
Jun 10, 2018 3:29:46 PM UTC Notice WebLogicServer BEA-000365 Server state changed to STANDBY.
Jun 10, 2018 3:29:46 PM UTC Notice WebLogicServer BEA-000365 Server state changed to STARTING.
Jun 10, 2018 3:29:46 PM weblogic.wsee.WseeCoreMessages logWseeServiceStarting
INFO: The Wsee Service is starting

Jun 10, 2018 3:29:48 PM UTC Notice Log Management BEA-170027 The server has successfully established a connection with the Domain level Diagnostic Service.
Jun 10, 2018 3:29:48 PM UTC Notice Cluster BEA-000197 Listening for announcements from cluster using unicast cluster messaging
Jun 10, 2018 3:29:48 PM UTC Notice WebLogicServer BEA-000365 Server state changed to ADMIN.
Jun 10, 2018 3:29:48 PM UTC Notice WebLogicServer BEA-000365 Server state changed to RESUMING.
Jun 10, 2018 3:29:48 PM UTC Notice Cluster BEA-000162 Starting “async” replication service with remote cluster address “null”
Jun 10, 2018 3:29:48 PM UTC Notice Server BEA-002613 Channel “Default” is now listening on 172.17.0.7:8001 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.
Jun 10, 2018 3:29:48 PM UTC Notice WebLogicServer BEA-000332 Started the WebLogic Server Managed Server “Node_Server01” for domain “TEST” running in development mode.
Jun 10, 2018 3:29:48 PM UTC Notice WebLogicServer BEA-000360 The server started in RUNNING mode.
Jun 10, 2018 3:29:48 PM UTC Notice WebLogicServer BEA-000365 Server state changed to RUNNING.

大! 现在,我们已在托管服务器上成功配置了weblogic服务。 您可以将该过程执行到其他受管服务器,稍后我们将从管理服务器仪表板定义集群分组。

4.测试阶段

为了确保我们的Weblogic架构按预期工作,我们将在我们的服务器上应用简单的测试配置。 对于此测试,我们将打开Weblogic管理服务器仪表板,并从仪表板控制台本身将我们的2个托管服务器添加到环境中并将它们定义为集群。

现在,让我们通过http://172.17.0.6:7001/console打开我们的管理仪表板。 如前所述,对于此测试,我们只创建了1个DOMAIN,即TEST,因此默认端口7001专用于此域。 对于多个域,配置可以由其自己的专用端口分隔。 在浏览器中启动URL后,您应该看到如下控制台,输入我们在上面的配置中定义的用户名和密码。 对于这个测试,它是weblogic / Test1234: –

Oracle Weblogic服务器登录

成功登录后,您将看到如下所示的完整仪表板:

Oracle weblogic仪表板

要继续我们的测试,请从仪表板中单击环境 – >服务器选项卡。 您将看到如下所示的结果,其中Weblogic Admin服务器已自动包含在TEST域中。

WebLogic中的服务器选项卡

接下来,单击按钮 ,它会转发到下面的页面。 按照所示的IPlog地址和weblogic端口填写Weblogic Managed Server信息,然后单击“下一步”。

添加新服务器

之后,定义要单击下一步的新群集名称。 默认保留其他人,如下例所示:

定义一个集群

太棒了,现在你已经在新创建的weblogic集群中包含了一个实例节点。 以下是示例快照:

包含节点实例

现在,让我们打开实例节点。 对于这种情况,我们将返回到CLI shell并启动weblogic托管服务器,就像我们之前使用的命令一样,如下所示:

[shahril@weblogic_node1 wlserver]$ cd $DOMAIN_HOME
[shahril@weblogic_node1 TEST]$ cd bin/
[shahril@weblogic_node1 bin]$ ./startManagedWebLogic.sh Node_Server01 t3://172.17.0.6:7001 &

完成后,返回管理员URL并刷新仪表板。 您将看到现在已建立的实例节点已启动并正在运行。 以下是示例屏幕截图:

示例设置

接下来,使用相同的过程将另一个Weblogic Managed Server添加到定义的集群中。 作为最终结果,您将看到已添加的所有实例节点都已启动并正在运行并处于负载平衡模式。 以下是示例结果:

将另一个群集添加到WebLogic

恭喜! 现在,您已成功创建了一个新的weblogic集群架构。

赞(0) 打赏
未经允许不得转载:老赵部落 » 如何在CentOS 7中设置和安装Oracle Weblogic
data-ad-format="auto" data-full-width-responsive="true">

评论 抢沙发