安装java环境
不能使用centos自带的openjdk 必须使用源码安装
把下载的jdk-8u181-linux-x64.tar 解压到 /usr/src目录下
[[email protected]199-137-5 weblogic]# rpm -qa | grep java javapackages-tools-3.4.1-11.el7.noarch java-1.8.0-openjdk-headless-1.8.0.181-3.b13.el7_5.x86_64 python-javapackages-3.4.1-11.el7.noarch tzdata-java-2018e-3.el7.noarch [[email protected]-ds-itstool-199-137-5 weblogic]# rpm -e --nodeps `rpm -qa | grep java`
删除已经安装的openjdk
[[email protected]199-137-5 src]# pwd /usr/src [[email protected]-ds-itstool-199-137-5 src]# cd /etc/profile.d/ [[email protected]-ds-itstool-199-137-5 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 [[email protected]-ds-itstool-199-137-5 profile.d]# vi java.sh export JAVA_HOME=/usr/src/jdk1.8.0_181 export PATH=$PATH:$JAVA_HOME/bin
配置jdk
source /etc/profile
安装weblogic
[[email protected]199-137-5 ~]# groupadd weblogic [[email protected]-ds-itstool-199-137-5 ~]# useradd weblogic -g weblogic [[email protected]-ds-itstool-199-137-5 ~]# echo "weblogic" | passwd --stdin weblogic Changing password for user weblogic. passwd: all authentication tokens updated successfully. [[email protected]-ds-itstool-199-137-5 ~]# cp fmw_12.2.1.3.0_wls.jar /home/weblogic/ [[email protected]-ds-itstool-199-137-5 ~]# cd /home/weblogic/ [[email protected]-ds-itstool-199-137-5 weblogic]# ls fmw_12.2.1.3.0_wls.jar
创建普通用户
非静默安装一般要求启动图形界面 这种安装方式不适合在命令行窗口安装 java -jar fmw_12.2.1.3.0_wls.jar
[[email protected]199-137-5 ~]$ java -jar fmw_12.2.1.3.0_wls.jar Launcher log file is /tmp/OraInstall2018-09-13_11-48-07AM/launcher2018-09-13_11-48-07AM.log. Extracting the installer . . . . . . Done Checking if CPU speed is above 300 MHz. Actual 2199.996 MHz Passed Checking monitor: must be configured to display at least 256 colors. Actual unknown. Failed <<<< Checking swap space: must be greater than 512 MB. Actual 999 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 28838 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-09-13_11-48-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$200(X11GraphicsEnvironment.java:65) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.Toolkit$2.run(Toolkit.java:860) at java.awt.Toolkit$2.run(Toolkit.java:855) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854) at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484) at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249) at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:136) at oracle.as.install.engine.util.LookAndFeelGenerator.loadLookAndFeel(LookAndFeelGenerator.java:34) at oracle.as.install.engine.util.LookAndFeelGenerator.setLookAndFeel(LookAndFeelGenerator.java:23) at oracle.as.install.engine.modules.presentation.ui.common.dialogs.SpecifyInventoryDirectoryDialog.showDialog(SpecifyInventoryDirectoryDialog.java:780) at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:643) The log(s) can be found here: /tmp/OraInstall2018-09-13_11-48-07AM.
非静默安装错误
使用静默安装模式 使用这种方式必须指定安装时候的应答文件 作用类似于自动化安装操作系统的kickstart文件 这样就可以实现自动化安装 无需人工干预
java -jar fmw_12.2.1.3.0_wls.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc
[[email protected]199-137-5 weblogic]# pwd /home/weblogic [[email protected]-ds-itstool-199-137-5 weblogic]# ls fmw_12.2.1.3.0_wls.jar oracle_home oraInst.loc oraInventory wls.rsp [[email protected]-ds-itstool-199-137-5 weblogic]# vi oraInst.loc inventory_loc=/home/weblogic/oraInventory inst_group=weblogic [[email protected]-ds-itstool-199-137-5 weblogic]# vi 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/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=
部署目录结构
[[email protected]199-137-5 ~]$ java -jar fmw_12.2.1.3.0_wls.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc Launcher log file is /tmp/OraInstall2018-09-13_12-06-09PM/launcher2018-09-13_12-06-09PM.log. Extracting the installer . . . . . . . . . Done Checking if CPU speed is above 300 MHz. Actual 2199.996 MHz Passed Checking swap space: must be greater than 512 MB. Actual 999 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 24484 MB Passed Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2018-09-13_12-06-09PM Log: /tmp/OraInstall2018-09-13_12-06-09PM/install2018-09-13_12-06-09PM.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-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 : 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/weblogic/oraInventory/logs.
部署结果
[[email protected]199-137-5 ~]$ ls fmw_12.2.1.3.0_wls.jar oracle_home oraInst.loc oraInventory wls.rsp [[email protected]-ds-itstool-199-137-5 ~]$ cd oracle_home [[email protected]-ds-itstool-199-137-5 oracle_home]$ ls cfgtoollogs inventory oracle_common oui wlserver coherence OPatch oraInst.loc root.sh [[email protected]-ds-itstool-199-137-5 oracle_home]$ cd wlserver/ [[email protected]-ds-itstool-199-137-5 wlserver]$ ls common modules orasocket plugins server [[email protected]-ds-itstool-199-137-5 wlserver]$ cd common/ [[email protected]-ds-itstool-199-137-5 common]$ ls bin deployable-libraries derby dpct images lifecycle templates wlst [[email protected]-ds-itstool-199-137-5 common]$ cd bin [[email protected]-ds-itstool-199-137-5 bin]$ ls config.sh pack.sh unpack.sh wlscontrol.sh wlsifconfig.sh wlst.sh [[email protected]-ds-itstool-199-137-5 bin]$ export MW_HOME="/home/weblogic/oracle_home" [[email protected]-ds-itstool-199-137-5 bin]$ export WL_HOME="/home/weblogic/oracle_home/oracle_common" [[email protected]-ds-itstool-199-137-5 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脚本自动执行脚本
[[email protected]199-137-5 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‘,7008) 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 #跳转到创建域的根目录下 [[email protected]-ds-itstool-199-137-5 bin]# cd /home/weblogic/oracle_home/user_pros/domains/test_domain [[email protected]-ds-itstool-199-137-5 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 #查看是否监听端口 [[email protected]-ds-itstool-199-137-5 ~]# ss -tnl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 *:22 *:* LISTEN 0 100 127.0.0.1:25 *:* LISTEN 0 128 *:10050 *:* LISTEN 0 50 :::8080 :::* LISTEN 0 128 :::22 :::* LISTEN 0 50 ::ffff:127.0.0.1:1527 :::* LISTEN 0 128 ::1:7001 :::* LISTEN 0 128 ::ffff:10.199.137.5:7001 :::* LISTEN 0 128 ::ffff:127.0.0.1:7001 :::* LISTEN 0 100 ::1:25 :::* LISTEN 0 128 ::1:7008 :::* LISTEN 0 128 ::ffff:10.199.137.5:7008 :::* LISTEN 0 128 ::ffff:127.0.0.1:7008 :::* #打开浏览器访问对应的url http://192.168.1.1:7008/console
原文地址:https://www.cnblogs.com/yxh168/p/9639833.html
时间: 2024-11-05 23:32:27