CentOS 7部署Weblogic 14

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS 7部署Weblogic 14相关的知识,希望对你有一定的参考价值。

相关资源下载: JDK:JDK 1.8.0 Weblogic:Weblogic 14.1.1.0

安装Java环境

[root@weblogic ~]# tar -zxf jdk-8u251-linux-x64.tar.gz
[root@weblogic ~]# cd /usr/local/
[root@weblogic local]# mkdir jdk
[root@weblogic local]# cd jdk/
[root@weblogic jdk]# mv /root/jdk1.8.0_251 ./

[root@weblogic ~]# vim /etc/profile #在最后一行添加以下内容
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_251
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH

[root@weblogic ~]# source /etc/profile
[root@weblogic ~]# java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)

创建weblogic用户

[root@weblogic jdk]# useradd weblogic
[root@weblogic jdk]# passwd weblogic
Changing password for user weblogic.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.

安装weblogic

[root@weblogic ~]# su - weblogic
[weblogic@weblogic ~]$ unzip fmw_14.1.1.0.0_wls_quick_Disk1_1of1.zip
Archive:  fmw_14.1.1.0.0_wls_quick_Disk1_1of1.zip
  inflating: fmw_14.1.1.0.0_wls_quick.jar

创建loc文件

[weblogic@weblogic ~]$ vim oraInst.loc
inventory_loc=/home/weblogic/oraInventory
inst_group=weblogic

创建response文件

[weblogic@weblogic ~]$  vim wls.rsp
[ENGINE]
#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0
[GENERIC]
##The oracle home location. This can be an existing Oracle Home #or a new Oracle Home
# Apart from the need to install the directory, there is no need to make changes in other places.
ORACLE_HOME=/home/weblogic/Oracle/Middleware
##Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples.
INSTALL_TYPE=WebLogic Server
##Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name.
MYORACLESUPPORT_USERNAME=
##Provide the My Oracle Support Password
#MYORACLESUPPORT_PASSWORD=<SECURE VALUE>
MYORACLESUPPORT_PASSWORD=
##Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration
DECLINE_SECURITY_UPDATES=true
##Set this to true if My Oracle Support Password is specified
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
##Provide the Proxy Host
PROXY_HOST=
##Provide the Proxy Port
PROXY_PORT=
##Provide the Proxy Username
PROXY_USER=
##Provide the Proxy Password
PROXY_PWD=<SECURE VALUE>
##Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port]
COLLECTOR_SUPPORTHUB_URL=

运行安装脚本,安装时会进行检查,如jdk版本检查、cpu速度、交换空间大小、临时空间大小等,复制时会显示百分比进度条,时间较长,请耐心等待。

[weblogic@weblogic ~]$ java -jar fmw_14.1.1.0.0_wls_quick.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc -ignoreSysPrereqs
Launcher log file is /tmp/OraInstall2022-11-03_12-29-09PM/launcher2022-11-03_12-29-09PM.log.
Extracting the installer . . . . . . . . . . . . . . . . . . . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 2393.998 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 0 MB    Failed <<<<
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 16616 MB    Passed

>>> Ignoring failure(s) of required prerequisite checks and continuing.
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2022-11-03_12-29-09PM
Log: /tmp/OraInstall2022-11-03_12-29-09PM/install2022-11-03_12-29-09PM.log

*****************************************************


Distribution Name : Oracle Fusion Middleware 14.1.1 WebLogic and Coherence Developer
Distribution Version : 14.1.1.0.0

Oracle Inventory : /home/weblogic/oraInventory

Oracle Home : /home/weblogic/wls1411
Java Home : /usr/local/jdk/jdk1.8.0_251

Note: Oracle Home not supplied (defaulted to <present working dir>/wls1411)

*****************************************************

Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Validations are enabled for this session.
Verifying data
Copying Files
Percent Complete : 10
Percent Complete : 20
Percent Complete : 30
Percent Complete : 40
Percent Complete : 50
Percent Complete : 60
Percent Complete : 70
Percent Complete : 80
Percent Complete : 90
Percent Complete : 100

The installation of Oracle Fusion Middleware 14.1.1 WebLogic and Coherence Developer 14.1.1.0.0 completed successfully.
Logs successfully copied to /home/weblogic/wls1411/cfgtoollogs/oui.

创建domain域

[weblogic@weblogic ~]$ mkdir -p /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/

创建create_domain.rsp文件

[weblogic@weblogic ~]$ vim create_domain.rsp
read template from "/home/weblogic/wls1411/wlserver/common/templates/wls/wls.jar";
set JavaHome "/usr/local/jdk/jdk1.8.0_251";
set ServerStartMode "dev";
find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "";
set AdminServer.ListenPort "7001";
set AdminServer.SSL.Enabled "true";
set AdminServer.SSL.ListenPort "8002";

//We can directly create a new managed server.
create Server "base" as BASE;
set BASE.ListenAddress "";
set BASE.ListenPort "8003";
//set BASE.SSL.Enabled "true";
//set BASE.SSL.ListenPort "8004″;

//Create Machine
create Machine "base" as Machinename;

//use templates default weblogic user
find User "weblogic" as u1;
set u1.password "weblogic123";

//create a new user
create User "weblogic2" as u2;
set u2.password "weblogic123";
write domain to "/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/";

//The domain name will be "demo-domain"
close template;

配置weblogic

[weblogic@weblogic ~]$ cd /home/weblogic/wls1411/wlserver/common/bin
[weblogic@weblogic bin]$ ls
 config.sh  pack.sh  unpack.sh  wlscontrol.sh  wlsifconfig.sh  wlst.sh

[weblogic@weblogic bin]$ ./config.sh -mode=silent -silent_script=/home/weblogic/create_domain.rsp -logfile=/home/weblogic/create_domain.log
WARNING: This is a deprecated script. Please invoke the config.sh script under oracle_common/common/bin.
<< read template from "/home/weblogic/wls1411/wlserver/common/templates/wls/wls.jar"
>>  succeed: read template from "/home/weblogic/wls1411/wlserver/common/templates/wls/wls.jar"
<< set config option JavaHome to "/usr/local/jdk/jdk1.8.0_251"
>>  succeed: set config option JavaHome to "/usr/local/jdk/jdk1.8.0_251"
<< set config option ServerStartMode to "dev"
>>  succeed: set config option ServerStartMode to "dev"
<< find Server "AdminServer" as AdminServer
>>  succeed: find Server "AdminServer" as AdminServer
<< set AdminServer attribute ListenAddress to ""
>>  succeed: set AdminServer attribute ListenAddress to ""
<< set AdminServer attribute ListenPort to "7001"
>>  succeed: set AdminServer attribute ListenPort to "7001"
<< set AdminServer attribute SSL!Enabled to "true"
>>  succeed: set AdminServer attribute SSL!Enabled to "true"
<< set AdminServer attribute SSL!ListenPort to "8002"
>>  succeed: set AdminServer attribute SSL!ListenPort to "8002"
<< create Server "base" as BASE
>>  succeed: create Server "base" as BASE
<< set BASE attribute ListenAddress to ""
>>  succeed: set BASE attribute ListenAddress to ""
<< set BASE attribute ListenPort to "8003"
>>  succeed: set BASE attribute ListenPort to "8003"
<< create Machine "base" as Machinename
>>  succeed: create Machine "base" as Machinename
<< find User "weblogic" as u1
>>  succeed: find User "weblogic" as u1
<< set u1 attribute Password to "********"
>>  succeed: set u1 attribute Password to "********"
<< create User "weblogic2" as u2
>>  succeed: create User "weblogic2" as u2
<< set u2 attribute Password to "********"
>>  succeed: set u2 attribute Password to "********"
<< write Domain to "/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/"
..................................................
>>  succeed: write Domain to "/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/"
<< close template
>>  succeed: close template

启动weblogic

[weblogic@weblogic ~]$ cd Oracle/Middleware/user_projects/domains/base_domain/
[weblogic@weblogic base_domain]$ ls
autodeploy  bin  common  config  console-ext  fileRealm.properties  init-info  lib  nodemanager  resources  security  servers  startManagedWebLogic_readme.txt  startWebLogic.sh

[weblogic@weblogic base_domain]$ ./startWebLogic.sh
.
.
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000
.
CLASSPATH=/usr/local/jdk/jdk1.8.0_251/lib/tools.jar:/home/weblogic/Oracle/Middleware/wlserver/server/lib/weblogic.jar:/home/weblogic/Oracle/Middleware/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/home/weblogic/Oracle/Middleware/wlserver/modules/features/oracle.wls.common.nodemanager.jar::/home/weblogic/Oracle/Middleware/wlserver/common/derby/lib/derbynet.jar:/home/weblogic/Oracle/Middleware/wlserver/common/derby/lib/derbyclient.jar:/home/weblogic/Oracle/Middleware/wlserver/common/derby/lib/derby.jar:.:/usr/local/jdk/jdk1.8.0_251/lib:/usr/local/jdk/jdk1.8.0_251/jre/lib
.
PATH=/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin:/home/weblogic/Oracle/Middleware/wlserver/server/bin:/home/weblogic/Oracle/Middleware/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.10.5.0.0/apache-ant-1.10.5/bin:/usr/local/jdk/jdk1.8.0_251/jre/bin:/usr/local/jdk/jdk1.8.0_251/bin:/usr/local/jdk/jdk1.8.0_251/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/weblogic/.local/bin:/home/weblogic/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 WLS with line:
/usr/local/jdk/jdk1.8.0_251/bin/java -server   -Xms256m -Xmx512m -XX:CompileThreshold=8000 -cp /home/weblogic/Oracle/Middleware/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=AdminServer -Djava.security.policy=/home/weblogic/Oracle/Middleware/wlserver/server/lib/weblogic.policy  -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader  -javaagent:/home/weblogic/Oracle/Middleware/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/home/weblogic/Oracle/Middleware/wlserver/server -Dweblogic.home=/home/weblogic/Oracle/Middleware/wlserver/server     -Djava.endorsed.dirs=/usr/local/jdk/jdk1.8.0_251/jre/lib/endorsed:/home/weblogic/Oracle/Middleware/wlserver/../oracle_common/modules/endorsed:/home/weblogic/Oracle/Middleware/wlserver/modules/endorsed  weblogic.Server
<Nov 4, 2022 1:32:14 AM 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.> 
<Nov 4, 2022 1:32:14 AM UTC> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.> 
<Nov 4, 2022 1:32:16 AM UTC> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.251-b08 from Oracle Corporation.> 
<Nov 4, 2022 1:32:17 AM UTC> <Info> <Management> <BEA-141107> <Version: WebLogic Server 14.1.1.0.0  Thu Mar 26 03:15:09 GMT 2020 2000885> 
<Nov 4, 2022 1:32:20 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> 
<Nov 4, 2022 1:32:20 AM UTC> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.> 
<Nov 4, 2022 1:32:22,156 AM UTC> <Notice> <Log Management> <BEA-170019> <The server log file weblogic.logging.FileStreamHandler instance=791377977
Current log file=/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer.log
Rotation dir=/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/logs
 is opened. All server side log events will be written to this file.> 
<Nov 4, 2022 1:32:22,494 AM UTC> <Notice> <Security> <BEA-090946> <Security pre-initializing using security realm: myrealm> 
<Nov 4, 2022 1:32:24,429 AM UTC> <Notice> <Security> <BEA-090947> <Security post-initializing using security realm: myrealm> 
<Nov 4, 2022 1:32:26,745 AM UTC> <Notice> <Security> <BEA-090082> <Security initialized using administrative security realm: myrealm> 
<Nov 4, 2022 1:32:27,969 AM UTC> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://192.168.31.216:7001/jndi/weblogic.management.mbeanservers.runtime.> 
<Nov 4, 2022 1:32:29,761 AM UTC> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://192.168.31.216:7001/jndi/weblogic.management.mbeanservers.domainruntime.> 
<Nov 4, 2022 1:32:30,131 AM UTC> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://192.168.31.216:7001/jndi/weblogic.management.mbeanservers.edit.> 
<Nov 4, 2022 1:32:32,856 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.> 
<Nov 4, 2022 1:32:32,857 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> 
<Nov 4, 2022 1:32:33,013 AM UTC> <Notice> <Log Management> <BEA-170036> <The Logging monitoring service timer has started to check for logged message counts every 30 seconds.> 
<Nov 4, 2022 1:32:33,904 AM UTC> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.> 
<Nov 4, 2022 1:32:34,849 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.> 
<Nov 4, 2022 1:32:34,941 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.> 
<Nov 4, 2022 1:32:35,017 AM UTC> <Warning> <Server> <BEA-002611> <The hostname "localhost", maps to multiple IP addresses: 127.0.0.1, 0:0:0:0:0:0:0:1.> 
<Nov 4, 2022 1:32:35,085 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.> 
<Nov 4, 2022 1:32:35,254 AM UTC> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the jks keystore file /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/security/DemoIdentity.jks.> 
<Nov 4, 2022 1:32:35,259 AM UTC> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /home/weblogic/Oracle/Middleware/wlserver/server/lib/DemoTrust.jks.> 
<Nov 4, 2022 1:32:35,267 AM UTC> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /usr/local/jdk/jdk1.8.0_251/jre/lib/security/cacerts.> 
<Nov 4, 2022 1:32:35,283 AM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 192.168.31.216:8002 for protocols iiops, t3s, ldaps, https.> 
<Nov 4, 2022 1:32:35,284 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 0:0:0:0:0:0:0:1%lo:7001 for protocols iiop, t3, ldap, snmp, http.> 
<Nov 4, 2022 1:32:35,284 AM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[2]" is now listening on 127.0.0.1:8002 for protocols iiops, t3s, ldaps, https.> 
<Nov 4, 2022 1:32:35,288 AM UTC> <Notice> <WebLogicServer> <BEA-000331> <Started the WebLogic Server Administration Server "AdminServer" for domain "base_domain" running in development mode.> 
<Nov 4, 2022 1:32:35,292 AM UTC> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.> 
<Nov 4, 2022 1:32:35,304 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.31.216:7001 for protocols iiop, t3, ldap, snmp, http.> 
<Nov 4, 2022 1:32:35,305 AM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on 0:0:0:0:0:0:0:1%lo:8002 for protocols iiops, t3s, ldaps, https.> 
<Nov 4, 2022 1:32:35,305 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.> 
<Nov 4, 2022 1:32:35,305 AM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 192.168.31.216:8002 for protocols iiops, t3s, ldaps, https.> 
<Nov 4, 2022 1:32:35,306 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 0:0:0:0:0:0:0:1%lo:7001 for protocols iiop, t3, ldap, snmp, http.> 
<Nov 4, 2022 1:32:35,306 AM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[2]" is now listening on 127.0.0.1:8002 for protocols iiops, t3s, ldaps, https.> 
<Nov 4, 2022 1:32:35,307 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.31.216:7001 for protocols iiop, t3, ldap, snmp, http.> 
<Nov 4, 2022 1:32:35,307 AM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on 0:0:0:0:0:0:0:1%lo:8002 for protocols iiops, t3s, ldaps, https.> 
<Nov 4, 2022 1:32:35,329 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.> 

启动完成,访问页面

浏览器访问:https://192.168.31.216:7001/console

以上是关于CentOS 7部署Weblogic 14的主要内容,如果未能解决你的问题,请参考以下文章

windows 7本地安装的weblogic,部署项目启动报错。

Centos 7下Weblogic的安装配置

CentOS7.X环境单机环境weblogic12.1.3静默安装部署

基于CentOS 7 weblogic 12c 的安装

Centos7静默安装Weblogic12C

(求救)项目在tomcat想正常,部署到weblogic9下 一旦调用action就报空指针