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建域或是启动,好像卡死了一样,非常之慢,可以选择修改jdk的一个配置:
$JAVA_HOME/jre/lib/security/java.security文件
securerandom.source=file:/dev/urandom修改为securerandom.source=file:/dev/./urandom

创建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=
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=
##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 /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
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

启动完成,访问页面

浏览器访问:https://192.168.31.216:7001/console
CentOS 7部署Weblogic 14_第1张图片

CentOS 7部署Weblogic 14_第2张图片

你可能感兴趣的:(服务架构,centos,linux,服务器)