Liberty profile overview
The Liberty profile is a simplified, lightweight development and application runtime environment that has the following characteristics:
- Simple to configure. Configuration is read from an XML file with text-editor-friendly syntax.
- Dynamic and flexible. The run time loads only what your application needs and recomposes the run time in response to configuration changes.
- Fast. The server starts in under 5 seconds with a basic web application.
-Extensible. The Liberty profile provides support for user and product extensions, which
can use System Programming Interfaces (SPIs) to extend the run time.
-Liberty supports a subset of the following parts of the full WebSphere®
Application Server programming model:
- Web applications
- OSGi applications
- Enterprise JavaBeans (EJB) applications
- It is a flexible and dynamic profile of WAS. Which enables WAS server to deploy only required custom features instead of all JEE components.
-WAS Liberty profile Architecture:-
WebSphere Application Server 8.5.5.1 Liberty Profile Installation Reference Guide(4.3)
Installation Notes
There are multiple methods to install and set up WebSphere using Liberty Profile. The following notes are meant as general tips to consider and may or may not apply in every scenario.Where Can I Find the Installer?
Instructions
- Download wlp-developers-runtime-8.5.5.1.jar.
-
Run the following command to extract the contents of the Liberty archive:
java -jar wlp-developers-runtime-
8.5
.
5.1
.jar
- Press x to skip, or Enter to read the license agreement.
- Press 1 if you agree to the license terms and are ready to proceed.
- Provide the installation path for the Liberty profile, for example: /nhin/app.
- Press Enter.
Creating a Server
The Liberty profile runtime environment does not come with a server defined. To create a server, you must run the following command from the Liberty profile bin directory (for example, /nhin/app/wlp/bin):server create <server name> |
Creating Jvm.options
The jvm.options file can be used at runtime to specify jvm-specific start options (for example, with -X arguments like "-Xmx1024M"). The options are applied when you start, run, or debug the server: When you install the Liberty profile, this configuration file does not exist, so you must create it. Create an etc/ directory under wlp/, and within that, create the jvm.options file (for example, /nhin/app/wlp/etc/jvm.options).Configure the httpEndPoint
By default, the WebSphere Liberty Profile server is installed on port 9080. The CONNECT team typically tests on port 8080/8181 (for HTTP/HTTPS respectively), so we change the port in server.xml as below:<httpEndpoint id= "defaultHttpEndpoint" host= "localhost" httpPort= "8080" httpsPort= "8181" /> |
Starting and Stopping the Server
To start the server, run the server start <server name> command under /wlp/bin:/nhin/app/wlp/bin$ ./server start server1 |
/nhin/app/wlp/bin$ ./server stop server1 |
Set Up Environment Variables
In some cases, it may be required to set the environment variables for:- JAVA_HOME
- JAVA_OPTIONS
- ANT_HOME
- ANT_OPTS
- MAVEN_HOME
- MAVEN_OPTS
- PATH
Sample Environment
# Set up environment for CONNECT + WebSphere 8.5 . 5.1 /Liberty Profile on Linux export JAVA_HOME= '/path/to/jdk1.7.0_09' export MAVEN_HOME= '/path/to/apache-maven-3.0.4' export MAVEN_OPTS= '-Xmx5000m -XX:MaxPermSize=1024m' export ANT_HOME= '/path/to/apache-ant-1.7.1' export ANT_OPTS= '-Xmx1200m -XX:MaxPermSize=128m -Dcom.sun.aas.instanceName=server' export MYSQL_HOME= '/path/to/mysql-5.1.42-linux-x86_64-glibc23' export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$ANT_HOME/bin:$MYSQL_HOME/bin:$PATH |
Reference:
https://connectopensource.atlassian.net/wiki/pages/viewpage.action?pageId=12681451
https://developer.ibm.com/wasdev/blog/2013/03/29/introducing_the_liberty_profile/
https://developer.ibm.com/wasdev/downloads/download-latest-stable-websphere-liberty-runtime/