weblogic的基础安装

安装java环境

不能使用centos自带的openjdk  必须使用源码安装

把下载的jdk-8u181-linux-x64.tar 解压到 /usr/src目录下      tar zxvf jdk-8u181-linux-x64.tar.gz -C /usr/src

[root@hz-ds-itstool--- weblogic]# rpm -qa | grep java
javapackages-tools-3.4.-.el7.noarch
java-1.8.-openjdk-headless-1.8.0.181-.b13.el7_5.x86_64
python-javapackages-3.4.-.el7.noarch
tzdata-java-2018e-.el7.noarch
[root@hz-ds-itstool--- weblogic]# rpm -e --nodeps `rpm -qa | grep java`

删除已经安装的openjdk

[root@hz-ds-itstool--- src]# pwd
/usr/src
[root@hz-ds-itstool--- src]# cd /etc/profile.d/
[root@hz-ds-itstool--- profile.d]# ls
256term.csh bash_completion.sh colorgrep.sh colorls.sh lang.csh less.csh which2.csh
256term.sh colorgrep.csh colorls.csh java.sh lang.sh less.sh which2.sh
[root@hz-ds-itstool--- profile.d]# vi java.sh export JAVA_HOME=/usr/src/jdk1..0_181
export PATH=$PATH:$JAVA_HOME/bin

配置jdk

source /etc/profile

java -version

安装weblogic

[root@hz-ds-itstool--- ~]# groupadd weblogic
[root@hz-ds-itstool--- ~]# useradd weblogic -g weblogic
[root@hz-ds-itstool--- ~]# echo "weblogic" | passwd --stdin weblogic
Changing password for user weblogic.
passwd: all authentication tokens updated successfully.
[root@hz-ds-itstool--- ~]# cp fmw_12.2.1..0_wls.jar /home/weblogic/
[root@hz-ds-itstool--- ~]# cd /home/weblogic/
[root@hz-ds-itstool--- weblogic]# ls
fmw_12.2.1..0_wls.jar

创建普通用户

非静默安装一般要求启动图形界面 这种安装方式不适合在命令行窗口安装    java     -jar       fmw_12.2.1.3.0_wls.jar

[weblogic@hz-ds-itstool--- ~]$ java -jar fmw_12.2.1..0_wls.jar
Launcher log file is /tmp/OraInstall2018--13_11--07AM/launcher2018--13_11--07AM.log.
Extracting the installer . . . . . . Done
Checking if CPU speed is above MHz. Actual 2199.996 MHz Passed
Checking monitor: must be configured to display at least colors. Actual unknown. Failed <<<<
Checking swap space: must be greater than MB. Actual MB Passed
Checking if this platform requires a -bit JVM. Actual Passed (-bit not required)
Checking temp space: must be greater than MB. Actual MB Passed Some system prerequisite checks failed.
You must fulfill these requirements before continuing. Continue? (yes [y] / no [n]) [n]
y
You have confirmed that the product can be installed on this platform.
Continuing with the installation. Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2018--13_11--07AM
Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$(X11GraphicsEnvironment.java:)
at sun.awt.X11GraphicsEnvironment$.run(X11GraphicsEnvironment.java:)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:)
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:)
at java.awt.Toolkit$.run(Toolkit.java:)
at java.awt.Toolkit$.run(Toolkit.java:)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:)
at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:)
at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:)
at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:)
at oracle.as.install.engine.util.LookAndFeelGenerator.loadLookAndFeel(LookAndFeelGenerator.java:)
at oracle.as.install.engine.util.LookAndFeelGenerator.setLookAndFeel(LookAndFeelGenerator.java:)
at oracle.as.install.engine.modules.presentation.ui.common.dialogs.SpecifyInventoryDirectoryDialog.showDialog(SpecifyInventoryDirectoryDialog.java:)
at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:) The log(s) can be found here: /tmp/OraInstall2018--13_11--07AM.

非静默安装错误

使用静默安装模式 使用这种方式必须指定安装时候的应答文件 作用类似于自动化安装操作系统的kickstart文件 这样就可以实现自动化安装 无需人工干预

java -jar fmw_12.2.1.3.0_wls.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc

[root@hz-ds-itstool--- weblogic]# pwd
/home/weblogic
[root@hz-ds-itstool--- weblogic]# ls
fmw_12.2.1..0_wls.jar oracle_home oraInst.loc oraInventory wls.rsp [root@hz-ds-itstool--- weblogic]# vi oraInst.loc inventory_loc=/home/weblogic/oraInventory
inst_group=weblogic [root@hz-ds-itstool--- weblogic]# vi wls.rsp [ENGINE]
#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.
[GENERIC]
#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/home/weblogic/oracle_home
#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>
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>
COLLECTOR_SUPPORTHUB_URL=

部署目录结构

[weblogic@hz-ds-itstool--- ~]$ java -jar fmw_12.2.1..0_wls.jar  -silent -responseFile /home/weblogic/wls.rsp  -invPtrLoc /home/weblogic/oraInst.loc
Launcher log file is /tmp/OraInstall2018--13_12--09PM/launcher2018--13_12--09PM.log.
Extracting the installer . . . . . . . . . Done
Checking if CPU speed is above MHz. Actual 2199.996 MHz Passed
Checking swap space: must be greater than MB. Actual MB Passed
Checking if this platform requires a -bit JVM. Actual Passed (-bit not required)
Checking temp space: must be greater than MB. Actual MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2018--13_12--09PM
Log: /tmp/OraInstall2018--13_12--09PM/install2018--13_12--09PM.log
Copyright (c) , , Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Starting check : CertifiedVersions
Expected result: One of oracle-, oracle-, redhat-, redhat-, SuSE-, SuSE-
Actual Result: redhat-null
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_181
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 :
Percent Complete :
Percent Complete :
Percent Complete :
Percent Complete :
Percent Complete :
Percent Complete :
Percent Complete :
Percent Complete :
Percent Complete : The installation of Oracle Fusion Middleware 12c WebLogic Server and Coherence 12.2.1.3. completed successfully.
Logs successfully copied to /home/weblogic/oraInventory/logs.

部署结果

[weblogic@hz-ds-itstool--- ~]$ ls
fmw_12.2.1..0_wls.jar oracle_home oraInst.loc oraInventory wls.rsp
[weblogic@hz-ds-itstool--- ~]$ cd oracle_home
[weblogic@hz-ds-itstool--- oracle_home]$ ls
cfgtoollogs inventory oracle_common oui wlserver
coherence OPatch oraInst.loc root.sh
[weblogic@hz-ds-itstool--- oracle_home]$ cd wlserver/
[weblogic@hz-ds-itstool--- wlserver]$ ls
common modules orasocket plugins server
[weblogic@hz-ds-itstool--- wlserver]$ cd common/
[weblogic@hz-ds-itstool--- common]$ ls
bin deployable-libraries derby dpct images lifecycle templates wlst
[weblogic@hz-ds-itstool--- common]$ cd bin
[weblogic@hz-ds-itstool--- bin]$ ls
config.sh pack.sh unpack.sh wlscontrol.sh wlsifconfig.sh wlst.sh
[weblogic@hz-ds-itstool--- bin]$ export MW_HOME="/home/weblogic/oracle_home"
[weblogic@hz-ds-itstool--- bin]$ export WL_HOME="/home/weblogic/oracle_home/oracle_common"
[weblogic@hz-ds-itstool--- 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) ... 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>

启动wlst脚本

使用wlst脚本自动执行脚本

[root@hz-ds-itstool--- bin]# find / -name wlst.sh
/home/weblogic/oracle_home/oracle_common/common/bin/wlst.sh #已经被废弃
/home/weblogic/oracle_home/wlserver/common/bin/wlst.sh vi create_domain.py readTemplate("/home/weblogic/oracle_home/wlserver/common/templates/wls/wls.jar")
cd('Servers/AdminServer')
set('ListenAddress','')
set('ListenPort',)
cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('root123456')
setOption('OverwriteDomain','true')
writeDomain('/home/weblogic/oracle_home/user_pros/domains/test_domain')
closeTemplate()
exit() #执行创建命令
sh /home/weblogic/oracle_home/wlserver/common/bin/wlst.sh create_doman.py #跳转到创建域的根目录下
[root@hz-ds-itstool--- bin]# cd /home/weblogic/oracle_home/user_pros/domains/test_domain
[root@hz-ds-itstool--- test_domain]# ls
autodeploy config edit.lok init-info orchestration security
bin console-ext fileRealm.properties lib original servers
common derby.log fileRealm.properties.bak nodemanager resources startWebLogic.sh #执行启动脚本
./startWeblogic.sh
或者nohup startWeblogic.sh > note.log & tail -f note.log #查看是否监听端口
[root@hz-ds-itstool--- ~]# ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN *: *:*
LISTEN 127.0.0.1: *:*
LISTEN *: *:*
LISTEN ::: :::*
LISTEN ::: :::*
LISTEN ::ffff:127.0.0.1: :::*
LISTEN ::: :::*
LISTEN ::ffff:10.199.137.5: :::*
LISTEN ::ffff:127.0.0.1: :::*
LISTEN ::: :::*
LISTEN ::: :::*
LISTEN ::ffff:10.199.137.5: :::*
LISTEN ::ffff:127.0.0.1: :::* #打开浏览器访问对应的url
http://192.168.1.1:7008/console
上一篇:BZOJ1014 JSOI2008火星人(splay+哈希)


下一篇:注册vue组件的几种方式