1. 创建域1.1. JAVA_HOME问题的解决
安装完weblogic程序后需要创建域。创建域需运行. /Middleware/wlserver_10.3/common/bin下的config.sh脚本。操作如下:< xmlnamespace prefix ="o" ns ="urn:schemas-microsoft-com:office:office" />
[/home/pboss23]$ls
bea Desktop Oracle zsmart zsmart110719.tar
[/home/pboss23]$cd Oracle
[/home/pboss23/Oracle]$ls
Middleware
[/home/pboss23/Oracle]$cd Middleware
[/home/pboss23/Oracle/Middleware]$ls
coherence_3.6 domain-registry.xml logs modules ocm.rsp registry.dat registry.xml utils wlserver_10.3
[/home/pboss23/Oracle/Middleware]$cd wlserver_10.3
[/home/pboss23/Oracle/Middleware/wlserver_10.3]$ls
bugsfixed common inventory L10N server sip uninstall
[/home/pboss23/Oracle/Middleware/wlserver_10.3]$cd common
[/home/pboss23/Oracle/Middleware/wlserver_10.3/common]$ls
bin deployable-libraries derby eval lib nodemanager quickstart templates wlst
[/home/pboss23/Oracle/Middleware/wlserver_10.3/common]$cd bin
[/home/pboss23/Oracle/Middleware/wlserver_10.3/common/bin]$ls
commEnv.sh config.sh setPatchEnv.sh startManagedWebLogic.sh unpack.sh wlscontrol.sh wlst.sh
config_builder.sh pack.sh startDerby.sh stopDerby.sh upgrade.sh wlsifconfig.sh
[/home/pboss23/Oracle/Middleware/wlserver_10.3/common/bin]$./config.sh
./config.sh: line 103: /usr/lib/jvm/java-1.6.0-sun-1.6.0.15.x86_64/bin/java: 没有那个文件或目录
我安装的这个平台运行config.sh脚本时报错了。有提示说每103行有问题。问题为/usr/lib/jvm/java-< xmlnamespace prefix ="st1" ns ="urn:schemas-microsoft-com:office:smarttags" />1.6.0-sun-1.6.0.15.x86_64/bin/java这个java程序不存在。
用vi文本编辑器打开config.sh,定位到103行。
eval '"${JAVA_HOME}/bin/java"' ${JVM_ARGS} com.oracle.cie.wizard.WizardController ${ARGUMENTS}
这个JAVA_HOME设的不正确。但这个JAVA_HOME的变量在哪里设的呢?
再到这个脚本的第45行左右看,config.sh在运行前导入运行了${WL_HOME}/common/bin/commEnv.sh这个脚本。我们退出vi不保存编辑。
# set up WL_HOME, the root directory of your WebLogic installation
WL_HOME="/home/pboss23/Oracle/Middleware/wlserver_10.3"
OS=`uname -s`
umask 027
# set up common environment
. "${WL_HOME}/common/bin/commEnv.sh"
我们打开config.sh同路径下的commEnv.sh脚本。看看JAVA_HOME是怎么定义的。
commEnv.sh定位到145行左右开始,内容如下:
# Reset JAVA_HOME, JAVA_VENDOR and PRODUCTION_MODE unless JAVA_HOME
# and JAVA_VENDOR are pre-defined.
if [ -z "${JAVA_HOME}" -o -z "${JAVA_VENDOR}" ]; then
# Set up JAVA HOME
JAVA_HOME="/usr/lib/jvm/java-1.6.0-sun-1.6.0.15.x86_64"
# Set up JAVA VENDOR, possible values are
#Oracle, HP, IBM, Sun ...
JAVA_VENDOR=Sun
# PRODUCTION_MODE, default to the development mode
PRODUCTI/usr/lib/jvm/java-1.6.0-sun-1.6.0.15.x86_64"
在命令行看看有没有这个路径
[~]#cd /usr/lib/jvm/java-1.6.0-sun-1.6.0.15.x86_64
[java-1.6.0-sun-1.6.0.15.x86_64]#ls -la
总计 16
drwxr-xr-x 3 root root 4096 06-28 18:20 .
drwxr-xr-x 5 root root 4096 06-28 18:21 ..
drwxr-xr-x 4 root root 4096 06-28 18:20 jre
[java-1.6.0-sun-1.6.0.15.x86_64]#cd jre
[jre]#ls -l
总计 8
drwxr-xr-x 2 root root 4096 07-12 04:04 bin
drwxr-xr-x 19 root root 4096 06-29 04:02 lib
jre]#cd bin
bin]#ls -l
总计 780
-rwxr-xr-x 1 root root 6347 2009-08-06 ControlPanel
-rwxr-xr-x 1 root root 54178 2009-07-03 java
-rwxr-xr-x 1 root root 30518 2009-07-03 java_vm
-rwxr-xr-x 1 root root 6347 2009-07-03 jcontrol
-rwxr-xr-x 1 root root 56075 2009-07-03 keytool
-rwxr-xr-x 1 root root 56331 2009-07-03 orbd
-rwxr-xr-x 1 root root 56155 2009-07-03 pack200
-rwxr-xr-x 1 root root 56979 2009-07-03 policytool
-rwxr-xr-x 1 root root 56075 2009-07-03 rmid
-rwxr-xr-x 1 root root 56075 2009-07-03 rmiregistry
-rwxr-xr-x 1 root root 56075 2009-07-03 servertool
-rwxr-xr-x 1 root root 56331 2009-07-03 tnameserv
-rwxr-xr-x 1 root root 188781 2009-07-03 unpack200
原来JAVA程序是在/usr/lib/jvm/java-1.6.0-sun-1.6.0.15.x86_64/jre/bin下面。把commEnv.sh脚本中的JAVA_HOME定义改为:
JAVA_HOME="/usr/lib/jvm/java-1.6.0-sun-1.6.0.15.x86_64/jre"
保存commEnv.sh脚本的修改并退出。 |