如何在虚拟机上将 Jboss 作为守护进程运行?
到目前为止,我根据这些 说明 所做的工作已解压缩并将 jboss 移动到我的 < code>/usr/local/ 目录。然后我将 jboss_init_redhat.sh
脚本作为 jboss 放入 /etc/init.d/
中,并编辑该脚本以满足我的配置。然后我运行 /etc/init.d/jboss start
,它只说,
JBOSS_CMD_START = cd /usr/local/jboss-4.2.3.GA//bin; /usr/local/jboss-4.2.3.GA//bin/run.sh -c default -b 0.0.0.0
然后什么也没有发生。另外,如果我进入 /usr/local/jboss-4.2.3.GA/bin
并运行 run.sh
它会启动服务器,但是当我转到 >vm's IP:8080
在我的浏览器中我仍然什么也没得到。任何帮助将不胜感激,我对此也不太了解,所以请原谅我的经验不足。
What I've done so far according to these instructions is unziped and moved jboss into my /usr/local/
directory. Then I put the jboss_init_redhat.sh
script in /etc/init.d/
as jboss and edited the script to meet my configurations. I then run /etc/init.d/jboss start
and all it says is
JBOSS_CMD_START = cd /usr/local/jboss-4.2.3.GA//bin; /usr/local/jboss-4.2.3.GA//bin/run.sh -c default -b 0.0.0.0
and then nothing happens. Also if I go into /usr/local/jboss-4.2.3.GA/bin
and run run.sh
it starts the server but when I go to the vm's IP:8080
in my browser I still get nothing. Any help would be appreciated also I don't know much about doing this so excuse my inexperience.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
初始化脚本应由 root 拥有和启动。
您使用的 init 脚本使用 su (最好是 runuser)来更改为 jboss 用户。
jboss 用户本身没有权限这样做。
jboss 用户也没有权限写入 /var/run 等。
因此运行 sudo /etc/init.d/jboss start (您需要先设置 sudo 才能允许这样做)或更改到root帐户并执行
/etc/init.d/jboss start
。如果仍然失败,请检查
/usr/local/jboss-4.2.3.GA/server/default/log
处的日志。希望这有帮助。
Init scripts should be owned and started by root.
The init script you use uses su (better would be to runuser) to change to the jboss user.
The jboss user itself does not have permission to do that.
The jboss user also does not have permission to write to /var/run etc.
So run
sudo /etc/init.d/jboss start
(you need to set up sudo first to allow this) or change to the root account and execute/etc/init.d/jboss start
.If it still fails check the logs at
/usr/local/jboss-4.2.3.GA/server/default/log
.Hope this helps.