JBOSS 5.1 on Ubuntu 10.04

Requirements : JDK 6
Ubuntu : 10.04

Download Jboss from link : JbossDownload

Create Directory :

sudo mkdir /usr/local/jboss

Extract contents of the downloaded file into this directory

sudo unzip [downloaded_file_name]

Add user called jboss with this command :

sudo useradd -d /usr/local/jboss -s /bin/sh jboss

Now set ownership of this directory to jboss :

sudo chown -R jboss:jboss /usr/local/jboss

Make a copy of the jboss_init_redhat.sh in the bin directory like so

sudo cp /usr/local/jboss/bin/jboss_init_redhat.sh /usr/local/jboss/bin/jboss_init_ubuntu.sh

Now edit this script to make certain changes

sudo gedit /usr/local/jboss/bin/jboss_init_ubuntu.sh

To set the correct path for Java — > Change line

JAVAPTH=${JAVAPTH:-”/usr/local/jdk/bin”}

to

JAVAPTH=${JAVAPTH:-”/usr/bin”}

And change line

JBOSS_BIND_ADDR=${JBOSS_HOST:+”-b $JBOSS_HOST”}

To

JBOSS_BIND_ADDR=${JBOSS_HOST:+”-b 0.0.0.0″}

Explanation : This binds it on all IP addresses. To bind to a specific address, replace the 0.0.0.0.

Now copy this file to the startup scripts folder

sudo cp /usr/local/jboss/bin/jboss_init_ubuntu.sh /etc/init.d/jboss

To add Jboss to the init system

sudo update-rc.d jboss defaults

Result :

update-rc.d: warning: /etc/init.d/jboss missing LSB information
update-rc.d: see
Adding system startup for /etc/init.d/jboss …
/etc/rc0.d/K20jboss -> ../init.d/jboss
/etc/rc1.d/K20jboss -> ../init.d/jboss
/etc/rc6.d/K20jboss -> ../init.d/jboss
/etc/rc2.d/S20jboss -> ../init.d/jboss
/etc/rc3.d/S20jboss -> ../init.d/jboss
/etc/rc4.d/S20jboss -> ../init.d/jboss
/etc/rc5.d/S20jboss -> ../init.d/jboss

Note : In case you want to remove previous instances of Jboss in the init system run :

sudo update-rc.d -f jboss remove

Now just to be sure about the permissions

sudo chown -R jboss:jboss /usr/local/jboss
sudo chmod -R 755 /usr/local/jboss

Now you can start the server by

sudo /etc/init.d/jboss start

And stop the server by

sudo /etc/init.d/jboss stop

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值