centos7.0中weblogic安装部署

参考文章:http://blog.csdn.net/wjf8882300/article/details/52303728

  https://www.iyunv.com/thread-271068-1-1.html

一.JDK安装

1. 按如下路径将jdk解压生成jdk1.8.0_65

2.配置环境变量

[weblogic@localhost ~]vi .bashrc

#在文件最后添加以下配置

JAVA_HOME=/home/weblogic/jdk1.8.0_65

export JRE_HOME=$JAVA_HOME/jre

exportCLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH

exportPATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

[weblogic@localhost~]source .bashrc

上面的命令是让配置立即生效

[weblogic@localhost~]java -version

说明jdk安装成功

二.weblogic安装

1.建立群组,用户组

groupadd  weblogic

useradd -g weblogic weblogic

2.将文件/home/weblogic的所有者设置为weblogic,并添加权限

chown -R weblogic:weblogic /home/weblogic

chmod 755 /home/weblogic

3.准备好weblogic安装包,和一些配置文件

(a) fwm_12.2.1.1.0_wls.jar 官网下载地址

(b)[weblogic@localhost~] vi oraInst.loc

 inventory_loc=/home/weblogic/oraInventory
 inst_group=weblogic

(c)[weblogic@localhost~] vi wls12c.resp 

[ENGINE]


#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0


[GENERIC]


#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true


#My Oracle Support User Name
MOS_USERNAME=


#My Oracle Support Password
MOS_PASSWORD=<SECURE VALUE>


#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=


#Proxy Server Name to connect to My Oracle Support
SOFTWARE_UPDATES_PROXY_SERVER=


#Proxy Server Port
SOFTWARE_UPDATES_PROXY_PORT=


#Proxy Server Username
SOFTWARE_UPDATES_PROXY_USER=


#Proxy Server Password
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>


#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/home/weblogic/wls_12c


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

(d)[weblogic@localhost~] java -jar fmw_12.2.1.1.0_wls.jar -silent -responseFile /home/weblogic/wls12c.resp -invPtrLoc /home/weblogic/oraInventory

注意路径一定要是完全路径, 等待直到安装完成。

三.新建域domain(采用静默安装)

1.  [weblogic@localhost~] vi /home/weblogic/create_domain.rsp

read template from "/home/weblogic/wls_12c/wlserver/common/templates/wls/wls.jar";
set JavaHome "/usr/java/jdk1.8.0_65";
set ServerStartMode "dev";
 

find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "192.168.116.130";
set AdminServer.ListenPort "7001";
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/wls_12c/user_projects/domains/base_domain/";

close template;

2.  建域操作

(a)   [weblogic@localhost~] cd /home/weblogic/wls_12c/wlserver/common/bin/

(b)    [weblogic@localhost~] bash config.sh -mode=silent -silent_script=/home/weblogic/create_domain.rsp 

-logfile=/home/weblogic/create_domain.log

3.建域成功后,启动weblogic

(a)切换到startWeblogic.sh文件目录

(b)后台运行

[weblogic@localhost~] nohup ./startWeblogic.sh &

四、打开浏览器登入console,验证成功

五、安装过程中可能出现的问题

1. 在虚拟机中的weblogic启动成功后,主机浏览器访问不了    

    参考:http://blog.csdn.net/sudazf/article/details/50551822

    解决:

a.先确认虚拟机中是否能访问console

 [weblogic@localhost~] wget http://192.168.116.130:7001/console

b.可能是虚拟机中的防火墙有限制,centos默认的防火墙是  firewall

         [weblogic@localhost~] systemctl stop firewalld.service       #停止firewall 再试一下就可以了

猜你喜欢

转载自blog.csdn.net/wangjianqing1/article/details/79129046