配置一个Weblogic域
Linux环境下
cd /u01/weblogic/wlserver_10.3/common/bin
./config.sh
根据向导设置。完成。
注:生产模式下部署,JDK应选择JRockit。只有在安装WLS+C
oherence
(
wls1036_linux32.bin)
时才有JRockit,带OEPE的安装包没有。
之后可以看到新生成如下的目录结构:
[wls@weblogic base_domain]$ pwd
/u01/weblogic/user_projects/domains/base_domain
[wls@weblogic base_domain]$ ll
total 36
drwxr-x--- 2 wls wls 4096 Aug 18 16:06 autodeploy
drwxr-x--- 5 wls wls 4096 Aug 18 16:09 bin
drwxr-x--- 9 wls wls 4096 Aug 18 16:09 config
drwxr-x--- 2 wls wls 4096 Aug 18 16:06 console-ext
-rw-r----- 1 wls wls 462 Aug 18 16:09 fileRealm.properties
drwxr-x--- 2 wls wls 4096 Aug 18 16:09 init-info
drwxr-x--- 2 wls wls 4096 Aug 18 16:06 lib
drwxr-x--- 2 wls wls 4096 Aug 18 16:09 security
-rwxr-x--- 1 wls wls 263 Aug 18 16:09 startWebLogic.sh
启动Weblogic域
./startWebLogic.sh
无法用nohup ./startWebLogic.sh,因为在启动中会询问用户名和密码。
可在启动后输入Ctrl+z,再bg,进入后台运行。
(报错……)
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.server.channels.BasicServerChannelImpl.getLocalHost(BasicServerChannelImpl.java:59)
at weblogic.server.channels.BasicServerChannelImpl.(BasicServerChannelImpl.java:54)
at weblogic.rjvm.t3.ProtocolHandlerT3$ChannelInitializer.(ProtocolHandlerT3.java:37)
at weblogic.rjvm.t3.ProtocolHandlerT3.getDefaultServerChannel(ProtocolHandlerT3.java:42)
at weblogic.server.channels.ChannelService.createServerChannels(ChannelService.java:506)
Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: weblogic.demo.com: weblogic.demo.com
at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
at weblogic.server.channels.BasicServerChannelImpl.getLocalHost(BasicServerChannelImpl.java:57)
at weblogic.server.channels.BasicServerChannelImpl.(BasicServerChannelImpl.java:54)
at weblogic.rjvm.t3.ProtocolHandlerT3$ChannelInitializer.(ProtocolHandlerT3.java:37)
at weblogic.rjvm.t3.ProtocolHandlerT3.getDefaultServerChannel(ProtocolHandlerT3.java:42)
Truncated. see log file for complete stacktrace
>
出现该问题是因为没有在/etc/hosts中设置主机名和网卡IP的绑定。
正常情况下,有如下输出信息:
……
可通过以下URL访问:
http://192.168.226.130:7001/console
如果要关闭域,
[wls@weblogic bin]$ pwd
/u01/weblogic/user_projects/domains/base_domain/bin
[wls@weblogic bin]$ ./stopWebLogic.sh
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22621861/viewspace-1253386/,如需转载,请注明出处,否则将追究法律责任。