在 Debian 系统中启动 WebLogic(通常指 Oracle WebLogic Server),一般步骤如下。以 WebLogic 12c / 14c 为例(其他版本类似)。
java -version
/opt/weblogic)/opt/weblogic/user_projects/domains/base_domain)cd /opt/weblogic/user_projects/domains/base_domain
./startWebLogic.sh
✅ 默认会启动 AdminServer
访问控制台:
http://localhost:7001/console
如果是远程服务器,把
localhost换成服务器 IP
nohup ./startWebLogic.sh > admin.log 2>&1 &
查看日志:
tail -f admin.log
如果创建了 Managed Server(如 Server-1):
cd /opt/weblogic/user_projects/domains/base_domain/bin
./startManagedWebLogic.sh Server-1 http://localhost:7001
后台运行:
nohup ./startManagedWebLogic.sh Server-1 http://localhost:7001 > server1.log 2>&1 &
cd /opt/weblogic/oracle_common/common/bin
./wlst.sh
connect('weblogic','password','t3://localhost:7001')
start('AdminServer')
可写成 systemd 服务(示例):
/etc/systemd/system/weblogic.service
[Unit]
Description=WebLogic AdminServer
After=network.target
[Service]
Type=simple
User=weblogic
WorkingDirectory=/opt/weblogic/user_projects/domains/base_domain
ExecStart=/opt/weblogic/user_projects/domains/base_domain/bin/startWebLogic.sh
Restart=on-failure
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl start weblogic
systemctl enable weblogic
config/config.xmlsetDomainEnv.sh 中 Xms/Xmx如果你能告诉我:
我可以给你更精确的启动命令。