Raspberry Pi and Websphere Liberty profile
Today I propose to install an application server on your Raspberry Pi : WebSphere Liberty Profile. Free version of the IBM Websphere solution, You can create and deploy your Java web applications !
- Update the system
apt-get update && apt-get -y upgrade
- Install OpenJDK 7
apt - get install openjdk-7-jdk
- Download Websphere Liberty profile. Live, je n’ai pas trouvé car il y a un accord à donner 🙁 Pour le JAR c’est sur this page It's happening. The current version is the 188.8.131.52.
- You must then start the installation :
java - jar wlp-developers-runtime - 184.108.40.206.jar
- You then follow the steps in responding to the various questions
I chose the standard installation where the JAR file (/root) but ca is configurable.
- Go to the directory of the executable WLP/bin. This is where you can create a server. After the create parameter, Scroll to the name you want.
./Server create pihomeserver
- By default the server runs on port 9080 and does not accept any connection apart from localhost. To change, It is in the file usr/servers /.<Server name>/Server.XML.
For remote access, You must add a host clause in the block httpEndpoint. I put a clause to accept all connections.
<webApplication contextRoot ="pihome" location ="PiHomeServerWeb.war" />
The war file must be deployed in the sub directory apps Server.
NoticeAttention : If you change this file, you need to stop and restart the server.
- You can then start the server.
./Server start pihomeserver
- If you go to the directory where you have the installation, you will find the directory dedicated to your server. It is necessary to return to the directory usr/servers /.<Server name> :
- To deploy your application, you copy the file war in the directory apps. It must have the same name as configured in the application in the server.xml file.
- Go to your Pi Raspberry with your favorite browser : http://<ip>:<port in server.xml>/<contextRoot in server.xml>
Here is the result of a basic JSP that displays the time. Wow ! 😉
You can get started in the development of JSP, use frameworks such Struts or JSF, etc.