Wed, 18 Aug 2021 16:02:40 +0200
changes how form elements are stretched to 100% width
universe@221 | 1 | Installing LightPIT |
universe@221 | 2 | ------------------- |
universe@221 | 3 | |
universe@221 | 4 | 1. Install a supported database server |
universe@221 | 5 | |
universe@221 | 6 | Currently this is only Postgresql. See the Postgresql manual for installing a |
universe@221 | 7 | database instance. On most systems it is sufficient to install the server via |
universe@221 | 8 | the system package manager. |
universe@221 | 9 | |
universe@221 | 10 | 2. Execute the SQL scripts for creating the database |
universe@221 | 11 | |
universe@221 | 12 | In the setup directory you find three SQL scripts to install the database. |
universe@221 | 13 | |
universe@221 | 14 | * Modify psql_create_database.sql and choose appropriate usernames and |
universe@221 | 15 | passwords. Then execute the script as database administrator. |
universe@221 | 16 | * Log into the new database with the lightpit_dbo user and execute |
universe@221 | 17 | psql_create_tables.sql and psql_default_data.sql. |
universe@221 | 18 | |
universe@221 | 19 | 3. Configure a data source in your application servlet or servlet container |
universe@221 | 20 | |
universe@221 | 21 | You may use absolutely anything: Tomcat, TomEE, Glassfish, Payara, you name it. |
universe@221 | 22 | Just make sure to configure a data source with the name jdbc/lightpit/app. |
universe@221 | 23 | If you want another name, you can configure the JNDI resource in the |
universe@221 | 24 | WEB-INF/web.xml and META-INF/context.xml files. It is highly recommended to use |
universe@221 | 25 | the lightpit_app user which has less privileges to create the data source and |
universe@221 | 26 | leave the lightpit_dbo user for the database operator. |
universe@221 | 27 | |
universe@221 | 28 | 4. Make sure JDBC driver and JSTL libraries are available |
universe@221 | 29 | |
universe@221 | 30 | This step may be optional depending on the container you are using. Most |
universe@221 | 31 | application servers already have JSTL libraries installed. More basic servlet |
universe@221 | 32 | containers like Tomcat don't. In that case you have to put the libraries of the |
universe@221 | 33 | javax.servlet:jstl:1.2 artifact manually into the library dir of your servlet |
universe@221 | 34 | container (jstl-1.2.jar and jstl-impl-1.2.jar). |
universe@221 | 35 | |
universe@221 | 36 | In most cases you also have to put the postgresql JDBC driver into the library |
universe@221 | 37 | directory of your server (e.g. postgres-42.x.x.jar). |
universe@221 | 38 | |
universe@221 | 39 | 5. Deploy the WAR file of lightpit |
universe@221 | 40 | |
universe@221 | 41 | This is the most straight forward step. Just deploy the WAR file as you usually |
universe@221 | 42 | do in your application server. |
universe@221 | 43 | |
universe@221 | 44 | 6. Configuring a web server and authentication |
universe@221 | 45 | |
universe@221 | 46 | LightPIT can optionally detect the authenticated user. You may freely decide |
universe@221 | 47 | whether to enable authentication in your application server or put a web server |
universe@221 | 48 | in front. The latter is recommended, but keep in might that forwarding the |
universe@221 | 49 | authentication information may only work with AJP for certain servlet |
universe@221 | 50 | containers. Consult the respective manuals of the software you are using. |
universe@221 | 51 | |
universe@221 | 52 | When the remote user is picked up successfully by LightPIT, comments under |
universe@221 | 53 | issues e.g. are personalized. For this to work the authenticated username must |
universe@221 | 54 | match one of the configured usernames in LightPIT. |
universe@221 | 55 | |
universe@221 | 56 | Have fun! |