WildFly on Raspberry Pi (Tech Tip #25)

WildFly is a lightweight, extremely flexible, highly manageable, Java EE 7 compliant, open source Application Server. Raspberry Pi (a.k.a. Raspi) is a credit-card sized computer that plugs into a computer monitor or TV, and uses a standard USB keyboard and mouse. It was created with the intention of promoting teaching of basic computer science in schools.

raspi-wildfly

This tech tip will show how you can get WildFly running on Raspberry Pi.

The latest model of Raspi is Model B that consists of:

  • 512 MB RAM
  • Two USB ports
  • One ethernet port

Raspi does not come with a storage device, not even for the operating system. But there is a slot for SD card that can be used for booting and persistent storage.

So, what else do you need to get going ?

  • One 8GB SD card
  • SD card writer so that you can burn the operating system on the card, typically in-built on Macs
  • Power supply to the unit, a 5V micro-USB connector
  • HDMI cable for connecting to a monitor/TV. You may need an adapter depending upon what is being used for display
  • USB mouse and keyboard. A wireless mouse and keyboard with a common USB dongle would be better (uses only one of the two USB ports)
  • Wifi dongle or Ethernet cable
  • Optionally, USB hub depending upon how many USB connections are made to Raspi

The original intention of Raspi was to promote teaching of basic computer science in schools. But people have all sorts of fun things with Raspi, including a super computer.

Lets get started!

  1. Easiest way to get started with Raspi is using New Out Of The Box Software (NOOBS). on SD card. The installation instructions are clearly documented here.
  2. Insert the prepared SD card, plugin the dongles and cables as shown. Make sure that the cable to laptop is connected after all others have been connected.raspi-setup
  3. The display flashes with lovely rainbow colors and then reads the card as shown:1
  4. The list of operating systems that can be installed are shown. Choose Raspbian, the first and recommended option. Change the default language and keyboard to whatever is appropriate, US in my case. Click on “Install”.2This warns that all the data on the card will be overwritten:

    3

    Clicking on “Yes” will start the Raspbian installation.

    4

    56

    The following message is shown when operating system is completed installed:

    7

    Or a more close up view:

    8

  5. Clicking on “OK” shows the following configuration menu:9Use arrow keys to go through the menu until “Finish” is selected as shown:

    10

    This will bring you to the shell. Type “startx” to start the GUI which looks like as
    shown:

    11

  6. First step here is to configure Wi-Fi. Click on “Wifi Config” icon on the desktop to see the window as shown:12
  7. Click on “Scan” to scan the list of network SSIDs that can be connected to. Another window pops up, click “Scan” again to see the list of network ids as:13Double-click on the SSID that you can connect to see a window as:14

    I had to manually change the value of Authentication from “WPA2-Personal (PSK)” to “WPA-Personal (PSK)”. Enter the wireless password and click on “Add”. The following window should be shown:

    15

  8. Open a terminal by clicking on “Terminal” on the desktop and check your network configuration looks good. Raspbian comes bundled with JDK 7 and you can check the version for that as well as shown:16
  9. Download WildFly 8.1 CR2 (latest release as of today) by giving the following command in the shell:
    wget http://download.jboss.org/wildfly/8.1.0.CR2/wildfly-8.1.0.CR2.zip

    Unzip WildFly as:

    unzip wildfly-8.1.0.CR2.zip
  10. By default WildFly is configured to run in the server VM. Trying to run the default WildFly installation gives the following error:
    Error occurred during initialization of VM
    Server VM is only supported on ARMv7+ VFP

    This can be easily worked around by editing “wildfly-8.1.0.CR2/bin/standalone.sh” as:

    nano "wildfly-8.1.0.CR2/bin/standalone.sh"

    And removing line 214 and 215 which looks like:

    213             PREPEND_JAVA_OPTS="$PREPEND_JAVA_OPTS -client"
    214         else
    215             PREPEND_JAVA_OPTS="$PREPEND_JAVA_OPTS -server"
    216         fi
    217     fi

    WildFly can now be easily started by giving the command “”wildfly-8.1.0.CR2/bin/standalone.sh” and shows the output as:

    17

  11. NetSurf is the default browser that can be started by clicking on the start bar on bottom left, selecting Internet, and then “Net Surf Web” as shown:18The browser looks like:

    19

  12.  Finally access the WildFly default home page at http://127.0.0.1:8080:20

That’s it!

What crazy thing are you going to use WildFly and Raspberry Pi for now ? :-)

Be Sociable, Share!
  • Tweet
This entry was posted in techtip, wildfly and tagged , , . Bookmark the permalink.

6 Responses to WildFly on Raspberry Pi (Tech Tip #25)

  1. Pingback: WildFly: a lightweight Java application server on the #RaspberryPi | Raspberry PiPod

  2. Pingback: WildFly Managed Domain on Raspberry Pi (Tech Tip #27) | Miles to go 2.0 …

  3. Pingback: WildFly Cluster on Raspberry Pi (Tech Tip #28) | Miles to go 2.0 …

  4. Pingback: WildFly cluster on multiple #RaspberryPi servers | Raspberry PiPod

  5. Pingback: Ce qu’il ne fallait pas manquer cette semaine (du 24 au 31/05) - High-tech & Divertissement

  6. Pingback: Ce qu’il ne fallait pas manquer cette semaine (du 24 au 31/05) | High-tech & Divertissement

Leave a Reply

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


seven − = 2

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>