在 Debian 上启动 WebLogic(通常基于 Oracle WebLogic Server),一般步骤如下:
常见目录结构示例:
/opt/weblogic/
└── user_projects
└── domains
└── base_domain
cd /opt/weblogic/user_projects/domains/base_domain
./startWebLogic.sh
如果是前台启动,终端会一直占用
按Ctrl+C会停止 WebLogic
nohup ./startWebLogic.sh > startWebLogic.log 2>&1 &
查看日志:
tail -f startWebLogic.log
如果创建了 Managed Server(如 Server-1):
cd /opt/weblogic/user_projects/domains/base_domain/bin
./startManagedWebLogic.sh Server-1 http://localhost:7001
创建服务文件:
sudo nano /etc/systemd/system/weblogic.service
内容示例:
[Unit]
Description=WebLogic Server
After=network.target
[Service]
Type=simple
User=weblogic
ExecStart=/opt/weblogic/user_projects/domains/base_domain/startWebLogic.sh
ExecStop=/opt/weblogic/user_projects/domains/base_domain/bin/stopWebLogic.sh
[Install]
WantedBy=multi-user.target
启用并启动:
sudo systemctl daemon-reload
sudo systemctl start weblogic
sudo systemctl enable weblogic
默认 Admin Server 端口是 7001
查看日志:
domains/base_domain/servers/AdminServer/logs/AdminServer.log
echo $JAVA_HOME
如果你能告诉我:
我可以给你更精确的启动命令。