Tutorial: how to install Jboss server 7.1 with eclipse

Friday, November 13th, 2015 (0 Comment)

To install jboss 7.1 in eclipse and develop web, you need to install java JDK and JRE (why install java jdk and jre, you can search on google to understand knowledge)

What is jboss server: Jboss server is web application server, the same asp.net need web server is IIS (Internet information Services). If you want to develop web application using framework java as seam framework or spring framework … you should setup jboss 7.1 better than jboss 5.1 (jboss 7.1 run faster and more light than jboss 5.1)

Step 1: Download Server jboss 7.1

You can download jboss on website http://jbossas.jboss.org/downloads and select JBoss AS 7.1.0.Final to download (file zip for Window, file Tar.Gz for linux). After download , you extract into D disk (or anywhere you want). Example D:\java\jboss-as-7.1.1.Final

Step 2: Install JDK

At first, you need to install JDK 7. Click http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html to download the latest version. When the download is complete, you proceed with the installation. After installation is complete, we set variable environment

Enter Control panel -> System. On left, click Advanced System Settings. System Properties dialog opening, select Advanced tab -> Environment Variables. At System variables, you create new variable is:

  • Variable name: JAVA_HOME
  • Variable value: path of java that you install above (example : D:\java\jdk1.7.0)

To check the installation was successful or not, you enter cmd command: java -version, if found information about the JDK, you did the right thing

Step 3: Install eclipse

You download Eclipse IDE for Java EE Developers on https://eclipse.org/downloads/packages/release/Kepler/SR2 . After download, you unzip and open eclipse Kepler to install Jboss Tool (Jboss tool is plugin in eclipse). On eclipse, select menu Help –> Eclipse Marketplace, Find jboss tool and install as image below:

IDE eclipse kepler

IDE eclipse kepler

Select Feature to install, the JBoss tool is very much, so we just choose the ones you want to need (JBoss AS Tool). Uncheck all checked by the original feature at first, then roll down, check the JbossAS Tool and confirm. Then accept, finish it install, if have any warning notice appears then still click ok and then restart eclipse

Step 4: install jboss runtime on eclipse

On eclipse, you choose menu Window -> Preferences -> Server:

  1. Select Runtime Environments
  2. Click add button to new Server Runtime. It will open new Dialog
  3. Select Jboss 7.1 Runtime
  4. Click Next button. It will open new Dialog.
  5. Browse button to select folder that you extract jboss 7.1 above
  6. Click finish button
install jboss in eclipse

install jboss in eclipse

Step 5: Create server instance to stop and start jboss server

Choose menu window -> Show View à Server. Right click on tab Servers -> new Server:

create instance jboss

create instance jboss

In Tab Select the server type:

select jboss server type

select jboss server type

  1. Select Jboss AS 7.1 to define a New Server
  2. Server name: create name that you want and Server runtime environment: you select server name that created above (step 3)
  3. In here, you have nothing in tab Available, because you don’t have project (you don’t care in this step)
  4. Finish and done

After finish install jboss in eclipse, there will have a server jboss in Server tab, and you can select server and click start/stop server. Open browser with url is http://localhost:8080/ (if appear white screen -> successful), with url is http://localhost:9990 to login console admin page (to manage server, at admin page, you need to add account admin from command line)

Advance: admin page

To run add user admin by command line, you remember set variable environment JBOSS_HOME (exam: JBOSS_HOME=D:\java\jboss-as-7.1.1.Final)

Open command line and type:
     D:\java\jboss-as-7.1.1.Final\bin add-user.bat

What type of user do you wish to add ?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)

Exam I select (a) and continue

Enter the details of the new user to add.

Realm (ManagementRealm) : ManagementRealm (the Realm (ManagementRealm) value must be the same: ManagementRealm)

Username: jboss1
Password: password

After add user admin console, you start jboss and login into http://localhost:9990

Config driver and timzezone to run Jboss 7 on production

  1. Connect oracle database:
    • Create folder modules\com\oracle\ojdbc\main
    • Download 3 files module.xml, ojdbc6.jar, ojdbc6.jar.index and copy into folder above
  2. Set TimeZone of Jboss 7 on linux to syn with database
    • open standalone.conf file in jboss 7
    • add line JAVA_OPTS=”$JAVA_OPTS -Duser.timezone=Asia/Bangkok” (Select your timezone)

Tags: , , , ,

Related Posts

spring
How to create quartz spring dynamic in database
spring
Spring mvc mongodb crud users roles
spring
Java spring mvc tutorial on lvtutorial.com
spring
Angularjs spring mvc crud example

Related Posts

spring
How to create quartz spring dynamic in database
spring
Spring mvc mongodb crud users roles
spring
Java spring mvc tutorial on lvtutorial.com
spring
Angularjs spring mvc crud example

Leave a Reply

Your email address will not be published. Required fields are marked *