設定Linux時開機時背景執行JBOSS:

路徑:/etc/rc.d

檔案:rc.local

> 新增:nohup /opt/jboss-4.0.5.GA/bin/run.sh &

> 不產生LOG:nohup /opt/jboss-4.0.5.GA/bin/run.sh >/dev/null 2>&1 &

 

指令:vi /etc/rc.d/rc.local

 

背景執行會產生LOG檔案,取消的方式如下:

http://hi.baidu.com/cqzhao/item/d68ae2203bc9d10d76272c82

nohup ./program >/dev/null 2>log &

nohup ./program >/dev/null 2>&1 &   (錯誤訊息也不顯示)

 

查詢了一下,nohup、screen都可以背景執行:

screen用法:

http://rickyju.pixnet.net/blog/post/31058308-linux-%3A-nohup---screen-command

http://unowl0208.wordpress.com/2010/02/04/linux%E6%8A%80%E5%B7%A7%EF%BC%9A%E4%BD%BF%E7%94%A8screen%E7%AE%A1%E7%90%86console%E5%91%BD%E4%BB%A4/

http://www.cnblogs.com/mchina/archive/2013/01/30/2880680.html

http://cypresslin.web.fc2.com/Memo/M-LinuxCMD.html

 

執行排程是否正常:

ps -aux

可以查看到Start該程式執行的時間:Start Time

http://fanqiang.chinaunix.net/a1/b1/20010430/142437_b.html

 

排程啟動失敗,執行Tomacat遇到記憶體錯誤:記憶體不足,可以調整Xms或Xmx:

在tomcat启动时提示:

   Error occurred during initialization of VM
   Could not reserve enough space for object heap

http://xiaos0ng.blog.51cto.com/1036375/712559

 


 

安裝JBOSS :

http://my.opera.com/pddinh/blog/hello

> Start Jboss Service: /opt/jboss-4.0.5.GA/bin/run.sh

 


rc.local : 鳥哥

使用者自訂開機啟動程序 (/etc/rc.d/rc.local)

http://linux.vbird.org/linux_basic/0510osloader.php

arrow
arrow
    全站熱搜

    Nathan 發表在 痞客邦 留言(0) 人氣()