一、环境准备

1. 用户准备

Generic通用版weblogic不能用ROOT用户安装,如无其他用户需先创建用户,创建用户步骤此处略过

2. 下载weblogic

在官网下载weblogic,将下载好的jar包上传到linux服务器上

3. JDK环境

如果原来已配置好JDK环境可跳过该步骤

步骤

  1. 编辑器打开.bash_profile文件
    vi ~/.bash_profile
  2. 填写jdk相关环境变量
    export JAVA_HOME=/usr/local/jdk1.7.0_80
    export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
    export PATH=$JAVA_HOME/bin:$PATH
  3. 使配置生效
    source ~/.bash_profile

二、安装

0. 约定

  1. 本例中安装路径为/usr/local/weblogic12c,可根据自己情况修改

    最终目录结构为

    /usr/local/weblogic12
    |--bea // 程序目录
    |--user_projects // 域集合
    |--xxxDomain // 域

    注:weblogic下可以创建多个域,很多教程创建域时目录命名为domain,与bea同级,如此不利于多个域的管理,所以把域归集到user_projects目录下,一个项目对应一个域

  2. 用户 weblogic

    用户组 weblgoicgroup

1. 创建oraInst.loc文件

注:文件路径无所谓,注意修改inst_group为实际的组名

vi oraInst.loc
inventory_loc=/home/weblogic/oraInventory
inst_group=weblgoicgroup

安装程序使用Oracle清单目录来跟踪安装在计算机上的所有Oracle产品。清单目录中存放的文件名为orainst.loc。如果该文件不存在于您的系统上,则必须在启动静默安装之前创建该文件。安装程序使用此文件。

用你想要安装程序创建清单目录的完整路径目录替换oui_inventory_directory。然后,用其成员有这个目录的写权限的组的名称替换oui_install_group。

2. 创建响应文件wls.rsp

注:文件路径无所谓,注意修改ORACLE_HOME

vi 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=/usr/local/weblogic12c/bea
#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=

3. 安装

注:注意指定wls.rsp和oraInst.loc路径

java -jar fmw_12.1.3.0.0_wls.jar -silent -responseFile /usr/local/weblogic12c/wls.rsp -invPtrLoc /usr/local/weblogic12c/oraInst.loc

安装过程比较久,耐心等待即可


三、创建域

0. 准备

  1. 由于Linux下的Java生成随机数规则与Windows的机制不一样,需要修改securerandom.source为/dev/./urandom (原值为/dev/random),否则会出现创建、启动域的时候耗时非常长的问题。(共性问题,请放心更改,如不放心可百度权威解释)
    cd $JAVA_HOME/jre/lib/security
    vi java.security
    securerandom.source=file:/dev/random
    # 修改为
    securerandom.source=file:/dev/./urandom
  2. 配置环境变量
    vi ~/.bash_profile
    export MW_HOME=/usr/local/weblogic12c/bea
    source ~/.bash_profile

1. 创建域

  1. 创建目录
    mkdir /usr/local/weblogic12c/user_projects/xxxDomain
  2. 执行运行文件
    cd $MW_HOME/wlserver/common/bin
    ./commEnv.sh
    ./wlst.sh
    wls:/offline>
    wls:/offline> readTemplate('/usr/local/weblogic12c/bea/wlserver/common/templates/wls/wls.jar')
    wls:/offline/base_domain>cd('Servers/AdminServer')
    wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','')
    wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 7001)
    wls:/offline/base_domain/Server/AdminServer>cd('/')
    wls:/offline/base_domain>cd('Security/base_domain/User/weblogic')
    wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('YourPassword')
    wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true')
    wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/usr/local/weblogic12c/user_projects/xxxDomain')
    wls:/offline/domain/Security/domain/User/weblogic>closeTemplate()
    wls:/offline>exit()

    注:注意根据需要修改端口、密码、域路径


四、启动weblogic

cd /usr/local/weblogic12c/user_projects/xxxDomain/bin/ -- 进入创建的域目录bin下
./startWebLogic.sh -- 后台启动使用nohup ./startWebLogic.sh &
./stopWeblogic.sh -- 关闭weblogic

启动浏览器访问weblogic控制台http://IP:7001/console,用户名默认是weblogic,密码是创建域时设置的。


最新文章

  1. ORACLE AWR结合ASH诊断分析enq: TX - row lock contention
  2. RDLC的部署(无法找到Microsoft.ReportViewer.ProcessingObjectModel.dll文件)
  3. python(5)-os模块
  4. URL参数加密解密
  5. django models 类型整理 version:1.8.3
  6. checkbox属性获取
  7. 18.翻译系列:EF 6 Code-First 中的Seed Data(种子数据或原始测试数据)【EF 6 Code-First系列】
  8. 阿里巴巴 Java 代码规范
  9. python 转换代码格式
  10. vmware如何安装ubuntu
  11. Java十进制数转二进制的方法
  12. 【BZOJ】【3931】【CQOI2015】网络吞吐量
  13. 【Java面试题】9 abstract class和interface有什么区别?
  14. [py]类属性和实例属性
  15. wikioi 1028 花店橱窗布置 最大权匹配
  16. Ubuntu 16.04.2 LTS 安装 jdk1.6 和 tomcat6 (一)
  17. 事后诸葛亮--Alpha版本总结
  18. nodejs(三)下之mangoDB
  19. 配置 VS Code 调试 JavaScript
  20. Python:dict字典

热门文章

  1. Effective C++ Item 30 inline里里外外
  2. Linux下Rootkit的另类检测
  3. C#一些延时函数
  4. C/C++(C++重载,默认参数,引用)
  5. 【editplus经常用的快捷键】Editplus 选中一行ctrl+r,Edit 合并行 Ctrl+Shift+J 合并选定行 删除当前行
  6. 深入浅出WPF 第一部分(3)
  7. 參考mudo logging写的win下logging
  8. The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.
  9. sql创建外键
  10. 手机端使用rem的适配