centos

weblogic在centos上的集群部署技巧

小樊
40
2025-05-09 05:31:34
栏目: 智能运维

在CentOS上部署WebLogic集群涉及多个步骤,包括安装WebLogic、配置集群、启动集群等。以下是一个基本的指南,帮助你完成WebLogic在CentOS上的集群部署。

准备工作

  1. 安装Java:WebLogic需要Java环境,首先确保你已经安装了Java。
  2. 创建用户和组:创建用于管理WebLogic的用户和组。
    groupadd weblogic
    useradd -g weblogic weblogic
    passwd weblogic
    
  3. 解压WebLogic安装包:下载并解压WebLogic安装包。
    tar -zxvf wls<version>.jar
    

安装WebLogic

  1. 创建安装目录:创建WebLogic的安装目录。
    mkdir -p /WebLogic/oracle/middleware
    
  2. 配置安装响应文件:创建Install.rsp文件,配置安装选项。
    vi /WebLogic/oracle/Install.rsp
    
    示例配置:
    [ENGINE]
    Response File Version  1.0
    
    [GENERIC]
    The oracle home location. This can be an existing Oracle Home or a new Oracle Home
    ORACLE_HOME /WebLogic/oracle/middleware
    
    Set this variable value to the Installation Type selected. e.g. Fusion Middleware Infrastructure, Fusion Middleware Infrastructure 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  your_support_username
    
    Provide the My Oracle Support Password
    MYORACLESUPPORT_PASSWORD your_support_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  false
    
    Set this to true if My Oracle Support Password is specified.
    SECURITY_UPDATES_VIA_MYORACLESUPPORT  false
    
    Provide the Proxy Host
    PROXY_HOST your_proxy_host
    
    Provide the Proxy Port
    PROXY_PORT your_proxy_port
    
    Provide the Proxy Username
    PROXY_USER your_proxy_user
    
    Provide the Proxy Password
    PROXY_PWD your_proxy_password
    
    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 http://your_collector_hub_url
    
  3. 安装WebLogic:使用响应文件进行安装。
    su - weblogic
    java -jar /WebLogic/oracle/middleware/fmw_12.2.1.3.0_wls.jar -silent -invPtrLoc /etc/oraInst.loc -responseFile /WebLogic/oracle/Install.rsp
    

配置集群

  1. 创建集群:使用WebLogic Configuration Wizard创建集群。
    cd /WebLogic/oracle/middleware/wlserver_12.2.1.3.0/common/bin
    ./config.sh
    
  2. 配置管理服务器:在配置向导中选择“Create a new WebLogic domain”,然后配置管理服务器(AdminServer)。
  3. 添加托管服务器:在“Configure Servers”步骤中,添加托管服务器到集群中。
  4. 配置集群成员:确保每个托管服务器的配置正确,包括IP地址和端口。

启动集群

  1. 启动管理服务器:启动AdminServer。
    startWebLogic.sh
    
  2. 启动托管服务器:启动每个托管服务器。
    startManagedWebLogic.sh server1 http://admin_server_ip:7001
    startManagedWebLogic.sh server2 http://admin_server_ip:7001
    

监控和管理

  1. 使用WebLogic Console:通过WebLogic Console监控和管理集群。
    http://admin_server_ip:7001/console
    
  2. 使用WebLogic Infrastructure Monitor:监控集群的健康状况和性能。
    weblogic.sh monitor
    

注意事项

通过以上步骤,你可以在CentOS上成功部署WebLogic集群。请根据具体需求和环境调整配置。

0
看了该问题的人还看了