概述
@TOCh1.静默安装
mkdir -p /home/wls/response/
mkdir -p /home/wls/Oracle/Middleware
mkdir -p /home/wls/oraInventory1
vim /home/wls/response/wls.rsp
vim /home/wls/response/oraInst.loc
=====================================
[weblogic@jodge-fan4 ~]$ java -Xmx1024m -jar fmw_12.2.1.3.0_wls.jar -silent -responseFile /home/wls/response/wls.rsp -invPtrLoc /home/wls/response/oraInst.loc
vim wls.rsp:
添加以下内容:
[ENGINE]
#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/home/wls/Oracle/Middleware
INSTALL_TYPE=WebLogic Server
DECLINE_SECURITY_UPDATES=false
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
vim oraInst.loc
添加以下内容:
inventory_loc=/home/wls/oraInventory1
inst_group=weblogic
========================================
节点和管理到此为止。
···················`·····························
只在管理端执行:
mkdir -p /home/wls/Oracle/Middleware/user_projects/domains/base_domain/
mkdir -p /home/wls/Oracle/Middleware/wlserver/common/templates/wls/
[weblogic@web01 response]$ vim /home/wls/response/create_domain.rsp #创建域,参数文件
-----------------------------------
read template from "/home/wls/Oracle/Middleware/wlserver/common/templates/wls/wls.jar";
set JavaHome "/usr/java/jdk1.8.0_144";
set ServerStartMode "prod";
find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "";
set AdminServer.ListenPort "7009";
//set AdminServer.SSL.Enabled "true";
//set AdminServer.SSL.ListenPort "8083";
//We can directly create a new managed server.
//create Server "server_1" as server_1;
//set server_1.ListenAddress "172.20.63.199";
//set server_1.ListenPort "7009";
//set server_1.SSL.Enabled "true";
//set server_1.SSL.ListenPort "8083";
//use templates default weblogic user
find User "weblogic" as u1;
set u1.password "chzh@2017";
write domain to "/home/wls/Oracle/Middleware/user_projects/domains/base_domain/";
// The domain name will be "base-domain"
close template;
静默创建域(只在管理端)
[weblogic@web01 bin]$ pwd
/home/wls/Oracle/Middleware/oracle_common/common/bin
[weblogic@web01 bin]$ export JAVA_OPTIONS="-Djava.security.egd=file:/dev/./urandom"
[weblogic@web01 bin]$ ./config.sh -mode=silent -silent_script=/home/wls/response/create_domain.rsp -logfile=/home/wls/response/creat_domain.log
到此就已经成功创建了域。
2.图形界面安装
先安装图形界面(如果系统安装选的是minimal)
[root@jodge-fan3 ~]# yum -y install wget
[root@jodge-fan4 yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
[root@jodge-fan4 yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@jodge-fan4 yum.repos.d]# yum -y groupinstall "Server with GUI"
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
nmap-ncat-6.40-7.el7.x86_64.rp FAILED
[root@jodge-fan4 yum.repos.d]# yum -y install deltarpm
[root@jodge-fan3 yum.repos.d]# yum clean all
[root@jodge-fan3 yum.repos.d]# yum makecache
[root@jodge-fan4 yum.repos.d]# yum -y groupinstall "Server with GUI"
[root@jodge-fan3 yum.repos.d]# systemctl get-default
multi-user.target
[root@jodge-fan3 yum.repos.d]# systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target
在第一个窗口执行:(此处需要在本地计算机打开xmanager passive模式,因为远程弹出窗口需要调用xmanager)
[root@jodge-fan4 ~]# export DISPLAY=localhost:0.0
打开另一个窗口,执行下面两条命令
[root@jodge-fan4 ~]# xhost +
access control disabled, clients can connect from any host
[root@jodge-fan4 ~]# xhost +localhost
localhost being added to access control list
回到第一个窗口执行:
[root@jodge-fan4 ~]# su - weblogic
[weblogic@jodge-fan4 ~]$ export DISPLAY=192.168.1.186:0.0
[weblogic@jodge-fan4 ~]$ java -Xmx1024m -jar fmw_12.2.1.3.0_wls.jar
3.打包复制域(pack and unpack)
打包是在管理端打包,把域环境做一个包分发到节点
[weblogic@jodge-fan3 bin]$ mkdir -p /home/wls/Oracle/Middleware/templates
[weblogic@jodge-fan4 bin]$ pwd
/home/wls/Oracle/Middleware/oracle_common/common/bin
[weblogic@jodge-fan4 bin]$ ./pack.sh -domain=/home/wls/Oracle/Middleware/user_projects/domains/base_domain -template=/home/wls/Oracle/Middleware/templates/base_domain.jar -template_name="My WebLogic Domain" -managed=true
只在节点管理器执行unpack--
[weblogic@jodge-fan3 bin]$ ./unpack.sh -template=/home/wls/Oracle/Middleware/templates/base_domain.jar -domain=/home/wls/Oracle/Middleware/user_projects/domains/base_domain -nodemanager_type=ManualNodeManagerSetup -server_start_mode=prod
Warning: "-server_start_mode" for a managed template is ignored. #pack选择-managed=true不需要此参数 |-根据安装域时选项不同还可选择PerDomainNodeManager或CustomLocationNodeManager(此选项还要加一个参数-nodemanager_home=home指定nodemanager目录)
4.配置nodemanager(以manual安装方式为例,需要手动指定路径等,在节点和管理端都要配置,每台机器配置一对应的machine)
[weblogic@jodge-fan3 base_domain]$ pwd
/home/wls/Oracle/Middleware/user_projects/domains/base_domain
[weblogic@jodge-fan3 base_domain]$ mkdir machine-0
[weblogic@jodge-fan3 base_domain]$ cd machine-0/
[weblogic@jodge-fan3 machine-0]$ cp ../bin/startNodeManager.sh .
[weblogic@jodge-fan3 machine-0]$ vi startNodeManager.sh
-------------------------------------------------------
WL_HOME="/home/wls/Oracle/Middleware/wlserver"
NODEMGR_HOME="/home/wls/Oracle/Middleware/user_projects/domains/base_domain/machine-0"
-------------------------------------------------------
[weblogic@jodge-fan3 machine-0]$ vi nodemanager.properties
--------------------------------
ListenAddress=172.20.63.1*
ListenPort=5556
SecureListener=false
--------------------------------
环境变量:
vim ~/.bashrc
export JAVA_HOME=/usr/java/jdk1.8.0_144
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
cd /home/wls/Oracle/Middleware/wlserver/server/bin
vim setWLSEnv.sh
JAVA_HOME="/usr/java/jdk1.8.0_144"
export JAVA_HOME
cd /home/wls/Oracle/Middleware/oracle_common/common/bin
vim commEnv.sh
------------------------------------------------------------------------------------------------------------
在节点和管理端都要执行!!!各执行各的!:
[weblogic@jodge-fan3 machine-0]$ cd ../../../../wlserver/server/bin #注册节点到域
[weblogic@jodge-fan3 bin]$ source setWLSEnv.sh
[weblogic@jodge-fan3 bin]$ java weblogic.WLST
wls:/offline> connect('weblogic','chzh@2017','t3://172.20.63.119:7009')
wls:/base_domain/serverConfig/> nmEnroll('/home/wls/Oracle/Middleware/user_projects/domains/base_domain','/home/wls/Oracle/Middleware/user_projects/domains/base_domain/machine-0')
wls:/base_domain/serverConfig/> exit()
登陆weblogic管理后台,设置以下两个配置
A.服务器-->AdminServer-->一般信息-->监听地址(主机IP地址) #留空会出现错误-Dweblogic.Name does not exist
B.服务器-->AdminServer-->配置-->SSL-->高级-->主机名验证(无)
C.计算机-->名称-->配置-->节点管理器-->类型(普通)
D.服务器-->新建-->服务器名称(physocal-8083)-->服务器监听地址(节点ip)-->监听端口(服务端口)-->编辑并锁定(选择相应的计算机)-->
E.如果是集群的话,服务器是属于集群的,计算机室属于服务器的。
-Xms512m -Xmx512m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m -Djava.net.preferIPv4Stack=true -Dweblogic.transaction.SecurityInteropMode=compatibility -Dfile.encoding=UTF-8 -Dweblogic.threadpool.MinPoolSize=50 -Dweblogic.threadpool.MaxPoolSize=300 -Dweblogic.client.socket.ConnectTimeout=500 -Djava.security.egd=file:/dev/./urandom
5.配置coherence集群
编辑weblogic.xml文件,加入类似以下语句
<session-descriptor>
<!-- <persistent-store-type>replicated</persistent-store-type> -->
<persistent-store-type>replicated_if_clustered</persistent-store-type>
<!--<persistent-store-type>memory</persistent-store-type> -->
<timeout-secs>60</timeout-secs>
</session-descriptor>
session复制方式说明:
---------------------------------------------------------------
memory—------------------------Disables persistent session storage.
replicated—--------------------Same as memory, but session data is replicated across the clustered servers.
replicated_if_clustered—-------If the Web application is deployed on a clustered server, the in-effect persistent-store-type will be replicated. Otherwise, memory is the default.
async-replicated—--------------Enables asynchronous session replication in an application or Web application. See "Asynchronous HTTP Session Replication" in Performance and Tuning for Oracle WebLogic Server.
async-replicated-if-clustered—-Enables asynchronous session replication in an application or Web application when deployed to a cluster environment. If deployed to a single server environment, then the session persistence/replication defaults to in-memory. This allows testing on a single server without deployment errors.
file—--------------------------Uses file-based persistence (See also session-descriptor).
async-jdbc—--------------------Enables asynchronous JDBC persistence for HTTP sessions in an application or Web application. See Configuring Session Persistence.
jdbc—--------------------------Uses a database to store persistent sessions. (see also session-descriptor).
cookie—------------------------All session data is stored in a cookie in the user's browser.
---------------------------------------------------------------
6.创建proxy
web.xml:
---------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<servlet>
<servlet-name>HttpClusterServlet</servlet-name>
<servlet-class>weblogic.servlet.proxy.HttpClusterServlet</servlet-class>
<init-param>
<param-name>WebLogicCluster</param-name>
<param-value>211.153.66.170:18801|211.153.66.171:18801|211.153.66.172:18801</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.jpd</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.jcx</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.dtf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.jws</url-pattern>
</servlet-mapping>
</web-app>
----------------------------------------------
weblogic.xml:
---------------------------------------
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<context-root>/</context-root>
<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>GBK</java-charset-name>
</input-charset>
</charset-params>
</weblogic-web-app>
--------------------------------------------
7.打补丁
[weblogic@HGK-234 ~]$ mkdir /home/weblogic/Oracle/Middleware/patchs
[weblogic@HGK-234 ~]$ unzip -d /home/weblogic/Oracle/Middleware/patchs /home/fileshare/p27441341_122130_Generic.zip
[weblogic@HGK-234 ~]$ cd /home/weblogic/Oracle/Middleware/patchs
[weblogic@HGK-234 patchs]$ /home/weblogic/Oracle/Middleware/OPatch/opatch napply -id 27342434,27441341 (多个补丁)
[weblogic@HGK-234 ~]$ cd /home/weblogic/Oracle/Middleware/patchs/27342434
[weblogic@HGK-234 27342434]$ /home/weblogic/Oracle/Middleware/OPatch/opatch apply (单个补丁)
[weblogic@HGK-234 OPatch]$ ./opatch lspatches #查看已安装补丁
[weblogic@HGK-234 OPatch]$ ./opatch lsinventory #验证补丁应用bug
opatch rollback -id 26519417 #单个补丁回滚
opatch nrollback -id 15941858,15955138 #多个补丁回滚
8.更新opatch
[weblogic@web03 6880880]$ java -Xmx2048m -jar opatch_generic.jar -silent oracle_home=/home/weblogic/Oracle/Middleware
[weblogic@web03 OPatch]$ ./opatch version
OPatch Version: 13.9.4.0.0
最后
以上就是长情皮带为你收集整理的安装weblogic12.2.1.3.0集群的全部内容,希望文章能够帮你解决安装weblogic12.2.1.3.0集群所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复