There are two ways that you can install LARS:
- Using the self-extracting jar installer from the Liberty Repository
- By building and then unzipping larsServer.zip
Whichever installation method you use, you will also need to configure LARS.
Visit this
page
and click Download to download larsServerPackage.jar
. Once the
download is complete, run larsServerPackage.jar
. For example, on the
command line, run the following:
java -jar larsServerPackage.jar
You will be prompted for the installation directory of an existing Liberty
runtime. If that Liberty runtime does not contain any of LARS's
prerequiste features then you can install them using installUtility
:
bin/installUtility install cdi-1.0 servlet-3.0 mongodb-2.0 jaxrs-1.1
If you have built LARS yourself then you can find larsServer.zip in
the build/distributions
directory. Unzip larsServer.zip into the
wlp
directory of an existing Liberty runtime.
Note that your Liberty runtime must contain LARS's pre-requising features, which you can install using installUtility
as above.
LARS is a Java EE application running on top of Liberty and can be
configured like any other Liberty application. When LARS is installed,
it creates a new Liberty server called larsServer
. To configure
LARS, edit the file wlp/usr/servers/larsServer/server.xml
. For a
basic LARS server, you will need to configure the following:
In order to secure LARS (and it is not recommended to run LARS without
security), you need a user registry. The default server.xml
that is
created when LARS is installed contains a <basicRegistry>
, commented
out, that can be uncommented and used as a starting point. For more
information on configuring a user registry for Liberty, see Configuring a user registry for the Liberty profile.
The <httpEndpoint>
element determines upon which ports the LARS
server will listen. You can changed these ports to suit your
requirements. In the default configuration, the LARS server only
listens for connections from localhost (ie connections from the same
host that LARS is running on). You can also add a host=
attribute to
cause LARS to listen for requests from other hosts. For more
information on configuring Liberty's HTTP endpoint properties, see
Liberty profile: Configuration elements in the server.xml
file.
The default server.xml
configuration contains a commented-out
<application-bnd>
element. You can uncomment this and then customize
it to your requirements. For more information on configuring
authorization for applications on Liberty, see Configuring authorization for applications on the Liberty profile.
If your MongoDB instance uses authentication or if other parameters, such as the MongoDB port, are non-default then you may need to customize the <mongo>
and <mongoDB>
elements in server.xml. For more information on configuring Liberty's MongoDB feature, see [Creating Liberty applications that use MongoDB] (http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_mongodb_create.html?cp=SSAW57_8.5.5%2F3-8-1-2-17-0-1).