在网上找了一些,都不完善,搞了几个小时才搞完,我写一个比较完完善的,方便大家。
第一步:添加boot.properties文件,实现启动时不用输入用户名密码
此文件放在domain/security和domain/servers/AdminServer/security里面,各放一份,以实现启动admin时也有效
内容为:
username=xxx
password=xxx
第二步:写shell启动脚本,放到/etc/init.d/里面,注意修改里面weblogic地址路径,取名为:weblogic
#!/bin/sh
. /etc/init.d/functions
case "$1" in
start)
cd /web/lydomain
./startWebLogic.sh >weblogic.log 2>&1 &
echo $"usage: $0 start success"
;;
stop)
cd /web/lydomain/bin
./stopWebLogic.sh >weblogic.log 2>&1 &
echo $"usage: $0 stop success"
;;
restart)
cd /web/lydomain
./startWebLogic.sh >weblogic.log 2>&1 &
echo $"usage: $0 start success"
cd /web/lydomain/bin
./stopWebLogic.sh >weblogic.log 2>&1 &
echo $"usage: $0 stop success"
;;
*)
echo $"usage: $0 {start|stop|restart}"
exit 0
esac
exit 1
好了,现在可以输入命令启动weblogic了
启动命令:/etc/init.d/weblogic start
本文详细介绍了一种简便的方法来实现WebLogic服务器的一键启动和停止。通过创建boot.properties文件并放置于特定目录下,可以避免每次启动时手动输入用户名和密码。此外,还提供了一个shell脚本,用于简化启动和停止WebLogic服务器的过程。
1228

被折叠的 条评论
为什么被折叠?



