Sat, 06 Jan 2024 20:32:56 +0100
Added tag v1.2.2 for changeset 238de141d189
1 Installing LightPIT
2 -------------------
4 1. Install a supported database server
6 Currently this is only Postgresql. See the Postgresql manual for installing a
7 database instance. On most systems it is sufficient to install the server via
8 the system package manager.
10 2. Execute the SQL scripts for creating the database
12 In the setup directory you find three SQL scripts to install the database.
14 * Modify psql_create_database.sql and choose appropriate usernames and
15 passwords. Then execute the script as database administrator.
16 * Log into the new database with the lightpit_dbo user and execute
17 psql_create_tables.sql and psql_default_data.sql.
19 3. Configure a data source in your application servlet or servlet container
21 You may use absolutely anything: Tomcat, TomEE, Glassfish, Payara, you name it.
22 If it supports Servlet 6.0, JSP 3.1, and EL 5.0, you are good to go.
23 Just make sure to configure a data source with the name jdbc/lightpit/app.
24 If you want another name, you can configure the JNDI resource in the
25 WEB-INF/web.xml and META-INF/context.xml files. It is highly recommended to use
26 the lightpit_app user which has less privileges to create the data source and
27 leave the lightpit_dbo user for the database operator.
29 4. Build and Deploy the WAR file of lightpit
31 Build the WAR file with gradle. If your application server already provides
32 the necessary runtime libraries for JSTL and PostgreSQL, leave the variable
33 libsAreProvided = true during the build. Otherwise, set this variable to false
34 and the libraries will be included in the WAR file. But keep in mind that some
35 servlet containers, like Tomcat, are not so happy about this when hot redeploy-
36 ments are performed. If you experience ClassDefNotFound errors after a hot
37 redeployment, you should either provide the libs in your container or always
38 restart the entire container after a redeployment.
40 5. Configuring a web server and authentication
42 LightPIT can optionally detect the authenticated user. You may freely decide
43 whether to enable authentication in your application server or put a web server
44 in front. The latter is recommended, but keep in might that forwarding the
45 authentication information may only work with AJP for certain servlet
46 containers. Consult the respective manuals of the software you are using.
48 When the remote user is picked up successfully by LightPIT, comments under
49 issues e.g. are personalized. For this to work the authenticated username must
50 match one of the configured usernames in LightPIT.
52 Have fun!