温馨提示×

Centos Weblogic如何启动服务

小樊
61
2025-08-29 01:59:01
栏目: 智能运维

在CentOS上启动WebLogic服务,可参考以下方法:

  • 手动启动:先确保已安装JDK并配置好环境变量,然后切换到WebLogic安装目录,执行source wlserver/server/bin/setWLSEnv.sh设置环境变量,最后运行./startWebLogic.sh启动服务,也可在后台运行nohup ./startWebLogic.sh &。如果创建了专门的WebLogic用户,需先切换到该用户,再进入安装目录执行启动脚本。
  • 使用Systemd服务管理器自动启动:创建/etc/systemd/system/weblogic.service文件,内容示例为:
[Unit]
Description=WebLogic Server
After=network.target

[Service]
Type=simple
User=weblogic
Group=weblogic
WorkingDirectory=/path/to/weblogic/domain
ExecStart=/path/to/weblogic/bin/startWebLogic.sh
ExecStop=/path/to/weblogic/bin/stopWebLogic.sh
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

保存后执行sudo systemctl daemon-reload,再使用sudo systemctl enable weblogic.servicesudo systemctl start weblogic.service启用并启动服务。

0