这里说下关于在Ubuntu Server 14.04 LTS(64bit)下安装weblogic Server 12c(12.1.3) Zip Distribution遇到的问题。至于Windows环境下的安装没什么好说的,只要你根据wls1213_dev.zip中自带的README.TXT一步步做,是不会出现问题的。但是对于在一个干净的Ubuntu Server下的来说,根据向导的说明你是装不起来的。因为它缺少了必要的环境设置,也许这对于linux下的老手来说这些都不是事。
当在安装中遇到问题时,如果询问百度,你会所搜到很多安装教程(大部分是Windows环境)。个别安装向导中还会提到两个环境变量的设置,这两个变量在安装目录下的README.txt中不曾提到,这两个是:
1. JAVA_VENDOR=Sun
2. CONFIG_JVM_ARGS=-Djava.security.egd=file:/dev/./urandom
其中 JAVA_VENDOR=Sun 从weblogic Server 12c(12.1.2)之后应该是不需要再设置了。而CONFIG_JVM_ARGS=-Djava.security.egd=file:/dev/./urandom是针对Linux环境的。但是在Ubuntu 都不起作用。真不知道,倒是Weblogic的问题,还是Ubuntu自身的问题。
在给出我的安装步骤之前,给各位再提供篇Oracle官方关于Weblogic 12c ZIP的安装指导,在Ubuntu下没指导意义。
下面我们步入正题。
准备工作
1.你需要为你的Ubuntu安装好JDK,并设置好环境变量。至于如何去做,这里不再细说,不会的同学请自己谷歌或百度。
2、从Oralce官网下载最新的Weblogic 12c (当前文档编写时的最新版本是Weblogic 12c(12.1.3))。
安装步骤
1、将下载的wls1213_dev.zip 解要到home下,名为wls12130。
- unzip wls1213_dev.zip
- mv wls12130 ~
2、安装
- cd ~/wls12130
- export MW_HOME=/home/zhaojh/wls12130/
- export JAVA_OPTIONS="-Djava.security.egd=file:/dev/./urandom"
- ./configure.sh
输出
- **************************************************
- WebLogic Server 12g (12.1.3.0) Zip Configuration
-
- MW_HOME: /home/zhaojh/wls12130/
- AVA_HOME: /home/zhaojh/jvm-7-oracle
- **************************************************
-
- Please wait while 740 jars are unpacked ...
- ...Unpacking done 0 to goo goto go
-
-
- BUILD SUCCESSFUL
- Total time: 0 seconds
- CLASSPATH=......省略
-
- PATH=.....省略
-
- Your environment has been set.
- Configuring WLS...
-
- BUILD SUCCESSFUL
- Total time: 0 seconds
-
- Do you want to configure a new domain? [y/n]? n
注意上面输出信息最后那个 “Do you want to configure a new domain?” 时选择n
3、配置一个新域
- . $MW_HOME/wlserver/server/bin/setWLSEnv.sh
- mkdir -p user_projects/domains/mydomain
- cd user_projects/domains/mydomain
- java $JAVA_OPTIONS -Xmx1024m -XX:MaxPermSize=256m weblogic.Server
输出内容
- <Oct 27, 2014 1:10:35 PM CST> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.>
- <Oct 27, 2014 1:10:35 PM CST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
- <Oct 27, 2014 1:10:36 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 24.65-b04 from Oracle Corporation.>
-
- /home/zhaojh/wls12130/user_projects/domains/mydomain/config not found
-
- No config.xml was found.
- Would you like the server to create a default configuration and boot? (y/n): <strong><span style="color:#ff0000;">y</span></strong>
- <Oct 27, 2014 1:10:38 PM CST> <Info> <Management> <BEA-140013> </home/zhaojh/wls12130/user_projects/domains/mydomain/config not found>
- <Oct 27, 2014 1:10:38 PM CST> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
- Enter username to boot WebLogic server:weblogic
- Enter password to boot WebLogic server:<password>
- For confirmation, please re-enter password required to boot WebLogic server:<password>
- <Oct 27, 2014 1:10:48 PM CST> <Info> <Management> <BEA-141254> <Generating new domain directory in /home/zhaojh/wls12130/user_projects/domains/mydomain.>
- <Oct 27, 2014 1:10:57 PM CST> <Info> <Management> <BEA-141255> <Domain generation completed in 9,318 milliseconds.>
- <Oct 27, 2014 1:10:57 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.3.0.0 Fri May 30 18:25:10 PDT 2014 1606070 >
- <Oct 27, 2014 1:10:58 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
- <Oct 27, 2014 1:10:58 PM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>
- <Oct 27, 2014 1:10:58 PM CST> <Info> <WorkManager> <BEA-002942> <CMM memory level becomes 0. Setting standby thread pool size to 256.>
- <Oct 27, 2014 1:10:59 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file /home/zhaojh/wls12130/user_projects/domains/mydomain/servers/myserver/logs/myserver.log is opened. All server side log events will be written to this file.>
- <Oct 27, 2014 1:11:02 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
- <Oct 27, 2014 1:11:14 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.>
- <Oct 27, 2014 1:11:14 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
- Oct 27, 2014 1:11:15 PM weblogic.wsee.WseeCoreMessages logWseeServiceStarting
- INFO: The Wsee Service is starting
- <Oct 27, 2014 1:11:15 PM CST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.>
- <Oct 27, 2014 1:11:15 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.>
- <Oct 27, 2014 1:11:15 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.>
当控制台上显示<Server state changed to RESUMING.>时,你就可以从浏览器中访问 http://localhost:7001/console 了
总结
在Ubuntu Server下安装Weblogic 12c (12.1.3)时,除了按照安装说明(安装目录下README.txt中)做之外,还需要注意两点:
1、在开始安装前不要忘了在设置MW_HOME的同时设置 JAVA_OPTIONS="-Djava.security.egd=file:/dev/./urandom" 。
2、在执行./configure.sh 时,在显示“Do you want to configure a new domain? [y/n]? ”时选择 “n”。