weblogic server 后台命令启动
创建用户名密码文件
服务器下的security目录下创建文件boot.properties,输入weblogic控制台的用户名和密码
password=weblogic
username=weblogic123
创建启动脚本
weblogic用户的home目录下创建启动脚本start-xx.sh
#!/bin/sh if [ `whoami` != 'weblogic' ]; then echo 'Login User error!' exit 9 fi export srvName=epbd-master export adminUrl=http://192.168.70.21:8001/ export startDate=`date +%m%d%H%M` export domainDir=/opt/weblogic/Oracle/Middleware/user_projects/domains/base_domain export logDir=/opt/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/epbd-master/logs export procCount=`ps -ef|grep "weblogic.Name=${srvName}"|grep -v "grep"|wc -l` if [ $procCount != '0' ]; then echo 'Warning! This server has been started!' exit 9 fi cd $domainDir/bin test -d $logDir || mkdir -p $logDir #export USER_MEM_ARGS="-Xms2560m -Xmx2560m -XX:MaxPermSize=512m" nohup ./startManagedWebLogic.sh $srvName $adminUrl > $logDir/$srvName.$startDate.log 2>&1 & cd $logDir rm -f $srvName.out ln -s $srvName.$startDate.log $srvName.out tail -f $srvName.out
执行脚本
./start-xx.sh