|
| 1 | +# Installing and configuring LARS |
| 2 | + |
| 3 | +There are three ways that you can install LARS: |
| 4 | + |
| 5 | + * Directly from the Liberty Repository using installUtility |
| 6 | + * Using the self-extracting jar installer from the Liberty Repository |
| 7 | + * By building and then unzipping larsServer.zip |
| 8 | + |
| 9 | +Whichever installation method you use, you will also need to configure |
| 10 | +LARS. |
| 11 | + |
| 12 | +## Installing LARS directly from the Liberty Repository using `installUtility` |
| 13 | + |
| 14 | +This is the simplest method of installing LARS. From the `wlp` |
| 15 | +directory of your Liberty 8.5.5.6 runtime, run the following command: |
| 16 | + |
| 17 | + bin/installUtility install larsServer |
| 18 | + |
| 19 | +`installUtility` downloads LARS together with the application server |
| 20 | +features upon which it depends. |
| 21 | + |
| 22 | +## Using the self-extracting jar installer from the Liberty Repository |
| 23 | + |
| 24 | +Visit [this |
| 25 | +page](https://developer.ibm.com/wasdev/downloads/#asset/opensource-Liberty_Asset_Repository_Service) |
| 26 | +and click Download to download `larsServerPackage.jar`. Once the |
| 27 | +download is complete, run `larsServerPackage.jar`. For example, on the |
| 28 | +command line, run the following: |
| 29 | + |
| 30 | + java -jar larsServerPackage.jar |
| 31 | + |
| 32 | +You must specify the installation directory of an existing Liberty |
| 33 | +runtime. If that Libety runtime does not contain any of LARS's |
| 34 | +prerequiste features then you can install them using `installUtility`: |
| 35 | + |
| 36 | + bin/installUtility install cdi-1.0 servlet-3.0 mongodb-2.0 jaxrs-1.1 cdi-1.0 servlet-3.0 mongodb-2.0 jaxrs-1.1 |
| 37 | + |
| 38 | +## By building and then unzipping larsServer.zip |
| 39 | + |
| 40 | +If you have built LARS yourself then you can find larsServer.zip in |
| 41 | +the `build/distributions` directory. Unzip larsServer.zip into the |
| 42 | +`wlp` directory of an existing Liberty runtime. |
| 43 | + |
| 44 | +Note that your Liberty runtime must contain LARS's pre-requising features, which you can install using `installUtility` as above. |
| 45 | + |
| 46 | + |
| 47 | +## Configuring LARS |
| 48 | + |
| 49 | +LARS is a Java EE application running on top of Liberty and can be |
| 50 | +configured like any other Liberty application. When LARS is installed, |
| 51 | +it creates a new Liberty server called `larsServer`. To configure |
| 52 | +LARS, edit the file `wlp/usr/servers/larsServer/server.xml`. For a |
| 53 | +basic LARS server, you will need to configure the following: |
| 54 | + |
| 55 | +### User registry |
| 56 | + |
| 57 | +In order to secure LARS (and it is not recommended to run LARS without |
| 58 | +security), you need a user registry. The default `server.xml` that is |
| 59 | +created when LARS is installed contains a `<basicRegistry>`, commented |
| 60 | +out, that can be uncommented and used as a starting point. For more |
| 61 | +information on configuring a user registry for Liberty, see [Configuring a user registry for the Liberty profile](http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_sec_registries.html?cp=SSAW57_8.5.5%2F3-12-1-2-0). |
| 62 | + |
| 63 | +### HTTP endpoint |
| 64 | + |
| 65 | +The `<httpEndpoint>` element determines upon which ports the LARS |
| 66 | +server will listen. You can changed these ports to suit your |
| 67 | +requirements. In the default configuration, the LARS server only |
| 68 | +listens for connections from localhost (ie connections from the same |
| 69 | +host that LARS is running on). You can also add a `host=` attribute to |
| 70 | +cause LARS to listen for requests from other hosts. For more |
| 71 | +information on configuring Liberty's HTTP endpoint properties, see |
| 72 | +[Liberty profile: Configuration elements in the server.xml |
| 73 | +file](http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/autodita/rwlp_metatype_4ic.html?cp=SSAW57_8.5.5%2F3-0-2-1-0). |
| 74 | + |
| 75 | +### User to role mappings |
| 76 | + |
| 77 | +The default `server.xml` configuration contains a commented-out |
| 78 | +`<application-bnd>` element. You can uncomment this and then customize |
| 79 | +it to your requirements. For more information on configuring |
| 80 | +authorization for applications on Liberty, see [Configuring authorization for applications on the Liberty profile](http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_sec_rolebased.html?cp=SSAW57_8.5.5%2F3-12-1-3-0). |
| 81 | + |
| 82 | +### MongoDB configuration |
| 83 | + |
| 84 | +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). |
0 commit comments