linux下weblogic安装

环境准备:

1.weblogic安装包:fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip

2.java环境:jdk1.8

安装步骤:

1.创建用户:useradd weblogic

2.修改密码:passwd weblogic

3.weblogic配置:

    编辑 ~/.bash_profile。 添加内容 umask 002    ulimit -c unlimited   

4.创建weblogic所需目录:

     mkdir  /lc/oraInventory    

     mkdir  /lc/install

     mkdir /lc/weblogic

     进入/lc/weblogic 目录下使用 unzip fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip 解压该zip文件

     进入  /lc/install  目录下编辑两个文件:

       (1)oraInst.loc:

                  文件内容:nventory_loc=/root/ait/oraInventory
                                    inst_group=weblogic

        (2)wls.rsp:

                  文件内容:[ENGINE]

                                    #DO NOT CHANGE THIS

                                    Response File Version=1.0.0.0.0

                                    [GENERIC]

                                    #weblogic的安装路径

                                    ORACLE_HOME=/root/ait/weblogic

                                     #Set this variable value to the Installation Type selected.e.g.     WebLogic Server, Coherence,                                                  Complete with Examples.

                                      INSTALL_TYPE=WebLogic Server

                                      DECLINE_SECURITY_UPDATES=true

                                     SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

            编辑完成之后进入 

                /lc/weblogic目录下 使用Java -jar 运行 fmw_12.2.1.3.0_wls_quick.jar 文件。当看到  Percent Complete : 100证明安装完成。

5.创建domain域

    进入 /root/ait/weblogic/wls12213/oracle_common/common/bin(可使用pwd自己查看自己的实际路径)编辑config.sh文件,内容如下:

              #!/bin/sh

              SCRIPTNAME=$0
              SCRIPTPATH=`dirname "${SCRIPTNAME}"`

              # Delegate to the common delegation script ...
              "${SCRIPTPATH}/fmwconfig_common.sh" config_internal.sh "$@"
              JVM_ARGS="-Djava.security.egd=file:///dev/urandom-Dpython.cachedir=/tmp/cachedir ${JVM_D64}                                 ${UTILS_MEM_ARGS}${SECURITY_JVM_ARGS} ${CONFIG_JVM_ARGS}"

之后运行wlst.sh文件 当出现:wls:/offline> 命令行证明安装成功!

运行以下命令来安装domain域:

readTemplate('/root/ait/weblogic/wls12213/wlserver/common/templates/wls/wls.jar')(pwd查看自己的实际路径)
警告: readTemplate 已过时。在 selectTemplate 后请使用 loadTemplates 以取代 readTemplate。
wls:/offline/base_domain>cd('Servers/AdminServer')
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.setName('weblogic')
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('weblogic123')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('ServerStartMode','prod')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain','true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/root/ait/weblogic/user_projects/domains/proddomain')
wls:/offline/proddomain/Security/proddomain/User/weblogic>closeTemplate()
wls:/offline>exit()

6.启动weblogic

   ./startWeblogic.sh

问题:

    1.~/.bash_profile 与/etc的profile文件作用一样,前一个只在当前用户下有效如weblogic用户,后一个属于系统变量,所有用户都起作用。

    2.一定要将ait目录下的文件的权限加上可执行权限可以使用 chmod u+x ./* 或者 chmod 777 ./*来设置,否则可能操作的过程中某些文件不可操作导致安装失败

    3.readTemplate('/root/ait/weblogic/wls12213/wlserver/common/templates/wls/wls.jar')(pwd查看自己的实际路径)
警告: readTemplate 已过时。在 selectTemplate 后请使用 loadTemplates 以取代 readTemplate。若在此步长时间未到下一步可使用下述方式解决:(原因:
Linux下的Java生成随机数规则与Windows的机制不一样

      进入JAVA_HOME/jre/lib/security/ 下编辑 编辑 java.security 文件,内容如下:

          将 securerandom.source=file:/dev/random 修改为 securerandom.source=file:/dev/./urandom 保存退出重新执行readTemplate即可。
 

           

 

 

你可能感兴趣的:(weblogic)