Fork me on GitHub

I. Installation Guide

1. MySQL Installation

Two installation procedures are proposed for setting up lutece database

  • Creation of a local database, which will be used by the lutece webapp.
  • Creation of shared database(s) which are used by one or more Lutece webapps.

The *.sql files are used by "source" MySQL command are found :

  • for the local database, in the /src/sql/default folder;
  • for the shared database, in the /src/sql/shared folder of the distribution.

To use the "source" command as mentioned below, put the *.sql files in the MySQL bin folder. Otherwise, indicate the absolute path of the files in the command.

In the case of shared database, refer yourself to the chapter : Install Lutece with a shared database.

2. Install Lutece with a local database

Create Lutece database :

[Win32] :

Launch MySQL from the bin folder where <mysql_home> (où <mysql_home> is the mysql installation folder.

Run the following command :

mysql.exe
mysql> create database lutece;
                        

[Unix] :

# mysql -u root -p new_password

mysql> create database lutece;
                        

Create a user who will use the database from Lutece webapp ( the sql scripts are packed in Lutece distribution).

[Win32] & [Unix] :

mysql> source create_user_lutece.sql
                        

Connect to the database :

[Win32] & [Unix]

mysql> use lutece;
                        

Create the objects in the database : ( the sql scripts are packed in Lutece distribution )

[Win32] & [Unix]

mysql> source create_db_lutece.sql ;
                        

Initialize data :

[Win32] & [Unix]

mysql> source init_db_lutece.sql ;
                        

To verify whether the database is correctly configured for user lutece ( by default) , run the commands :

[Win32] & [Unix]:

mysql> show tables;
mysql> select * from theme;
                        

3. Install Lutece with a shared database or a local database

Create the shared database :

[Win32] :

Launch MySQL from the folder bin where <mysql_home> (où <mysql_home> is the MySQL installation folder

Run the following command :

mysql.exe
mysql> create database shared;
                        

[Unix] :

# mysql -u root -p new_password

mysql> create database shared;
                        

Create the user used by the webapp to connect to the shared database.

[Win32] & [Unix] :

mysql> source create_user_shared.sql
                        

Connect to the database :

[Win32] & [Unix]

mysql> use shared;
                        

Create the database structure : ( the sql scripts are packed in Lutece distribution )

[Win32] & [Unix]

mysql> source create_db_shared.sql ;
                        

Import data :

[Win32] & [Unix]

mysql> source init_db_shared.sql ;
                        

To verify whether the database is correctly configured for user lutece ( by default ) , run the commands :

[Win32] & [Unix]:

mysql>use shared;

mysql> show tables;
mysql> select * from theme;
                        

Create a local lutece :

[Win32] :

Launch MySQL from the bin folder where <mysql_home> (où <mysql_home> is the mysql installation directory.

Run the following command :

mysql.exe
                                
mysql> create database lutece;
                        

[Unix] :

# mysql -u root -p new_password

mysql> create database lutece;
                        

Create the user used by the webapp to connect to the shared database. (the sql scripts are packed in Lutece distribution)

[Win32] & [Unix]:

mysql> source create_user_lutece.sql
                        

To create two local databases on the same server, they must have different names. The local database creation and the user creation steps must thus be repeated for each database created ( do not forget to update the db.properties (login, password ) and also the update of the config.properties for portal identifiers ( The portal identifiers are created in the table portal found in the shared database )

Connect to the database :

[Win32] & [Unix]

mysql> use lutece;
                        

Create database structure :

[Win32] & [Unix]

mysql> source create_db_lutece.sql ;
                        

Import data :

[Win32] & [Unix]

mysql> source init_db_lutece.sql ;
                        

To verify whether the database is correctly configured for user lutece (by default) , run the commands :

[Win32] & [Unix] :

mysql> use lutece;
mysql> show tables;
mysql> select * from theme;
                        

4. Installation of the application server

The installation described below concerns the Tomcat Server.

4.1 J2SDK Installation

Tomcat installation needs the installation of Java 2 SDK Standard Edition(version used must be at least jdk 1.4.2_06) on the server.

Installation of Java 2 SDK, Standard Edition

Download the JDK version from Sum website : http://java.sun.com/j2se/downloads.html

Configure the environment variable JAVA_HOME value to the path of the folder containing the JDK.

Update the environment variable PATH by adding JAVA_HOME\bin to its definition.

4.2 Tomcat Installation

Download tomcat from the following address: http://jakarta.apache.org/tomcat/index.html Then configure the TOMCAT_HOME environment variable value to the path to the Tomcat folder.

Reload the file containing the environment variables for the update to take effect.

4.3 Verification of the installation

  • Run Tomcat : (<tomcat_home> is the installation folder of Tomcat).

    [Win32] : <tomcat_home>/bin/startup.bat

    [Unix] : <tomcat_home>/bin/startup.sh

  • Run a browser and type the following url : http://localhost:8080 The Welcome page of Tomcat should appear.
  • To stop Tomcat :

    [Win32] : <tomcat_home>/bin/shutdown.bat

    [Unix] : <tomcat_home>/bin/shutdown.sh

4.4 Configuration of the server

  • To disallow viewing of files listed from the webapp url, modify the <tomcat_home>/conf/web.xml file :

    <init-param>
    <param-name>listings</param-name>
    <param-value>false</param-value>
    
    </init-param>
                                            
  • Modify the size of the memory allocated to the java virtual machine.

    Add the line below in the file <tomcat_home>/bin/catalina.sh :

    CATALINA_OPTS="-Xms128m -Xmx512m"
                                            

    to define initial memory to (128 Mo) and maximum (512 Mo) allocated to the JVM.

4.5 Application installation

  • Download the Lutece zip files. Build Lutece project if you use the sources and not the .war file.
  • Copy the Lutece war file in the Tomcat webapps folder.
  • Launch Tomcat to deploy the application
  • Edit the configuration files config.properties and db.properties to update the paths.

    The content of these files are described below.

II. Configuration of Lutece

Application configuration files of the application are found in the WEB-INF/conf folder of the webapp. The files that need to br configured are the following:

  • config.properties
  • db.properties

1. Configuration of config.properties file

Needs update during deployment process:

During the first launch of the application, autoInit is set to true to allow you update the absolute paths of the file. Then it is set to false.

# AutoInit for first deployment

autoInit=false

Parameters that the plugin article uses (portal.param is used to create and recognize the provider code and the plugin.param.sourtce.id is the parameter obtained from the xml configuration file of the plugin )

# Portal and Plugins parameters

portal.param=LUTECE

plugin.param.source.id=id_source

Adjust the IP of the SMTP server

# Mail sending parameters

mail.server=

Adjust the absolute paths to access to properties files in lutece, jtidy and webmaster

# Properties files

file.lutece.properties=C:/tomcat/webapps/lutece/WEB-INF/conf/lutece.properties

file.jtidy.properties=C:/tomcat/webapps/lutece/WEB-INF/conf/jtidy.properties

file.webmaster.properties=C:/tomcat/webapps/lutece/WEB-INF/conf/webmaster.properties

file.dir.plugins=C:/tomcat/webapps/lutece/WEB-INF/conf/plugins

Adjusts the path of the log files. Renseigner ici les chemins des fichiers logs

# Logs files

file.lutece.error.log=C:/tomcat/webapps/lutece/WEB-INF/logs/errors.log

file.lutece.app.log=C:/tomcat/webapps/lutece/WEB-INF/logs/application.log

file.pool.log=C:/tomcat/webapps/lutece/WEB-INF/logs/pool.log

If error.page.debug=true, the detail of the error is visible on the page. If error.page.debug=false, the message defined in error.page.message (which are in the resources file "util_messages.properties") is visible in the page.

Configure the indexing parameters for the Lucene search engine. The url of the JSP Portal.jsp must be defined in lucene.page.jsp. If you wish that the indexing of other websites by this one, please indicate a list of sites in lucene.list.sites.toindex (list seperated by "," )

# Lucene search engine : indexing parameters

lucene.page.jsp=http://localhost:8080/lutece/jsp/site/Portal.jsp

lucene.nb.docs.per.page=5

lucene.list.sites.toindex= http://localhost:8080/lutece/servlet/XmlServlet

lucene.site.toindex=http://localhost:8080/lutece/servlet/XmlServlet

Indicate the files access paths of the application.log ,error.log and pool.log

# log4j parameters

log4j.rootLogger=WARNING, Error

log4j.appender.Error.File=C:/tomcat/webapps/lutece/WEB-INF/logs/error.log

...

log4j.logger.Application=DEBUG, App

...

log4j.logger.Pool=DEBUG, Pool

Update of db.properties file

Connection service choice :

  • LuteceConnectionService to use Lutece connection pool
  • TomcatConnectionService to use Tomcat connection pool

portal.poolservice=fr.paris.lutece.util.pool.service.LuteceConnectionService

OR

portal.poolservice=fr.paris.lutece.util.pool.service.TomcatConnectionService

Indicate the name of the driver required for to access a MySQL database

portal.driver=org.gjt.mm.mysql.Driver

Indicate portal.url to identify the jdbc datasource of the Lutece database; portal.user and portal.password indicates the login and password required to connect to the database.

portal.url=jdbc:mysql://127.0.0.1/lutece?autoReconnect=true

portal.user=lutece

portal.password=lutece

Different levels are possible ( in ascending order of verbosity): error, info, debug

# Levels of the messages to write in the logs

portal.loglevel=error

Request enabling to test the validity of the connection. This value varies from a database to another: for example SELECT 1 for a MySQL database, SELECT SYSDATE FROM dual for an Oracle database

portal.checkvalidconnectionsql=SELECT 1

Notice : if you are modifying one or more properties files , you must stop and restart the tomcat server for the update to take effect.

The webmaster.properties file is also to be adjusted. An interface enables to do that simply in the administration module.

Launching the application

To launch the webapp point your browser to the following URL(the tomcat server must be running): http://localhost:8080/lutece

Connection to the administration module of Lutece

Type the following url to enter the administration module: http://localhost:8080/lutece/admin/AdminLogin.jsp

Two accounts are created by default:

  • Login : admin - Password : admin (Technical administrator account)
  • Login : lutece Password : lutece (Content administrator account)