我这里安装的jdk版本是1.8-102 [root@db-1 ~]# rpm -ivh jdk-8u102-linux-x64.rpm Preparing... ################################# [100%] Updating / installing... 1:jdk1.8.0_102-2000:1.8.0_102-fcs ################################# [100%] Unpacking JAR files... tools.jar... plugin.jar... javaws.jar... deploy.jar... rt.jar... jsse.jar... charsets.jar... localedata.jar... 查看安装jdk版本信息 [root@db-1 ~]# java -version java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
创建weblogic用户 [root@db-1 ~]# useradd weblogic 给weblogic用户设置密码,需要输入两边 [root@db-1 ~]# passwd weblogic Changing password for user weblogic. New password:输入密码 这里输入密码是不显示的,我这里设置的密码是123456 BAD PASSWORD: The password is shorter than 8 characters Retype new password: 再次输入密码 这里输入密码是不显示的,我这里设置的密码是123456 passwd: all authentication tokens updated successfully. 在/opt/目录下创建weblogic目录 [root@db-1 ~]# mkdir -p /opt/weblogic 把fmw_14.1.1.0.0_wls_lite_generic.jar上传到/opt/weblogic目录下 进入到/opt/weblogic/目录下 [root@db-1 ~]# cd /opt/weblogic/ 把fmw_14.1.1.0.0_wls_lite_generic.jar上传到/opt/weblogic目录下 查看上传好的文件 [root@db-1 weblogic]# ls fmw_14.1.1.0.0_wls_lite_generic.jar 查看当前在哪个目录下 [root@db-1 weblogic]# pwd /opt/weblogic 修改文件的属主和属组都为weblogic [root@db-1 weblogic]# chown -R weblogic.weblogic /opt/weblogic/ 查看属性 [root@db-1 weblogic]# ll total 623076 -rw-r--r-- 1 weblogic weblogic 638026223 Mar 30 23:52 fmw_14.1.1.0.0_wls_lite_generic.jar
进入到/opt/weblogic/目录下 [root@db-1 ~]# cd /opt/weblogic/ 追加配置文件,这里指定weblogic安装的目录清单和weblogic用户组 [root@db-1 weblogic]# echo "Inventory_loc=/opt/weblogic/oraInventory" >> oraInst.loc [root@db-1 weblogic]# echo "Inst_group=weblogic" >> oraInst.loc 查看追究的内容 [root@db-1 weblogic]# cat oraInst.loc Inventory_loc=/opt/weblogic/oraInventory Inst_group=weblogic 批量追加配置文件 cat << EOF >> wls.rsp [ENGINE] Response File Version=1.0.0.0.0 [GENERIC] ORACLE_HOME=/opt/weblogic/oracle/middleware INSTALL_TYPE=WebLogic Server DECLINE_SECURITY_UPDATES=true SECURITY_UPDATES_VIA_MYORACLESUPPORT=false EOF 查看追加的内容 [root@db-1 weblogic]# cat wls.rsp [ENGINE] Response File Version=1.0.0.0.0 [GENERIC] ORACLE_HOME=/opt/weblogic/oracle/middleware INSTALL_TYPE=WebLogic Server DECLINE_SECURITY_UPDATES=true SECURITY_UPDATES_VIA_MYORACLESUPPORT=false 解释: [ENGINE] Response File Version=1.0.0.0.0 版本 [GENERIC] ORACLE_HOME=/opt/weblogic/oracle/middleware home(家)目录,这里的目录一定要为空,如果不为空会报错 INSTALL_TYPE=WebLogic Server 安装的类型 切换到weblogic的用户 [root@db-1 weblogic]# su - weblogic [weblogic@db-1 ~]$ 静默安装weblogic [weblogic@db-1 ~]$ java -jar /opt/weblogic/fmw_14.1.1.0.0_wls_lite_generic.jar -silent -responseFile /opt/weblogic/wls.rsp -invPtrLoc /opt/weblogic/oraInst.loc 如果出现successfully说明安装成功了 返回结果: Launcher log file is /tmp/OraInstall2023-03-31_12-32-07AM/launcher2023-03-31_12-32-07AM.log. Extracting the installer . . . . . . . . . . . . . . Done Checking if CPU speed is above 300 MHz. Actual 3193.996 MHz Passed Checking swap space: must be greater than 512 MB. Actual 20479 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 97957 MB Passed Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2023-03-31_12-32-07AM Log: /tmp/OraInstall2023-03-31_12-32-07AM/install2023-03-31_12-32-07AM.log Copyright (c) 1996, 2020, 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, SuSE-15 Actual Result: redhat-null Check complete. The overall result of this check is: Passed CertifiedVersions Check: Success. Starting check : CheckJDKVersion Problem: This JDK version was not certified at the time it was made generally available. It may have been certified following general availability. Recommendation: Check the Supported System Configurations Guide (http://www.oracle.com/technetwork/middleware/ias/downloads/fusion-certification-100350.html) for further details. Press "Next" if you wish to continue. Expected result: 1.8.0_191 Actual result: 1.8.0_102 Warning: Check:CheckJDKVersion completed with warnings. 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 14.1.1 WebLogic Server and Coherence 14.1.1.0.0 completed successfully. Logs successfully copied to /home/weblogic/oraInventory/logs. 如果出现successfully说明安装成功了
weblogic的密码是weblogic1234创建weblogic的域,需要切换到root的用户 [weblogic@db-1 ~]$ su - root Password: 输入密码,这里输入密码不显示,我的root密码是123456 Last login: Fri Mar 31 00:32:12 CST 2023 from 10.0.0.1 on pts/1 [root@db-1 ~]# 进入到/opt/weblogic/oracle/middleware/wlserver/common/bin/目录下 [root@db-1 ~]# cd /opt/weblogic/oracle/middleware/wlserver/common/bin/ 查看当前目录下的文件 [root@db-1 bin]# ls config.sh pack.sh unpack.sh wlscontrol.sh wlsifconfig.sh wlst.sh 创建域,启动 [root@db-1 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> 依次输入命令 输入:readTemplateForUpdate('/opt/weblogic/oracle/middleware/wlserver/common/templates/wls/wls.jar') wls:/offline> readTemplateForUpdate('/opt/weblogic/oracle/middleware/wlserver/common/templates/wls/wls.jar') 输入:cd('Servers/AdminServer') wls:/offline/base_domain>cd('Servers/AdminServer') 输入:set('ListenAddress','') wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','') 输入:set('ListenPort', 7001) wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 7001) 输入cd('/') wls:/offline/base_domain/Server/AdminServer>cd('/') 输入:cd('Security/base_domain/User/weblogic') wls:/offline/base_domain>cd('Security/base_domain/User/weblogic') 输入:cmo.setPassword('weblogic1234') wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('weblogic1234') 输入:setOption('OverwriteDomain', 'true') wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true') 输入:writeDomain('/opt/weblogic/oracle/middleware/user_projects/domains') wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/opt/weblogic/oracle/middleware/user_projects/domains') 输入:closeTemplate() wls:/offline/domains/Security/domains/User/weblogic>closeTemplate() 输入:exit() wls:/offline>exit() weblogic端口是7001 weblogic的用户名是weblogic weblogic的密码是weblogic1234
weblogic端口是7001 weblogic的用户名是weblogic weblogic的密码是weblogic1234
进入到/opt/weblogic/oracle/middleware/user_projects/domains/bin/ [root@db-1 bin]# cd /opt/weblogic/oracle/middleware/user_projects/domains/bin/ 查看当前在哪个目录下 [root@db-1 bin]# pwd /opt/weblogic/oracle/middleware/user_projects/domains/bin 查看当前目录下有哪些文件 [root@db-1 bin]# ls generateArchive.sh restartComponent.sh setDomainEnv.sh startComponent.sh startRSDaemon.sh stopManagedWebLogic.sh stopWebLogic.sh nodemanager server_migration setNMJavaHome.sh startManagedWebLogic.sh startWebLogic.sh stopNodeManager.sh patching service_migration setStartupEnv.sh startNodeManager.sh stopComponent.sh stopRSDaemon.sh 解释: startWebLogic.sh weblogic启动脚本 stopWebLogic.sh weblogic停止脚本 首次启动可以前台启动 [root@db-1 bin]# ./startWebLogic.sh 后台启动命令 nohup ./startWebLogic.sh &
首次启动可以前台启动,这样方便查看日志快速定位问题 [root@db-1 bin]# ./startWebLogic.sh 返回日志结果 . . JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 . CLASSPATH=/usr/java/jdk1.8.0_102/lib/tools.jar:/opt/weblogic/oracle/middleware/wlserver/server/lib/weblogic.jar:/opt/weblogic/oracle/middleware/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/opt/weblogic/oracle/middleware/wlserver/modules/features/oracle.wls.common.nodemanager.jar::/opt/weblogic/oracle/middleware/wlserver/common/derby/lib/derbynet.jar:/opt/weblogic/oracle/middleware/wlserver/common/derby/lib/derbyclient.jar:/opt/weblogic/oracle/middleware/wlserver/common/derby/lib/derby.jar . PATH=/opt/weblogic/oracle/middleware/user_projects/domains/bin:/opt/weblogic/oracle/middleware/wlserver/server/bin:/opt/weblogic/oracle/middleware/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.10.5.0.0/apache-ant-1.10.5/bin:/usr/java/jdk1.8.0_102/jre/bin:/usr/java/jdk1.8.0_102/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/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 http://hostname:port/console * *************************************************** Starting WLS with line: /usr/java/jdk1.8.0_102/bin/java -server -Xms256m -Xmx512m -XX:CompileThreshold=8000 -cp /opt/weblogic/oracle/middleware/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=AdminServer -Djava.security.policy=/opt/weblogic/oracle/middleware/wlserver/server/lib/weblogic.policy -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -javaagent:/opt/weblogic/oracle/middleware/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/opt/weblogic/oracle/middleware/wlserver/server -Dweblogic.home=/opt/weblogic/oracle/middleware/wlserver/server -Djava.endorsed.dirs=/usr/java/jdk1.8.0_102/jre/lib/endorsed:/opt/weblogic/oracle/middleware/wlserver/../oracle_common/modules/endorsed:/opt/weblogic/oracle/middleware/wlserver/modules/endorsed weblogic.Server <Mar 31, 2023 12:59:04 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 31, 2023 12:59:04 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 31, 2023 12:59:05 AM CST> <Critical> <WebLogicServer> <BEA-000345> < ******* * * The selected version of Java, 1.8.0_102, contains a known security flaw. Please upgrade to at least 1.8.0_181 * ******* > <Mar 31, 2023 12:59:05 AM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.102-b14 from Oracle Corporation.> <Mar 31, 2023 12:59:05 AM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 14.1.1.0.0 Thu Mar 26 03:15:09 GMT 2020 2000885> <Mar 31, 2023 12:59:06 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> <Mar 31, 2023 12:59:06 AM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.> <Mar 31, 2023 12:59:07,421 AM CST> <Notice> <Log Management> <BEA-170019> <The server log file weblogic.logging.FileStreamHandler instance=1404351477 Current log file=/opt/weblogic/oracle/middleware/user_projects/domains/servers/AdminServer/logs/AdminServer.log Rotation dir=/opt/weblogic/oracle/middleware/user_projects/domains/servers/AdminServer/logs is opened. All server side log events will be written to this file.> <Mar 31, 2023 12:59:07,635 AM CST> <Notice> <Security> <BEA-090946> <Security pre-initializing using security realm: myrealm> <Mar 31, 2023 12:59:08,160 AM CST> <Notice> <Security> <BEA-090947> <Security post-initializing using security realm: myrealm> <Mar 31, 2023 12:59:09,120 AM CST> <Notice> <Security> <BEA-090082> <Security initialized using administrative security realm: myrealm> <Mar 31, 2023 12:59:09,661 AM CST> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://10.0.0.180:7001/jndi/weblogic.management.mbeanservers.runtime.> <Mar 31, 2023 12:59:09,994 AM CST> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://10.0.0.180:7001/jndi/weblogic.management.mbeanservers.domainruntime.> <Mar 31, 2023 12:59:10,137 AM CST> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://10.0.0.180:7001/jndi/weblogic.management.mbeanservers.edit.> <Mar 31, 2023 12:59:11,060 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.> <Mar 31, 2023 12:59:11,061 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> <Mar 31, 2023 12:59:11,104 AM CST> <Notice> <Log Management> <BEA-170036> <The Logging monitoring service timer has started to check for logged message counts every 30 seconds.> <Mar 31, 2023 12:59:11,361 AM CST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.> <Mar 31, 2023 12:59:11,571 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.> <Mar 31, 2023 12:59:11,638 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.> <Mar 31, 2023 12:59:11,708 AM CST> <Warning> <Server> <BEA-002611> <The hostname "localhost", maps to multiple IP addresses: 127.0.0.1, 0:0:0:0:0:0:0:1.> <Mar 31, 2023 12:59:11,711 AM CST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.> <Mar 31, 2023 12:59:11,712 AM CST> <Warning> <Server> <BEA-002611> <The hostname "db-1", maps to multiple IP addresses: 10.0.0.180, fe80:0:0:0:20c:29ff:fef3:6d5%2.> <Mar 31, 2023 12:59:11,713 AM CST> <Notice> <WebLogicServer> <BEA-000331> <Started the WebLogic Server Administration Server "AdminServer" for domain "domains" running in development mode.> <Mar 31, 2023 12:59:11,713 AM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.0.0.180:7001 for protocols iiop, t3, ldap, snmp, http.> <Mar 31, 2023 12:59:11,714 AM CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 0:0:0:0:0:0:0:1%lo:7001 for protocols iiop, t3, ldap, snmp, http.> <Mar 31, 2023 12:59:11,714 AM CST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.> <Mar 31, 2023 12:59:11,714 AM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.0.0.180:7001 for protocols iiop, t3, ldap, snmp, http.> <Mar 31, 2023 12:59:11,714 AM CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 0:0:0:0:0:0:0:1%lo:7001 for protocols iiop, t3, ldap, snmp, http.> <Mar 31, 2023 12:59:11,742 AM CST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.> <Mar 31, 2023 12:59:11,751 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
浏览器访问此地址
http://10.0.0.180:7001/console
如果出现此界面稍微等待一下即可
登录进去以后的界面