Tue, 10 Aug 2021 18:36:46 +0200
#102 add installation instructions
INSTALL | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/INSTALL Tue Aug 10 18:36:46 2021 +0200 1.3 @@ -0,0 +1,56 @@ 1.4 +Installing LightPIT 1.5 +------------------- 1.6 + 1.7 +1. Install a supported database server 1.8 + 1.9 +Currently this is only Postgresql. See the Postgresql manual for installing a 1.10 +database instance. On most systems it is sufficient to install the server via 1.11 +the system package manager. 1.12 + 1.13 +2. Execute the SQL scripts for creating the database 1.14 + 1.15 +In the setup directory you find three SQL scripts to install the database. 1.16 + 1.17 +* Modify psql_create_database.sql and choose appropriate usernames and 1.18 + passwords. Then execute the script as database administrator. 1.19 +* Log into the new database with the lightpit_dbo user and execute 1.20 + psql_create_tables.sql and psql_default_data.sql. 1.21 + 1.22 +3. Configure a data source in your application servlet or servlet container 1.23 + 1.24 +You may use absolutely anything: Tomcat, TomEE, Glassfish, Payara, you name it. 1.25 +Just make sure to configure a data source with the name jdbc/lightpit/app. 1.26 +If you want another name, you can configure the JNDI resource in the 1.27 +WEB-INF/web.xml and META-INF/context.xml files. It is highly recommended to use 1.28 +the lightpit_app user which has less privileges to create the data source and 1.29 +leave the lightpit_dbo user for the database operator. 1.30 + 1.31 +4. Make sure JDBC driver and JSTL libraries are available 1.32 + 1.33 +This step may be optional depending on the container you are using. Most 1.34 +application servers already have JSTL libraries installed. More basic servlet 1.35 +containers like Tomcat don't. In that case you have to put the libraries of the 1.36 +javax.servlet:jstl:1.2 artifact manually into the library dir of your servlet 1.37 +container (jstl-1.2.jar and jstl-impl-1.2.jar). 1.38 + 1.39 +In most cases you also have to put the postgresql JDBC driver into the library 1.40 +directory of your server (e.g. postgres-42.x.x.jar). 1.41 + 1.42 +5. Deploy the WAR file of lightpit 1.43 + 1.44 +This is the most straight forward step. Just deploy the WAR file as you usually 1.45 +do in your application server. 1.46 + 1.47 +6. Configuring a web server and authentication 1.48 + 1.49 +LightPIT can optionally detect the authenticated user. You may freely decide 1.50 +whether to enable authentication in your application server or put a web server 1.51 +in front. The latter is recommended, but keep in might that forwarding the 1.52 +authentication information may only work with AJP for certain servlet 1.53 +containers. Consult the respective manuals of the software you are using. 1.54 + 1.55 +When the remote user is picked up successfully by LightPIT, comments under 1.56 +issues e.g. are personalized. For this to work the authenticated username must 1.57 +match one of the configured usernames in LightPIT. 1.58 + 1.59 +Have fun!