Author: tchemit Date: 2012-05-01 17:40:34 +0200 (Tue, 01 May 2012) New Revision: 3334 Url: http://chorem.org/repositories/revision/pollen/3334 Log: refs #538: Improve install documentation Added: trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenApplicationConfigProvider.java trunk/pollen-persistence/src/main/resources/META-INF/ trunk/pollen-persistence/src/main/resources/META-INF/services/ trunk/pollen-persistence/src/main/resources/META-INF/services/org.nuiton.util.ApplicationConfigProvider trunk/pollen-ui-struts2/src/main/assembly/ trunk/pollen-ui-struts2/src/main/assembly/bin.xml trunk/pollen-ui-struts2/src/main/assembly/dist/ trunk/pollen-ui-struts2/src/main/assembly/dist/README.txt trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.bat trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.properties trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.sh trunk/src/site/fr/rst/install.rst.vm Removed: trunk/src/site/fr/rst/install.rst Modified: trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfiguration.java trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfigurationOption.java trunk/pollen-persistence/src/main/resources/i18n/pollen-persistence_en_GB.properties trunk/pollen-persistence/src/main/resources/i18n/pollen-persistence_fr_FR.properties trunk/pollen-ui-struts2/pom.xml trunk/pollen-ui-struts2/src/main/resources/pollen.properties trunk/pom.xml Added: trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenApplicationConfigProvider.java =================================================================== --- trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenApplicationConfigProvider.java (rev 0) +++ trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenApplicationConfigProvider.java 2012-05-01 15:40:34 UTC (rev 3334) @@ -0,0 +1,37 @@ +package org.chorem.pollen; + +import org.nuiton.util.ApplicationConfig; +import org.nuiton.util.ApplicationConfigProvider; + +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l_; + +/** + * Application config provider (for site generation). + * + * @author tchemit <chemit@codelutin.com> + * @since 1.3.1 + */ +public class PollenApplicationConfigProvider implements ApplicationConfigProvider { + + @Override + public String getName() { + return "pollen"; + } + + @Override + public String getDescription(Locale locale) { + return l_(locale, "pollen.application.config"); + } + + @Override + public ApplicationConfig.OptionDef[] getOptions() { + return PollenConfigurationOption.values(); + } + + @Override + public ApplicationConfig.ActionDef[] getActions() { + return new ApplicationConfig.ActionDef[0]; + } +} Modified: trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfiguration.java =================================================================== --- trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfiguration.java 2012-04-30 15:52:41 UTC (rev 3333) +++ trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfiguration.java 2012-05-01 15:40:34 UTC (rev 3334) @@ -39,7 +39,6 @@ import java.io.File; import java.io.IOException; import java.net.URL; -import java.util.Map; import java.util.Properties; /** @@ -63,23 +62,14 @@ public PollenConfiguration(String file, Properties defaultOptions) { - applicationConfig = new ApplicationConfig(); - applicationConfig.setConfigFileName(file); - if (log.isInfoEnabled()) { log.info(this + " is initializing..."); } - if (defaultOptions != null) { - for (Map.Entry<Object, Object> entry : defaultOptions.entrySet()) { + applicationConfig = new ApplicationConfig(defaultOptions, file); - applicationConfig.setDefaultOption( - String.valueOf(entry.getKey()), - String.valueOf(entry.getValue()) - ); - } - } try { - applicationConfig.loadDefaultOptions(PollenConfigurationOption.class); + applicationConfig.loadDefaultOptions( + PollenConfigurationOption.values()); applicationConfig.parse(); } catch (ArgumentsParserException e) { throw new PollenTechnicalException( @@ -100,7 +90,8 @@ createDirectory(PollenConfigurationOption.IMG_DIR); if (log.isDebugEnabled()) { - log.debug("parsed options in config file" + applicationConfig.getOptions()); + log.debug("parsed options in config file" + + applicationConfig.getOptions()); } } Modified: trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfigurationOption.java =================================================================== --- trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfigurationOption.java 2012-04-30 15:52:41 UTC (rev 3333) +++ trunk/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfigurationOption.java 2012-05-01 15:40:34 UTC (rev 3334) @@ -43,7 +43,7 @@ /** login for default admin. */ APPLICATION_URL("siteUrl", "Application url", "", URL.class), /** login for default admin. */ - DATA_DIR("pollen.dataDirectory", "Default directory where to put datas", "${HOME}/.pollen", File.class), + DATA_DIR("pollen.dataDirectory", "Default directory where to put data", "/var/local/pollen/data", File.class), /** login for default admin. */ ADMIN_LOGIN("adminLogin", "login for default admin", "admin", String.class), /** password for default admin. */ @@ -123,12 +123,12 @@ @Override public boolean isTransient() { - return true; + return false; } @Override public boolean isFinal() { - return true; + return false; } @Override Added: trunk/pollen-persistence/src/main/resources/META-INF/services/org.nuiton.util.ApplicationConfigProvider =================================================================== --- trunk/pollen-persistence/src/main/resources/META-INF/services/org.nuiton.util.ApplicationConfigProvider (rev 0) +++ trunk/pollen-persistence/src/main/resources/META-INF/services/org.nuiton.util.ApplicationConfigProvider 2012-05-01 15:40:34 UTC (rev 3334) @@ -0,0 +1 @@ +org.chorem.pollen.PollenApplicationConfigProvider \ No newline at end of file Modified: trunk/pollen-persistence/src/main/resources/i18n/pollen-persistence_en_GB.properties =================================================================== --- trunk/pollen-persistence/src/main/resources/i18n/pollen-persistence_en_GB.properties 2012-04-30 15:52:41 UTC (rev 3333) +++ trunk/pollen-persistence/src/main/resources/i18n/pollen-persistence_en_GB.properties 2012-05-01 15:40:34 UTC (rev 3334) @@ -1,3 +1,4 @@ +pollen.application.config=Pollen configuration pollen.exception.favorite_list_name_exist= pollen.exception.participant_doubloons= pollen.exception.participant_exist= Modified: trunk/pollen-persistence/src/main/resources/i18n/pollen-persistence_fr_FR.properties =================================================================== --- trunk/pollen-persistence/src/main/resources/i18n/pollen-persistence_fr_FR.properties 2012-04-30 15:52:41 UTC (rev 3333) +++ trunk/pollen-persistence/src/main/resources/i18n/pollen-persistence_fr_FR.properties 2012-05-01 15:40:34 UTC (rev 3334) @@ -1,3 +1,4 @@ +pollen.application.config=Configuration de Pollen pollen.exception.favorite_list_name_exist=La liste %1$s existe déjà pour l'utilisateur %2$s pollen.exception.participant_doubloons=Les doublons de la liste %1$s ont été ignorés \: %2$s pollen.exception.participant_exist=La liste %1$s contient déjà un votant nommé %2$s avec un email %3$s Modified: trunk/pollen-ui-struts2/pom.xml =================================================================== --- trunk/pollen-ui-struts2/pom.xml 2012-04-30 15:52:41 UTC (rev 3333) +++ trunk/pollen-ui-struts2/pom.xml 2012-05-01 15:40:34 UTC (rev 3334) @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -133,31 +135,31 @@ </dependency> <dependency> - <groupId>javax.activation</groupId> - <artifactId>activation</artifactId> - <scope>provided</scope> + <groupId>javax.activation</groupId> + <artifactId>activation</artifactId> + <scope>provided</scope> </dependency> <dependency> - <groupId>org.jfree</groupId> - <artifactId>jcommon</artifactId> + <groupId>org.jfree</groupId> + <artifactId>jcommon</artifactId> </dependency> <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> </dependency> <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> </dependency> <dependency> - <groupId>org.apache.shiro</groupId> - <artifactId>shiro-core</artifactId> + <groupId>org.apache.shiro</groupId> + <artifactId>shiro-core</artifactId> </dependency> - + <!-- Provided dependencies --> <dependency> <groupId>javax.servlet</groupId> @@ -185,7 +187,7 @@ <!-- *** Project Information ************************************* --> <!-- ************************************************************* --> - <name>Pollen :: UI (strust2)</name> + <name>Pollen :: UI (struts2)</name> <description>Interface Graphique Struts2 pour Pollen</description> @@ -200,7 +202,8 @@ <i18n.bundleOutputName>pollen-i18n</i18n.bundleOutputName> <redmine.releaseFiles> - target/${project.build.finalName}.war + target/${project.build.finalName}.war, + target/${project.build.finalName}-bin.zip </redmine.releaseFiles> </properties> @@ -310,5 +313,72 @@ </pluginManagement> </build> + <profiles> + + <profile> + <id>assembly-profile</id> + <activation> + <property> + <name>performRelease</name> + <value>true</value> + </property> + </activation> + <build> + <defaultGoal>verify</defaultGoal> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>src/main/assembly/bin.xml</descriptor> + </descriptors> + <attach>false</attach> + </configuration> + <executions> + <execution> + <id>create-assemblies</id> + <phase>verify</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>reporting</id> + <activation> + <property> + <name>performRelease</name> + <value>true</value> + </property> + </activation> + + <reporting> + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-utils-maven-report-plugin</artifactId> + <version>${nuitonUtilsVersion}</version> + <reportSets> + <reportSet> + <reports> + <report>application-config-report</report> + </reports> + </reportSet> + </reportSets> + <configuration> + <i18nBundleName>${i18n.bundleOutputName}</i18nBundleName> + </configuration> + </plugin> + </plugins> + </reporting> + </profile> + + </profiles> + </project> Added: trunk/pollen-ui-struts2/src/main/assembly/bin.xml =================================================================== --- trunk/pollen-ui-struts2/src/main/assembly/bin.xml (rev 0) +++ trunk/pollen-ui-struts2/src/main/assembly/bin.xml 2012-05-01 15:40:34 UTC (rev 3334) @@ -0,0 +1,56 @@ +<assembly> + <id>bin</id> + <formats> + <format>zip</format> + </formats> + <dependencySets> + <dependencySet> + <outputDirectory>lib</outputDirectory> + <scope>runtime</scope> + </dependencySet> + </dependencySets> + + <fileSets> + + <fileSet> + <directory>target</directory> + <outputDirectory>/</outputDirectory> + <fileMode>0755</fileMode> + <includes> + <include>${project.build.finalName}.war</include> + </includes> + </fileSet> + + <fileSet> + <directory>target/classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>THIRD-PARTY.txt</include> + <include>LICENSE.txt</include> + </includes> + </fileSet> + + <fileSet> + <directory>src/main/assembly/dist</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.properties</include> + </includes> + <excludes> + <exclude>**/*.sh</exclude> + <exclude>**/*.bat</exclude> + </excludes> + </fileSet> + + <fileSet> + <directory>src/main/assembly/dist</directory> + <outputDirectory>/</outputDirectory> + <fileMode>0755</fileMode> + <filtered>true</filtered> + <includes> + <include>**/*.sh</include> + <include>**/*.bat</include> + </includes> + </fileSet> + </fileSets> +</assembly> Added: trunk/pollen-ui-struts2/src/main/assembly/dist/README.txt =================================================================== --- trunk/pollen-ui-struts2/src/main/assembly/dist/README.txt (rev 0) +++ trunk/pollen-ui-struts2/src/main/assembly/dist/README.txt 2012-05-01 15:40:34 UTC (rev 3334) @@ -0,0 +1,38 @@ +=========================== +Pollen - ${project.version} +=========================== + +Premier démarrage +----------------- + +Pour démarrer Pollen : + +- Il faut avoir une JDK d'installer sur la machine cible. + +- la variable JDK_HOME doit être positionnée dans les variables d'environements. + +En suite on lance + +./pollen.start (sous linux) + +ou + +pollen.bat (sous windows) + +Configuration par défaut +------------------------ + +En mode embarqué voici la configuration utilisée par défaut : + +- les données sont stoquées dans une base h2 dans le répertoire data/db +- les resources sont stoquées dans le répertoire data/images +- le fichier de configuration est pollen.properties + + +Configurer Pollen +----------------- + +Il suffit de modifier la configuration dans le fichier pollen.properties + +Pour plus d'infromations consulter le site : +http://maven-site.chorem.org/pollen/install.html Added: trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.bat =================================================================== --- trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.bat (rev 0) +++ trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.bat 2012-05-01 15:40:34 UTC (rev 3334) @@ -0,0 +1,51 @@ + +@REM ---------------------------------------------------------------------------- +@REM Pollen Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM ---------------------------------------------------------------------------- +@echo off + +if not "%JDK_HOME%" == "" goto OkJHome + +echo. +echo ERROR: JDK_HOME not found in your environment. +echo Please set the JDK_HOME variable in your environment to match the +echo location of your Java installation +echo. +goto error + +:OkJHome +echo JDK_HOME defined to %JDK_HOME% + +if exist "%JDK_HOME%\bin\java.exe" goto doit + +echo. +echo ERROR: JDK_HOME is set to an invalid directory. +echo JDK_HOME = "%JDK_HOME%" +echo Please set the JDK_HOME variable in your environment to match the +echo location of your Java installation +echo. +goto error + +:error +set ERROR_CODE=1 +goto end + +:doit +set JAVA_COMMAND="%JDK_HOME%\bin\java.exe" +echo java.exe defined to %JAVA_COMMAND% + +set POLLEN_OPTS="-Xms512m -Xmx1024m -pollen.log.dir=./logs" +echo java options used : %POLLEN_OPTS% + +%JAVA_COMMAND% "%POLLEN_OPTS%" -jar ${project.build.finalName}.war +goto end + +:end + +pause +cmd /C exit /B %ERROR_CODE% + + Added: trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.properties =================================================================== --- trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.properties (rev 0) +++ trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.properties 2012-05-01 15:40:34 UTC (rev 3334) @@ -0,0 +1,13 @@ +# +# Pollen - v ${project.version} Configuration +# +# See README.txt for more informations about howto custmize Pollen. +# + +# all data are in stored in data +pollen.dataDirectory=./data + +# public pollen url +siteUrl=http://localhost:8888 + + Added: trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.sh =================================================================== --- trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.sh (rev 0) +++ trunk/pollen-ui-struts2/src/main/assembly/dist/pollen.sh 2012-05-01 15:40:34 UTC (rev 3334) @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ ! -e $JDK_HOME/bin/java ]; then + echo "Do not find $JDK_HOME/bin/java, please add JDK_HOME environnement variable" + exit 1 +fi + +OLDPWD=`pwd` +cd `dirname $0` +CURRENTPWD=`pwd` +POLLEN_OPTS="$JAVA_OPTS -Xms512m -Xmx10242m -pollen.log.dir=$CURRENTPWD/logs" +java $POLLEN_OPTS -jar ${project.build.finalName}.war $* +cd "$OLDPWD" \ No newline at end of file Modified: trunk/pollen-ui-struts2/src/main/resources/pollen.properties =================================================================== --- trunk/pollen-ui-struts2/src/main/resources/pollen.properties 2012-04-30 15:52:41 UTC (rev 3333) +++ trunk/pollen-ui-struts2/src/main/resources/pollen.properties 2012-05-01 15:40:34 UTC (rev 3334) @@ -24,9 +24,9 @@ #hibernate.show_sql=false #hibernate.hbm2ddl.auto=update hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.connection.driver_class=org.h2.Driver hibernate.connection.username=sa hibernate.connection.password= -hibernate.connection.driver_class=org.h2.Driver hibernate.connection.url=jdbc:h2:file:${pollen.dataDirectory}/db/pollendb # Migration configuration Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2012-04-30 15:52:41 UTC (rev 3333) +++ trunk/pom.xml 2012-05-01 15:40:34 UTC (rev 3334) @@ -456,7 +456,7 @@ <nuitonI18nVersion>2.4.1</nuitonI18nVersion> <tapestryVersion>5.1.0.5</tapestryVersion> <nuitonWebVersion>1.11</nuitonWebVersion> - <nuitonUtilsVersion>2.4.7</nuitonUtilsVersion> + <nuitonUtilsVersion>2.4.8-SNAPSHOT</nuitonUtilsVersion> <h2Version>1.3.166</h2Version> <postgresqlVersion>9.1-901-1.jdbc4</postgresqlVersion> <struts2Version>2.3.1.2</struts2Version> Deleted: trunk/src/site/fr/rst/install.rst =================================================================== --- trunk/src/site/fr/rst/install.rst 2012-04-30 15:52:41 UTC (rev 3333) +++ trunk/src/site/fr/rst/install.rst 2012-05-01 15:40:34 UTC (rev 3334) @@ -1,98 +0,0 @@ -.. - -.. * #%L -.. * Pollen -.. * -.. * $Id$ -.. * $HeadURL$ -.. * %% -.. * Copyright (C) 2009 - 2012 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - -Installation -============ - -.. Author: Nolwenn Rannou <rannou@codelutin.com> -.. Revision: $Revision$ -.. Date: $Date$ - -Conteneur Web -------------- - -Pour installer l'application il suffit de déployer l'archive war dans un -conteneur Web comme Tomcat_. - -Par défaut une base de donnée H2 est créée dans le répertoire */tmp*. Pour -modifier ce comportement par défaut il suffit de créer le fichier -*/etc/pollen.properties* (qui peut aussi être placé dans un répertoire -*".config/"* de l'utilisateur ($HOME/.config/) ou dans le dossier depuis lequel -l'application est lancée) et de le remplir avec les propriétés suivantes :: - - # Configuration de la base de données - hibernate.show_sql=false - hibernate.dialect=org.hibernate.dialect.H2Dialect - hibernate.connection.username=username - hibernate.connection.password=password - hibernate.connection.driver_class=org.h2.Driver - hibernate.connection.url=jdbc:h2:file://tmp/pollen/pollen - - # Répertoire des images transférées - upImgDir=/tmp/pollen/uploadedImages - - # Taille maximal des images transférées (en octets) - upload.filesize-max=1048576 - upload.requestsize-max=10485760 - - # Configuration de l'envoi d'emails automatiques - email_host=smtp.free.fr - email_port=25 - email_from=bot@pollen.org - - # Répertoire des flux de syndication (Atom) - feedDir=/tmp/pollen/feeds - - # Adresse du site (utilisée pour les emails de rappel) - siteUrl=http://www.site.org/pollen/ - -Pour une base PostgreSQL on aura :: - - hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect - hibernate.connection.driver_class=org.postgresql.Driver - hibernate.default_schema=public - -Il peut-être nécessaire de redéployer l'application après avoir modifié ce fichier. - -Un utilisateur avec les droits d'administration est créé automatiquement -(identifiant "admin", mot de passe "pollen"). Par mesure de sécurité il est -important de supprimer cet utilisateur après avoir créer un autre compte -administrateur. - -Conteneur embarqué ------------------- - -Depuis pollen-1.1.1, il est possible de le lancer avec un conteneur embarqué -seulement en disposant du fichier war. - -Pour cela, lancez pollen avec la commande suivante : - -:: - - java -jar pollen-x.x.x.war - -Ensuite, ouvrez un navigateur à l'adresse : http://localhost:8080 - -Vous pouvez aussi utiliser des options de lancement : http://winstone.sourceforge.net/#commandLine - -.. _Tomcat: http://tomcat.apache.org/ Copied: trunk/src/site/fr/rst/install.rst.vm (from rev 3333, trunk/src/site/fr/rst/install.rst) =================================================================== --- trunk/src/site/fr/rst/install.rst.vm (rev 0) +++ trunk/src/site/fr/rst/install.rst.vm 2012-05-01 15:40:34 UTC (rev 3334) @@ -0,0 +1,169 @@ +.. - +.. * #%L +.. * Pollen +.. * +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2009 - 2012 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Affero General Public License as published by +.. * the Free Software Foundation, either version 3 of the License, or +.. * (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Public License for more details. +.. * +.. * You should have received a copy of the GNU Affero General Public License +.. * along with this program. If not, see <http://www.gnu.org/licenses/>. +.. * #L% +.. - +Installation +============ + +.. Author: Nolwenn Rannou <rannou@codelutin.com> +.. Revision: $Revision$ +.. Date: $Date$ + +Avant-propos +------------ + +Types d'installation +~~~~~~~~~~~~~~~~~~~~ + +Il existe deux manières pour lancer Pollen: + +- en mode embarqué : dans ce mode Pollen possède un conteneur web embarqué, + il n'est pas pas nécessaire de posséder un conteneur web. + +- en mode serveur : dans ce mode on déploit pollen dans un conteneur web + (tomcat, jetty,...) avec une configuration adapté pour un serveur. + +Configurer Pollen +~~~~~~~~~~~~~~~~~ + +Pour modifier la configuration de Pollen, on doit créer un fichier nommé +*pollen.properties*. + +Pour plus d'information sur les options disponibles, +rendez-vous sur la `page des options`_. + +Stoquage des données +~~~~~~~~~~~~~~~~~~~~ + +Pollen utilise une base de données. Par défaut Pollen utilise une base type +h2. + +Lors du premier lancement de Pollen, l'utilisateur admin / admin sera crée dans +la base de données. + +Pour modifier la configuration de la base de données, on modifie dans le +fichier de configuration les lignes: + +:: + + hibernate.connection.username=sa + hibernate.connection.password= + +Pour changer de type de base données, il faut modifier modidifer +les propriétés suivantes: + +:: + hibernate.dialect=Dialect de la base + hibernate.connection.driver_class=Driver de la base + hibernate.connection.url=Url de connexion à la base + +Voici un tableau d'utilisation pour les bases usuelles: + ++-------------------------+---------+--------------------------------+-----------------------+------------------------------------------+ ++ Type de base de données | dialect | driver | url de connexion + ++-------------------------+---------+--------------------------------+-----------------------+------------------------------------------+ ++ H2 | org.hibernate.dialect.H2Dialect | org.h2.Driver | jdbc:h2:file:emplacementBaseH/pollendb + ++ PostgreSql | org.hibernate.dialect.PostgreSQLDialect | org.postgresql.Driver | jdbc:postgresql:pollen + ++-------------------------+---------+--------------------------------+-----------------------+------------------------------------------+ + +Envoie des emails +~~~~~~~~~~~~~~~~~ + +Pour que Pollen puisse envoyer des emails vous devez modifier la configuration: + +:: + + email_host= Serveur smtp pour envoyer les emails + email_port= Port du serveur smtp + email_from= Adresse de l'envoyeur de mail + siteUrl= Adresse publique de votre instance de pollen (utilisé pour générer les liens d'accès au sondage dans les emails envoyés) + +Se connecter à Pollen +~~~~~~~~~~~~~~~~~~~~~ + +Un utilisateur avec les droits d'administration est créé automatiquement +(identifiant *admin*, mot de passe *pollen*). Par mesure de sécurité il est +important de supprimer cet utilisateur après avoir créer un autre compte +administrateur. + +Installation en mode embarqué +----------------------------- + +- Télécharger l'archive ${project.build.finalName}-bin.zip sur la + `page des Téléchargements`. +- Décompresser l'archive téléchargée. +- Lancer Pollen via l'un des deux commandes + +:: + + ./pollen.sh (sous linux) + +:: + + pollen.bat (sous windows) + +Ensuite, une fois Pollen démarré, un navigateur doit s'ouvrir à l'adresse +suivante + +:: + + http://localhost:8888 + +Configuration +~~~~~~~~~~~~~ + +En mode embarqué, le fichier de configuration se trouve à la racine du fichier +décompressé. + +Toutes les données sont stoquées dans le répertoire *data*. + +Une base h2 est utilisée et stoquée (dans le répertoire *data/db*). + +Installation en mode serveur +---------------------------- + +- Télécharger le fichier ${project.build.finalName}.war sur la + `page des Téléchargements`. +- Renseigner la configuration (voir section suivante) +- Deployer le fichier war dans votre conteneur Web comme Tomcat_ ou Jetty_. + +Configuration +~~~~~~~~~~~~~ + +Il faut créer un fichier de configuration nommé *pollen.properties* qui +peut se trouver dans l'un des répertoires suivants : + +:: + + /etc/pollen.properties + ~/.config/pollen.properties + +Par défaut les données seront stoquées dans le répertoire suivant + +:: + + /var/local/pollen/data + +.. _page des options: ./pollen-ui-struts2/application-config-report.html +.. _page des Téléchargements: http://www.chorem.org/projects/pollen/files +.. _Tomcat: http://tomcat.apache.org/ +.. _Jetty: http://eclipse.org/jetty/ Property changes on: trunk/src/site/fr/rst/install.rst.vm ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native