IT Staff

Blog về chuyên ngành IT

Stuff 20120220

leave a comment »

Install Jboss on ubuntu – http://www.surajitray.com/coders-corner/jboss-5-1-on-ubuntu-10-04/

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

Written by Xavier

Tháng Hai 19, 2012 lúc 5:33 chiều

Posted in Staff

Gửi phản hồi

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s

%d bloggers like this: