Weblogic 12.2.1.3.0靜默安裝

1.創建組  用戶

[root@rhel6 Packages]# groupadd weblogic12
[root@rhel6 Packages]# useradd -g weblogic12 weblogic12

2.安裝JDK

[weblogic12@rhel6 ~]$ tar -zxvf jdk-8u231-linux-x64.tar.gz

3.下載weblogic安裝包 解壓

https://www.oracle.com/middleware/technologies/weblogic-server-installers-downloads.html

[weblogic12@rhel6 ~]$ unzip fmw_12.2.1.3.0_wls_Disk1_1of1.zip 
Archive:  fmw_12.2.1.3.0_wls_Disk1_1of1.zip
  inflating: fmw_12.2.1.3.0_wls.jar  
  inflating: fmw_12213_readme.htm

4.配置環境變量

export JAVA_HOME=/home/weblogic12/jdk1.8.0_231
export JRE_HOME=/home/weblogic12/jdk1.8.0_231/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH

5.配置responseFile和oraInst.loc

[weblogic12@rhel6 ~]$ more oraInst.loc 
#Oracle Installer Location File Location
inst_group=weblogic12
inventory_loc=/home/weblogic12/oraInventory
[weblogic12@rhel6 ~]$ more 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
ORACLE_HOME=/home/weblogic12/weblogic
#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=
#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=


6.安裝weblogic

[weblogic12@rhel6 ~]$ java -jar fmw_12.2.1.3.0_wls.jar  -responseFile /home/weblogic12/wls.rsp -invPtrLoc /home/weblogic12/oraInst.loc -silent
Launcher log file is /tmp/OraInstall2019-11-02_08-37-51PM/launcher2019-11-02_08-37-51PM.log.
Extracting the installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 2808.001 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 4095 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 1177 MB    Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2019-11-02_08-37-51PM
Log: /tmp/OraInstall2019-11-02_08-37-51PM/install2019-11-02_08-37-51PM.log
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Starting check : CertifiedVersions
Expected result: One of oracle-6, oracle-7, redhat-7, redhat-6, SuSE-11, SuSE-12
Actual Result: redhat-6.8
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.


Starting check : CheckJDKVersion
Expected result: 1.8.0_131
Actual Result: 1.8.0_231
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.


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 12c WebLogic Server and Coherence 12.2.1.3.0 completed successfully.
Logs successfully copied to /home/weblogic12/oraInventory/logs.


7.創建base domain

創建目錄

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

配置responseFile

[weblogic12@rhel6 ~]$ more weblogic/create_domain.rsp 
read template from "/home/weblogic12/weblogic/wlserver/common/templates/wls/wls.jar";
set JavaHome "/home/weblogic12/jdk1.8.0_231";
set ServerStartMode "dev";
find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "";
set AdminServer.ListenPort "18001";
set AdminServer.SSL.Enabled "true";
set AdminServer.SSL.ListenPort "18002";
//We can directly create a new managed server.
create Server "base" as BASE;
set BASE.ListenAddress "";
set BASE.ListenPort "18003";
//set BASE.SSL.Enabled "true";
//set BASE.SSL.ListenPort "18004″;
//Create Machine
create Machine "base" as Machinename;
//use templates default weblogic user
find User "weblogic" as u1;
set u1.password "weblogic";
//create a new user
create User "weblogic2" as u2;
set u2.password "weblogic";
write domain to "/home/weblogic12/weblogic/Oracle/Middleware/user_projects/domains/base_domain/";
//The domain name will be "demo-domain"
close template;

執行命令創建domain

[weblogic12@rhel6 bin]$ ./config.sh -mode=silent -silent_script=/home/weblogic12/weblogic/create_domain.rsp -logfile=/home/weblogic12/weblogic/create_domain.log
<< read template from "/home/weblogic12/weblogic/wlserver/common/templates/wls/wls.jar"
>>  succeed: read template from "/home/weblogic12/weblogic/wlserver/common/templates/wls/wls.jar"
<< set config option JavaHome to "/home/weblogic12/jdk1.8.0_231"
>>  succeed: set config option JavaHome to "/home/weblogic12/jdk1.8.0_231"
<< 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 "18001"
>>  succeed: set AdminServer attribute ListenPort to "18001"
<< set AdminServer attribute SSL!Enabled to "true"
>>  succeed: set AdminServer attribute SSL!Enabled to "true"
<< set AdminServer attribute SSL!ListenPort to "18002"
>>  succeed: set AdminServer attribute SSL!ListenPort to "18002"
<< 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 "18003"
>>  succeed: set BASE attribute ListenPort to "18003"
<< 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/weblogic12/weblogic/Oracle/Middleware/user_projects/domains/base_domain/"
..................................................
>>  succeed: write Domain to "/home/weblogic12/weblogic/Oracle/Middleware/user_projects/domains/base_domain/"
<< close template
>>  succeed: close template

8.啓動weblogic

[weblogic12@rhel6 bin]$ cd /home/weblogic12/weblogic/Oracle/Middleware/user_projects/domains/base_domain/
[weblogic12@rhel6 base_domain]$ nohup ./startWebLogic.sh &


9.啓動被管服務

[weblogic12@rhel6 bin]$ weblogic12@rhel6 bin]$ nohup ./startManagedWebLogic.sh base http://localhost:18001 &

 

遇到的問題:

1.安裝時提示
[VALIDATION] [ERROR]:INST-07319: Validation of Oracle Home location failed. The location specified already exists and is a nonempty directory and not a valid Oracle Home
[VALIDATION] [SUGGESTION]:Provide an empty or nonexistent directory location, or a valid existing Oracle Home
installation Failed. Exiting installation due to data validation failure.

很直觀的報錯,ORACLE_HOME=/home/weblogic12/weblogic這個文件夾裏不能有文件


2.安裝時提示
The OpenJDK JVM is not supported on this platform.

JDK的版本不支持
Installation fails with: "The OpenJDK JVM is not supported on this platform" (文檔 ID 1948742.1)

可以從這個網址上下載安裝包:
https://download.oracle.com/otn/java/jdk/8u231-b11/5b13a193868b4bf28bcb45c792fce896/jdk-8u231-linux-x64.tar.gz

發佈了91 篇原創文章 · 獲贊 14 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章