Linux命令安装JDK1.7及weblogic12.1.3.0.0

前言

注意
weblogic12.1.3.0.0 是 12c支持JDK1.7的最高版本。(本次安装)
weblogic12.2.1.3.0 只支持JDK1.8以上版本。

下载

官网linux版本
JDK1.7下载地址(本次安装)
JDK1.8下载地址
weblogic各版本下载地址

一、安装JDK1.7

如果是虚拟机安装,推荐使用SSH远程终端和FTP站点管理工具
在这里插入图片描述
在这里插入图片描述

1. 解压JDK压缩包(可以指定路径)
tar -xvf jdk-7u80-linux-x64.tar.gz 

在这里插入图片描述

2. 编辑系统环境变量
vi /etc/profile  (每个用户,还有一个是 .bash_profile 指定用户配置环境变量)
set java environment
JAVA_HOME=/usr/local/jdk/jdk1.7.0_80
JRE_HOME=/usr/local/jdk/jdk1.7.0_80/jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH
:wq (保存退出)
3. 重新加载系统配置文件
source /etc/profile
4. 测试是否安装成功
java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

二、安装weblogic12.1.3.0

注意 : 不能在 root 用户下安装否则会报错。新建用户组,并在root下设置好相应的文件修改权限

[root@localhost cui]# chmod  +x  文件名
1. 创建用户和组
[root@localhost cui]# groupadd cgn
[root@localhost cui]# useradd -g cgn cui
[root@localhost cui]# passwd 123456  (也可以在配置文件中取消密码输入)
2. 切换用户进行安装
[root@localhost cui]# su - cui   
[cui@localhost ~]$
3. 创建响应文件 wls.rsp

最好放在/home/cui 的目录下面而不是usr目录下面,否则会导致创建域的权限问题
在这里插入图片描述
文件内容 ?

[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/cui/weblogic/wls

#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>

#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=<SECURE VALUE>

#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=/home/cui/weblogic/wls 表示weblogic的安装目录,需要修改成本地实际路径。

4. 创建Loc文件 oraInst.loc

文件内容 ?

inventory_loc=/home/cui/weblogic/oraInventory   (产品清单目录的路径就是你的用户路径)

inst_group=cui   (cui 表示用户所在的组名,查看用户所属组的命令: groups)

上面不知道为什么创建的cgn组最后变成了本地的cui组 T T,此部分写错会出现 “产品清单目录无效” 的错误!!!

5. 保证所需要的目录有读写权限
oraInst.loc    wls.rsp     fmw_12.1.3.0.0_wls.jar
[root@localhost cui]# chmod  +x  文件名
6. 安装weblogic
 [cui@localhost ~]$ cd /home/cui
(进入文件目录,执行安装命令)↓
 [cui@localhost ~]$ java -jar fmw_12.1.3.0.0_wls.jar  -silent  -responseFile  /home/cui/wls.rsp  -invPtrLoc /home/cui/oralnst.loc
 (注意文件的路径要正确)

本图为-weblogic12.1.3.0.0
在这里插入图片描述
本图为-weblogic12.2.1.3.0 — JDK1.7版本低 最后无法启动服务
在这里插入图片描述

7. 创建domain域名
mkdir -p /home/cui/user_projects/domains/bash_domain

创建一个脚本createdomain.py (在该目录下:/home/cui/user_projects/domains/bash_domain)
文件内容 ?

readTemplate("/home/cui/weblogic/wls/wlserver/common/templates/wls/wls.jar")

cd("Servers/AdminServer")

set("ListenAddress","")

set("ListenPort",7001)

 

#=======================================================================================

# Define the user password for weblogic.

#=======================================================================================

cd("/Security/base_domain/User/weblogic")

# Please set password here before using this script, e.g. cmo.setPassword('value')

cmo.setPassword("weblogic123")

setOption('OverwriteDomain', 'true')

writeDomain("/home/cui/user_projects/domains/bash_domain")

closeTemplate()

exit()

readTemplate("/home/cui/weblogic/wls/wlserver/common/templates/wls/wls.jar") 实际文件路径
set(“ListenPort”,7001) 端口自行修改
cmo.setPassword(“weblogic123”) 登录密码自行修改
writeDomain("/home/cui/user_projects/domains/bash_domain") 实际路径

8. 启动服务
cd /home/cui/user_projects/domains/bash_domain/bin/
./startWebLogic.sh
如果没报错,则访问http://ip:port/console/login

在这里插入图片描述

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值