ITPub博客

首页 > Linux操作系统 > Linux操作系统 > weblogic coherence安装

weblogic coherence安装

原创 Linux操作系统 作者:sun642514265 时间:2013-11-21 14:29:21 0 删除 编辑
1:查看系统java环境


java -version


openjdk不支持,所以要改成安装sunjdk,下载sunjdk安装包(jdk-7u45-linux-x64.rpm)


2:安装sunjdk安装包


[root@oracle ~]# rpm -ivh jdk-7u45-linux-x64.rpm 


Preparing...                ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
jfxrt.jar...


查看安装路径,默认安装路径


/usr/java/jdk1.7.0_45


3:配置环境变量


root用户


[root@oracle ~]# vi /etc/profile


将下面变量添加到最下面


JAVA_HOME=/usr/java/jdk1.7.0_45
PATH=$JAVA_HOME/bin:$PATH  
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar  
export JAVA_HOME  
export PATH  
export CLASSPATH 


使添加的变量立即生效


[root@oracle ~]# source /etc/profile




创建oracle用户组




创建用户,输入命令:


groupadd  oinstall 
groupadd  dba


创建Oracle用户和密码,输入命令:


useradd -g oinstall -g dba -m oracle


passwd  oracle


然后会让你输入密码,密码任意输入2次,但必须保持一致,回车确认




切换到oracle用户下,配置环境变量


[oracle@oracle ~]$ cat .bash_profile
# .bash_profile


# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi


# User specific environment and startup programs


PATH=$PATH:$HOME/bin


export PATH
JAVA_HOME=/usr/java/jdk1.7.0_45
PATH=$JAVA_HOME/bin:$PATH  
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar  
export JAVA_HOME  
export PATH  
export CLASSPATH




使之变量立即生效


[oracle@oracle ~]$ source .bash_profile


4:查看当前java版本


[oracle@oracle ~]$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)


显示为sunjdk模式。




5:安装weblogic和coherence


weblogic和coherence 下载地址:http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html


oracle用户下


[oracle@oracle ~]$ java -jar wls_121200.jar 


安装过程中,选择完全安装。


安装完成以后,执行./startWeblogic.sh脚本


[oracle@oracle ~]$ cd /home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/wl_server/bin/




[oracle@oracle bin]$ ./startWebLogic.sh 


如果启动过程中报如下错误:


java.lang.AssertionError: Could not obtain the localhost address. The most likely cause is an error in the network configuration of this machine.
at weblogic.utils.net.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:39)
at weblogic.utils.net.AddressUtils$AddressMaker.(AddressUtils.java:34)
at weblogic.utils.net.AddressUtils.getIPForLocalHost(AddressUtils.java:207)
at weblogic.rjvm.JVMID.setLocalID(JVMID.java:236)
at weblogic.rjvm.RJVMService.setJVMID(RJVMService.java:50)
Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: oracle: oracle: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at weblogic.utils.net.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:37)
at weblogic.utils.net.AddressUtils$AddressMaker.(AddressUtils.java:34)
at weblogic.utils.net.AddressUtils.getIPForLocalHost(AddressUtils.java:207)
at weblogic.rjvm.JVMID.setLocalID(JVMID.java:236)
Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: oracle: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
at weblogic.utils.net.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:37)
Truncated. see log file for complete stacktrace

***************************************************************************
The WebLogic Server encountered a critical failure
Reason: Assertion violated
***************************************************************************
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class weblogic.protocol.ServerIdentityManager$Initializer
at weblogic.protocol.ServerIdentityManager.findServerIdentity(ServerIdentityManager.java:66)
at weblogic.protocol.URLManager.findAdministrationURL(URLManager.java:174)
at weblogic.server.ServerLifeCycleRuntime.getLifeCycleOperationsRemote(ServerLifeCycleRuntime.java:1124)
at weblogic.t3.srvr.ServerRuntime.sendStateToAdminServer(ServerRuntime.java:432)
at weblogic.t3.srvr.ServerRuntime.updateRunState(ServerRuntime.java:418)
at weblogic.t3.srvr.T3Srvr.setState(T3Srvr.java:208)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:484)
at weblogic.Server.main(Server.java:74)




那么


修改/etc/hosts文件


[root@oracle ~]# vi /etc/hosts


127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6




改成如下模式


127.0.0.1   oracle localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6






重新启动:


[oracle@oracle bin]$ ./startWebLogic.sh 




登陆 weblogic  :http://localhost:7001




























来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28698327/viewspace-777214/,如需转载,请注明出处,否则将追究法律责任。

下一篇: RAC下管理crs
请登录后发表评论 登录
全部评论

注册时间:2013-05-16

  • 博文量
    34
  • 访问量
    193296