安装java环境
不能使用centos自带的openjdk 必须使用源码安装
把下载的jdk-8u181-linux-x64.tar 解压到 /usr/src目录下
[root@hz-ds-itstool-199-137-5 weblogic]# rpm -qa | grep javajavapackages-tools-3.4.1-11.el7.noarchjava-1.8.0-openjdk-headless-1.8.0.181-3.b13.el7_5.x86_64python-javapackages-3.4.1-11.el7.noarchtzdata-java-2018e-3.el7.noarch[root@hz-ds-itstool-199-137-5 weblogic]# rpm -e --nodeps `rpm -qa | grep java`
[root@hz-ds-itstool-199-137-5 src]# pwd/usr/src[root@hz-ds-itstool-199-137-5 src]# cd /etc/profile.d/[root@hz-ds-itstool-199-137-5 profile.d]# ls256term.csh ?bash_completion.sh ?colorgrep.sh ?colorls.sh ?lang.csh ?less.csh ?which2.csh256term.sh ??colorgrep.csh ??????colorls.csh ??java.sh ????lang.sh ??less.sh ??which2.sh[root@hz-ds-itstool-199-137-5 profile.d]# vi java.sh export JAVA_HOME=/usr/src/jdk1.8.0_181export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile
安装weblogic
[root@hz-ds-itstool-199-137-5 ~]# groupadd weblogic[root@hz-ds-itstool-199-137-5 ~]# useradd weblogic -g weblogic[root@hz-ds-itstool-199-137-5 ~]# echo "weblogic" | passwd --stdin weblogicChanging password for user weblogic.passwd: all authentication tokens updated successfully.[root@hz-ds-itstool-199-137-5 ~]# cp fmw_12.2.1.3.0_wls.jar /home/weblogic/[root@hz-ds-itstool-199-137-5 ~]# cd /home/weblogic/[root@hz-ds-itstool-199-137-5 weblogic]# lsfmw_12.2.1.3.0_wls.jar
非静默安装一般要求启动图形界面 这种安装方式不适合在命令行窗口安装 java -jar fmw_12.2.1.3.0_wls.jar
[weblogic@hz-ds-itstool-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 . . . . . . DoneChecking if CPU speed is above 300 MHz. ??Actual 2199.996 MHz ???PassedChecking 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 ???PassedChecking 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 ???PassedSome system prerequisite checks failed.You must fulfill these requirements before continuing.Continue? (yes [y] / no [n]) [n]yYou 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-07AMException 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
[root@hz-ds-itstool-199-137-5 weblogic]# pwd/home/weblogic[root@hz-ds-itstool-199-137-5 weblogic]# lsfmw_12.2.1.3.0_wls.jar ?oracle_home ?oraInst.loc ?oraInventory ?wls.rsp[root@hz-ds-itstool-199-137-5 weblogic]# vi oraInst.loc inventory_loc=/home/weblogic/oraInventoryinst_group=weblogic[root@hz-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 HomeORACLE_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 PasswordMYORACLESUPPORT_PASSWORD=<SECURE VALUE>DECLINE_SECURITY_UPDATES=true#Set this to true if My Oracle Support Password is specifiedSECURITY_UPDATES_VIA_MYORACLESUPPORT=false#Provide the Proxy HostPROXY_HOST=#Provide the Proxy PortPROXY_PORT=#Provide the Proxy UsernamePROXY_USER=#Provide the Proxy PasswordPROXY_PWD=<SECURE VALUE>COLLECTOR_SUPPORTHUB_URL=
[weblogic@hz-ds-itstool-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 . . . . . . . . . DoneChecking if CPU speed is above 300 MHz. ??Actual 2199.996 MHz ???PassedChecking swap space: must be greater than 512 MB. ??Actual 999 MB ???PassedChecking 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 ???PassedPreparing to launch the Oracle Universal Installer from /tmp/OraInstall2018-09-13_12-06-09PMLog: /tmp/OraInstall2018-09-13_12-06-09PM/install2018-09-13_12-06-09PM.logCopyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.Reading response file..Skipping Software UpdatesStarting check : CertifiedVersionsExpected result: One of oracle-6, oracle-7, redhat-7, redhat-6, SuSE-11, SuSE-12Actual Result: redhat-nullCheck complete. The overall result of this check is: PassedCertifiedVersions Check: Success.Starting check : CheckJDKVersionExpected result: 1.8.0_131Actual Result: 1.8.0_181Check complete. The overall result of this check is: PassedCheckJDKVersion Check: Success.Validations are enabled for this session.Verifying dataCopying FilesPercent Complete : 10Percent Complete : 20Percent Complete : 30Percent Complete : 40Percent Complete : 50Percent Complete : 60Percent Complete : 70Percent Complete : 80Percent Complete : 90Percent Complete : 100The 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.
[weblogic@hz-ds-itstool-199-137-5 ~]$ lsfmw_12.2.1.3.0_wls.jar ?oracle_home ?oraInst.loc ?oraInventory ?wls.rsp[weblogic@hz-ds-itstool-199-137-5 ~]$ cd oracle_home[weblogic@hz-ds-itstool-199-137-5 oracle_home]$ lscfgtoollogs ?inventory ?oracle_common ?oui ?????wlservercoherence ???OPatch ????oraInst.loc ???root.sh[weblogic@hz-ds-itstool-199-137-5 oracle_home]$ cd wlserver/[weblogic@hz-ds-itstool-199-137-5 wlserver]$ lscommon ?modules ?orasocket ?plugins ?server[weblogic@hz-ds-itstool-199-137-5 wlserver]$ cd common/[weblogic@hz-ds-itstool-199-137-5 common]$ lsbin ?deployable-libraries ?derby ?dpct ?images ?lifecycle ?templates ?wlst[weblogic@hz-ds-itstool-199-137-5 common]$ cd bin[weblogic@hz-ds-itstool-199-137-5 bin]$ lsconfig.sh ?pack.sh ?unpack.sh ?wlscontrol.sh ?wlsifconfig.sh ?wlst.sh[weblogic@hz-ds-itstool-199-137-5 bin]$ export MW_HOME="/home/weblogic/oracle_home"[weblogic@hz-ds-itstool-199-137-5 bin]$ export WL_HOME="/home/weblogic/oracle_home/oracle_common"[weblogic@hz-ds-itstool-199-137-5 bin]$ ./wlst.shWARNING: 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 ShellType help() for help on available commandswls:/offline>
使用wlst脚本自动执行脚本
[root@hz-ds-itstool-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.shvi ?create_domain.pyreadTemplate("/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#跳转到创建域的根目录下[root@hz-ds-itstool-199-137-5 bin]# cd /home/weblogic/oracle_home/user_pros/domains/test_domain[root@hz-ds-itstool-199-137-5 test_domain]# lsautodeploy ?config ??????edit.lok ?????????????????init-info ???orchestration ?securitybin ????????console-ext ?fileRealm.properties ?????lib ?????????original ??????serverscommon ?????derby.log ???fileRealm.properties.bak ?nodemanager ?resources ?????startWebLogic.sh#执行启动脚本 ??./startWeblogic.sh ??或者nohup startWeblogic.sh > note.log & tail -f note.log#查看是否监听端口[root@hz-ds-itstool-199-137-5 ~]# ss -tnlState ??????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
weblogic的基础安装
原文地址:https://www.cnblogs.com/yxh168/p/9639833.html