RedHat 搭建Wblogic12c

1.首先准备环境

weblogic12c 要求jdk要1.7以上才可以。

2.配置jdk 环境变量

 export JAVA_HOME=/usr/java/jdk1.7.0_80
 export JRE_HOME=${JAVA_HOME}/jre
 export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
 export PATH=$JAVA_HOME/bin:$PATH

3.最重要的一条是确认虚拟机的Ip

hostname  -i  此时如果显示虚拟机ip,修改/etc/hosts,重启网络  service network  restart

4.新建用户组

groupadd web

5.新建用户weblogic并修改用户密码

useradd -g web weblogic //添加用户,并用-g参数来指定web用户组

passwd weblogic //passwd 命令修改密码

6.静默方式(Slient Mode)

-response file:响应文件

-invPtrLoc file:初始化环境文件

命令:java -jar Weblogicfmw_12.1.3.0.0_wls.jar -silent -response /home/weblogic/response/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc

7.在相应的路径创建文件(wls.rsp和oralnst.loc)

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/Middleware
#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= 


创建oraInst.loc  文件

inventory_loc=/home/weblogic/oraInventory1 
inst_group=web


8.配置文件配置后就可以安装了

执行命令java -jar Weblogicfmw_12.1.3.0.0_wls.jar -silent -response /home/weblogic/response/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc

控制台会显示如下:

正在提取文件............
Java HotSpot(TM) Server VM warning: You have loaded library /tmp/orcl305077197089615615.tmp/Disk1/install/linux/libjni.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
启动 Oracle Universal Installer

等一会,出现

预期的结果: 1.7
实际结果: 1.7.0_40
检查完成。此次检查的总体结果为: 通过
CheckJDKVersion 检查: 成功。
正在验证数据...
正在复制文件...
-----------20%----------40%----------60%----------80%--------100%
WebLogic Server 12.1.2.0.0 的 installation 已成功完成。


9.接下来创建domain

/home/weblogic/Oracle/Middleware/user_projects/domains/


10.创建配置文件(create_domain.rsp)


read template from "/home/weblogic/Oracle/Middleware/wlserver/common/templates/wls/wls.jar";
 
set JavaHome "/usr/java/jdk1.7.0_80"; 
set ServerStartMode "dev"; 
 
find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "";
set AdminServer.ListenPort "8001";
set AdminServer.SSL.Enabled "true";
set AdminServer.SSL.ListenPort "8002";
 
//We can directly create a new managed server.
create Server "base" as BASE;
set BASE.ListenAddress "";
set BASE.ListenPort "8003";
//set BASE.SSL.Enabled "true";
//set BASE.SSL.ListenPort "8004″;
 
//Create Machine
create Machine "base" as Machinename;
 
//use templates default weblogic user
find User "weblogic" as u1;
set u1.password "weblogic123";
 
//create a new user
create User "weblogic2" as u2;
set u2.password "weblogic123";
 
write domain to "/home/weblogic/Oracle/Middleware/user_projects/domains/ultraDomain2/"; 
 
// The domain name will be "demo-domain"


 
close template;

 

蓝色地址根据自己的地址填写。


11.在指定路径(/home/weblogic/Oracle/Middleware/wlserver/common/bin)执行命令

./config.sh -mode=silent -silent_script=/home/weblogic/Oracle/Middleware/user_projects/domains/ultraDomain/create_domain.rsp -logfile=/home/weblogic/create_domain.log

查看执行结果,如果有失败的,修改domain实例

write domain to "/home/weblogic/Oracle/Middleware/user_projects/domains/ultraDomain2/"; 


12.最后启动

进入路径/home/weblogic/Oracle/Middleware/user_projects/domains/ultraDomain2/bin

执行 [weblogic@redhat bin]$ nohup ./startWebLogic.sh &

http://192.168.138.133:8001/console/login/LoginForm.jsp

用户名:weblogic 密码weblogic123

weblogic2 密码weblogic123




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值