Oracle Linux 7.1 靜默安裝Weblogic 12.2.1.3

eric0435發表於2023-03-10

安裝前準備
下載軟體
Java SE 8 (jdk-linux-x64.tar.gz)
WebLogic Server 12cR2 (12.2.1) (fmw_12.2.1.3.0_wls.jar)

1.建立weblogic使用者
[root@localhost java]# id weblogic
id: weblogic: no such user
[root@localhost java]# groupadd weblogic
[root@localhost java]# useradd -g weblogic weblogic
[root@localhost java]# passwd weblogic
Changing password for user weblogic.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

2.安裝java
[root@localhost soft]# mkdir -p /usr/java
[root@localhost soft]# tar -zxvf jdk-linux-x64.tar.gz -C /usr/java

3.配置JAVA_HOME
[root@localhost ~]# cd /usr/java
[root@localhost java]# ll
total 4
drwxr-xr-x. 8 10 143 4096 Mar 15 2017 jdk1.8.0_131
[root@localhost java]# cp /etc/profile /etc/profile20230309
[root@localhost java]# vi /etc/profile
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.

pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}

if [ -x /usr/bin/id ]; then
if [ -z "$EUID" ]; then
# ksh workaround
EUID=`id -u`
UID=`id -ru`
fi
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi

# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
fi

HOSTNAME=`/usr/bin/hostname 2>/dev/null`
HISTSIZE=1000
if [ "$HISTCONTROL" = "ignorespace" ] ; then
export HISTCONTROL=ignoreboth
else
export HISTCONTROL=ignoredups
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

# By default, we want umask to get set. This sets it for login shell
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
umask 002
else
umask 022
fi

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "${-#*i}" != "$-" ]; then
. "$i"
else
. "$i" >/dev/null
fi
fi
done

#java
JAVA_HOME=/usr/java/jdk1.8.0_131
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export PATH JAVA_HOME CLASSPATH
"/etc/profile" 82L, 1906C written
[root@localhost java]# source /etc/profile

4.檢視java -version
[root@localhost java]# 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)

5.建立目錄,並設定許可權
[weblogic@localhost weblogic]$ mkdir -p /weblogic/Oracle/Middleware
[weblogic@localhost weblogic]$ chmod -R 775 /weblogic/Oracle/Middleware

[root@localhost soft]# vi /etc/profile
#weblogic
export MW_HOME=/weblogic/Oracle/Middleware
export WLS_HOME=$MW_HOME/wlserver
export WL_HOME=$WLS_HOME

[root@localhost ~]# source /etc/profile
[root@localhost ~]# echo

[root@localhost ~]# echo $MW_HOME
/weblogic/Oracle/Middleware
[root@localhost ~]# su - weblogic
Last login: Fri Mar 10 07:56:30 CST 2023 on pts/1
[weblogic@localhost ~]$ 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)
[weblogic@localhost ~]$ echo $MW_HOME
/weblogic/Oracle/Middleware

安裝weblogic軟體
6.建立響應檔案
編輯檔案/weblogic/wls.rsp
[weblogic@localhost weblogic]$ vi wls.rsp
[ENGINE]
Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/weblogic/Oracle/Middleware
INSTALL_TYPE=WebLogic Server
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=<SECURE VALUE>
DECLINE_SECURITY_UPDATES=true
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=<SECURE VALUE>
COLLECTOR_SUPPORTHUB_URL=

7.指定Oracle的庫存位置
編輯檔案/weblogic/oraInst.loc
[weblogic@localhost weblogic]$ vi oraInst.loc

inventory_loc=/weblogic/oraInventory

inst_group=weblogic

[weblogic@localhost weblogic]$ mkdir -p /weblogic/oraInventory
[weblogic@localhost weblogic]$ ll
total 819548
-r-xr-xr-x. 1 weblogic weblogic 839208313 Aug 22 2017 fmw_12.2.1.3.0_wls.jar
drwxrwxr-x. 3 weblogic weblogic 23 Mar 10 08:00 Oracle
-rw-rw-r--. 1 weblogic weblogic 59 Mar 9 15:34 oraInst.loc
drwxrwxr-x. 2 weblogic weblogic 6 Mar 10 08:11 oraInventory
-rw-rw-r--. 1 weblogic weblogic 342 Mar 10 08:09 wls.rsp

8.安裝weblogic
[weblogic@localhost weblogic]$ java -Xmx1024m -jar /weblogic/fmw_12.2.1.3.0_wls.jar -silent -responseFile /weblogic/wls.rsp -invPtrLoc /weblogic/oraInst.loc
Launcher log file is /tmp/OraInstall2023-03-10_08-16-04AM/launcher2023-03-10_08-16-04AM.log.
Extracting the installer . . . . . . . Done
Checking if CPU speed is above 300 MHz. Actual 2000.000 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 8063 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 81295 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2023-03-10_08-16-04AM
Log: /tmp/OraInstall2023-03-10_08-16-04AM/install2023-03-10_08-16-04AM.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: oracle-7.1
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_131
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 /weblogic/oraInventory/logs.

9.建立domain域名

[weblogic@localhost bin]$ ./wlst.sh
WARNING: This is a deprecated script. Please invoke the wlst.sh script under oracle_common/common/bin.

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline> readTemplate('/weblogic/Oracle/Middleware/wlserver/common/templates/wls/wls.jar')
WARNING: The readTemplate is deprecated. Use selectTemplate followed by loadTemplates in place of readTemplate.
wls:/offline/base_domain>cd('Servers/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','')
wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 7001)
wls:/offline/base_domain/Server/AdminServer>cd('/')
wls:/offline/base_domain>cd('Security/base_domain/User/weblogic')
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('Xxzx$7817600')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/weblogic/Oracle/Middleware/user_projects/domains/base_domain')
wls:/offline/base_domain/Security/base_domain/User/weblogic>closeTemplate()
wls:/offline>exit()

Exiting WebLogic Scripting Tool.

10.啟動weblogic
修改weblogic埠號和IP
[weblogic@localhost config]$ vi config.xml
....
<server>
<name>AdminServer</name>
<listen-port>7001</listen-port>
<iiop-enabled>false</iiop-enabled>
<listen-address>10.13.13.4</listen-address>
</server>
.....

設定免密啟動/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/security目錄下,編輯檔案boot.properties
[weblogic@localhost security]$ cat boot.properties
# Generated by Configuration Wizard on Fri Mar 10 09:20:49 CST 2023
username={AES}m1DMhibRLp4hckxgycOV3fFtVs309buJFfJPxHa162Q=
password={AES}1UeQbtMNEYL40/c37MYUTfpPIoON7ql50cD/tparxp0=
[weblogic@localhost security]$ vi boot.properties
# Generated by Configuration Wizard on Fri Mar 10 09:20:49 CST 2023
username=weblogic
password=Xxzx$7817600

[[weblogic@localhost bin]$ ./startWebLogic.sh
.
.
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000
.
CLASSPATH=/usr/java/jdk1.8.0_131/lib/tools.jar:/weblogic/Oracle/Middleware/wlserver/server/lib/weblogic.jar:/weblogic/Oracle/Middleware/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/weblogic/Oracle/Middleware/wlserver/modules/features/oracle.wls.common.nodemanager.jar::/weblogic/Oracle/Middleware/wlserver/common/derby/lib/derbynet.jar:/weblogic/Oracle/Middleware/wlserver/common/derby/lib/derbyclient.jar:/weblogic/Oracle/Middleware/wlserver/common/derby/lib/derby.jar:/usr/java/jdk1.8.0_131/jre/lib/ext:/usr/java/jdk1.8.0_131/lib/tools.jar
.
PATH=/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin:/weblogic/Oracle/Middleware/wlserver/server/bin:/weblogic/Oracle/Middleware/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.9.8.0.0/apache-ant-1.9.8/bin:/usr/java/jdk1.8.0_131/jre/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/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 *
***************************************************
Starting WLS with line:
/usr/java/jdk1.8.0_131/bin/java -server -Xms256m -Xmx512m -XX:CompileThreshold=8000 -cp /weblogic/Oracle/Middleware/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=AdminServer -Djava.security.policy=/weblogic/Oracle/Middleware/wlserver/server/lib/weblogic.policy -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -javaagent:/weblogic/Oracle/Middleware/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/weblogic/Oracle/Middleware/wlserver/server -Dweblogic.home=/weblogic/Oracle/Middleware/wlserver/server weblogic.Server
<Mar 10, 2023 10:10:21 AM CST> <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.>
<Mar 10, 2023 10:10:21 AM CST> <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.>
<Mar 10, 2023 10:10:22 AM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.131-b11 from Oracle Corporation.>
<Mar 10, 2023 10:10:22 AM CST> <Info> <RCM> <BEA-2165021> <"ResourceManagement" is not enabled in this JVM. Enable "ResourceManagement" to use the WebLogic Server "Resource Consumption Management" feature. To enable "ResourceManagement", you must specify the following JVM options in the WebLogic Server instance in which the JVM runs: -XX:+UnlockCommercialFeatures -XX:+ResourceManagement.>
<Mar 10, 2023 10:10:23 AM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.2.1.3.0 Thu Aug 17 13:39:49 PDT 2017 1882952>
<Mar 10, 2023 10:12:23 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
<Mar 10, 2023 10:12:23 AM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>
<Mar 10, 2023 10:12:23 AM CST> <Info> <WorkManager> <BEA-002942> <CMM memory level becomes 0. Setting standby thread pool size to 256.>
<Mar 10, 2023 10:13:37,658 AM CST> <Notice> <Log Management> <BEA-170019> <The server log file weblogic.logging.FileStreamHandler instance=414943286
Current log file=/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer.log
Rotation dir=/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/logs
is opened. All server side log events will be written to this file.>
<Mar 10, 2023 10:13:37,911 AM CST> <Notice> <Security> <BEA-090946> <Security pre-initializing using security realm: myrealm>
<Mar 10, 2023 10:13:38,607 AM CST> <Notice> <Security> <BEA-090947> <Security post-initializing using security realm: myrealm>
<Mar 10, 2023 10:13:39,600 AM CST> <Notice> <Security> <BEA-090082> <Security initialized using administrative security realm: myrealm>
<Mar 10, 2023 10:13:39,664 AM CST> <Notice> <Security> <BEA-090083> <Storing boot identity in the file: /weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/security/boot.properties.>
<Mar 10, 2023 10:19:50,908 AM CST> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://10.13.13.4:7001/jndi/weblogic.management.mbeanservers.runtime.>
<Mar 10, 2023 10:19:50,949 AM CST> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://10.13.13.4:7001/jndi/weblogic.management.mbeanservers.domainruntime.>
<Mar 10, 2023 10:19:50,966 AM CST> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://10.13.13.4:7001/jndi/weblogic.management.mbeanservers.edit.>
<Mar 10, 2023 10:21:52,707 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.>
<Mar 10, 2023 10:21:52,708 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
<Mar 10, 2023 10:21:52,785 AM CST> <Notice> <Log Management> <BEA-170036> <The Logging monitoring service timer has started to check for logged message counts every 30 seconds.>
<Mar 10, 2023 10:21:53,221 AM CST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.>
<Mar 10, 2023 10:21:53,401 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.>
<Mar 10, 2023 10:21:53,509 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.>
<Mar 10, 2023 10:21:53,608 AM CST> <Notice> <WebLogicServer> <BEA-000331> <Started the WebLogic Server Administration Server "AdminServer" for domain "base_domain" running in development mode.>
<Mar 10, 2023 10:21:53,615 AM CST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
<Mar 10, 2023 10:21:53,615 AM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.13.13.4:7001 for protocols iiop, t3, ldap, snmp, http.>
<Mar 10, 2023 10:21:53,616 AM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.13.13.4:7001 for protocols iiop, t3, ldap, snmp, http.>
<Mar 10, 2023 10:21:53,628 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-2939028/,如需轉載,請註明出處,否則將追究法律責任。

相關文章