1)安装包下载:fmw_12.1.3.0.0_wls.jar 提取码:yv21
2)jdk下载:jdk-7u51-linux-x64.tar.gz 提取码:ngrn
友好提示:最好安装我给的jdk和安装包安装。
jdk安装请看《Linux(CentOS7)中安装JDK》文章。
友好提示:配置好环境变量
#创建组
groupadd weblogic
#创建用户主目录
mkdir /home/weblogic
#创建用户,指定用户主目录,指定用户所属的组
useradd -g weblogic -m -d /home/weblogic weblogic
#给用户、组分配权限
chown -R weblogic:weblogic /home/weblogic
chmod -R 775 /home/weblogic
passwd weblogic
mkdir -p /u01/oracle/oraInventory #
mkdir /u01/oracle/weblogic #安装主目录
mkdir /u01/oracle/weblogic_install_package #存放安装包和安装默认配置。
因为weblogic是oracle的产品,所以我的目录前段是:/u01/oracle/,u01那又是啥,个人习惯,或者说用户目录。
chown -R weblogic:weblogic /u01/oracle/weblogic
chmod -R 775 /u01/oracle/weblogic //读写可执行
chown -R weblogic:weblogic /u01/oracle/oraInventory
chmod -R 775 /u01/oracle/oraInventory //读写可执行
chown -R weblogic:weblogic /u01/oracle/weblogic_install_package
chmod -R 775 /u01/oracle/weblogic_install_package //读写可执行
上传 fmw_12.1.3.0.0_wls.jar 到已经创建好的目录:/u01/oracle/weblogic_install_package
如下图示:
一下两个文件:oraInst.loc、wls.rsp 都在目录/u01/oracle/weblogic_install_package中创建:
#产品清单目录;注意不能放在weblogic安装目录下,要保证安装目录为空
inventory_loc=/u01/oracle/oraInventory
#用什么用户安装weblogic这里就写什么用
inst_group=weblogic
[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=/u01/oracle/weblogic
#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=
#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration
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=
#Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port]
COLLECTOR_SUPPORTHUB_URL=
修改ORACLE_HOME=/u01/oracle/weblogic 为安装主目录。
可以看到已经创建好的文件和安装包:
切换以上用户(weblogic)进行安装
java -jar /u01/oracle/weblogic_install_package/fmw_12.1.3.0.0_wls.jar -silent -responseFile /u01/oracle/weblogic_install_package/wls.rsp -invPtrLoc /u01/oracle/weblogic_install_package/oraInst.loc
安装显示如下:
Launcher log file is /tmp/OraInstall2020-07-18_07-12-26AM/launcher2020-07-18_07-12-26AM.log.
Extracting files............................................
Starting Oracle Universal Installer
Checking if CPU speed is above 300 MHz. Actual 1701.000 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 2097148 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 13270 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2020-07-18_07-12-26AM
Log: /tmp/OraInstall2020-07-18_07-12-26AM/install2020-07-18_07-12-26AM.log
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Starting check : CertifiedVersions
Expected result: One of enterprise-4,enterprise-5,enterprise-6,redhat-6,redhat-4,redhat-5,SuSE-11
Actual Result: (Unknown
Check complete. The overall result of this check is: Failed <<<<
Problem: This Oracle software is not certified on the current operating system.
Recommendation: Make sure you are installing the software on the correct platform.
Warning: Check:CertifiedVersions failed.
Starting check : CheckJDKVersion
Expected result: 1.7.0_15
Actual Result: 1.7.0_51
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.
Validations are enabled for this session.
Verifying data......
Copying Files...
You can find the log of this install session at:
/tmp/OraInstall2020-07-18_07-12-26AM/install2020-07-18_07-12-26AM.log
-----------20%----------40%----------60%----------80%--------100%
The installation of Oracle Fusion Middleware 12c WebLogic Server and Coherence 12.1.3.0.0 completed successfully.
Logs successfully copied to /u01/oracle/oraInventory/logs.
[weblogic@localhost ~]$
切换root 用户,编辑
vi /etc/profile
设置 MW_HOME 环境变量:
export MW_HOME=/u01/oracle/weblogic
执行生效:
source /etc/profile
/u01/oracle/weblogic/oracle_common/common/bin/commEnv.sh
/u01/oracle/weblogic/wlserver/common/bin/wlst.sh
运行进行如下:
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline>
输入:
wls:/offline> readTemplate('/u01/oracle/weblogic/wlserver/common/templates/wls/wls.jar')
wls:/offline/base_domain>cd('Servers/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','192.168.137.98')
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('weblogic1')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/u01/oracle/weblogic/user_projects/domains/base_domain')
等了半天,真的1小时吧,我网络不行,是在虚拟机里安装的,完后继续…
wls:/offline/base_domain/Security/base_domain/User/weblogic>closeTemplate()
wls:/offline>exit()
Exiting WebLogic Scripting Tool.
[weblogic@localhost ~]$
cd /u01/oracle/weblogic/user_projects/domains/base_domain/bin
nohup ./startWebLogic.sh &
tail -f nohup.out
http://192.168.137.98:7001/console
注意:如果访问不了,那就看看有没有关闭防火墙:
1 查看防火墙状态
systemctl status firewalld
2 查看开机是否启动防火墙服务
systemctl is-enabled firewalld
3 关闭防火墙
systemctl stop firewalld
4 禁用防火墙(系统启动时不启动防火墙服务)
systemctl disable firewalld
按照以上的步骤安装weblogic12,绝对安装成功!