...
Bloc de code |
---|
git clone https://github.com/Jasig/uPortal.git cd uPortal/ git checkout uportal-4.0.23 |
Pour windows
Installer "msysgit" http://code.google.com/p/msysgit/ et "tortoisegit" pour avoir une interface graphique http://code.google.com/p/tortoisegit/
...
Cocher Tags > chosir le TAG "uportal-4.0.23"
déchocher "Create New Branch"
Configurations
Properties
/build.properties
copier le build.sample.properties vers build.properties
Adapter uniquement le server.home avec le chemin du tomcat
...
Bloc de code |
---|
environment.build.hsql.port=8887 ## Database Connection Settings (Uncomment the Maven Filters section in rdbm.properties) environment.build.hibernate.connection.driver_class=com.mysql.jdbc.Driver environment.build.hibernate.connection.url=jdbc:mysql://mysq.univ.fr:3306/uPortal4 environment.build.hibernate.connection.username=uportal4 environment.build.hibernate.connection.password=uportal4PASSWORD_UP4 environment.build.hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect # uPortal server configuration properties environment.build.uportal.server=up4.univ.fr environment.build.uportal.protocol=https environment.build.uportal.context=/uPortal environment.build.uportal.email.fromAddress=portal4@univ.fr # CAS server configuration properties environment.build.cas.server=cas.univ.fr environment.build.cas.protocol=https environment.build.cas.context=/ |
Mysql
/pom.xml (drivers mysql) (cf. https://wiki.jasig.org/display/UPM40/MySQL )
Bloc de code | ||
---|---|---|
| ||
diff --git a/pom.xml b/pom.xml index 1fa6d03..ebda8ccc86e320 100755 --- a/pom.xml +++ b/pom.xml @@ -84,109 +84,109 @@ <project-site-path>/uportal/${project.version}</project-site-path> <!-- The JDBC Driver used by uPortal --> - <jdbc.groupId>org.hsqldb</jdbc.groupId> - <jdbc.artifactId>hsqldb</jdbc.artifactId> - <jdbc.version>${hsqldb.version}</jdbc.version> - + <jdbc.groupId>mysql</jdbc.groupId> + <jdbc<jdbc.artifactId>mysql-connector-java</jdbc.artifactId> + <jdbc<jdbc.version>5.1.6</jdbc.version> + <!-- | Environment name and filters file for environment-specific build | settings. By default <environment.name> is blank, and the filters @@ -342337,6 +342337,11 @@ <version>${hsqldb.version}</version> </dependency> <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>5.1.6</version> + </ </dependency> + <dependency> <groupId>org.javassist<hsqldb</groupId> <artifactId>javassist<<artifactId>sqltool</artifactId> <version>${javassisthsqldb.version}</version> |
Langues et Nombre de Threads Mysql
/uportal-war/src/main/resources/properties/portal.properties (passage en français par défaut et pb au chargement de la base)
( Pour Mysql; cf. https://wiki.jasig.org/display/UPM40/MySQL )
Bloc de code | ||
---|---|---|
| ||
diff --git a/uportal-war/src/main/resources/properties/portal.properties b/uportal-war/src/main/resources/properties/portal.properties index 8392f38..b610113 100644 --- a/uportal-war/src/main/resources/properties/portal.properties +++ b/uportal-war/src/main/resources/properties/portal.properties @@ -206,7 +206,7 @@ org.jasig.portal.UserPreferencesManager.save_UserPreferences_at_logout=false # underscore character. # org.jasig.portal.i18n.LocaleManager.locale_aware=true -org.jasig.portal.i18n.LocaleManager.portal_locales=en_US,fr_FR,es_ES,ja_JP,sv_SE,de_DE,mk_MK,lv_LV +org.jasig.portal.i18n.LocaleManager.portal_locales=fr_FR,en_US,es_ES,ja_JP,sv_SE,de_DE,mk_MK,lv_LV # The number of recent PortalExceptions ProblemsTable should cache @@ -274,7 +274,7 @@ org.jasig.portal.version=${project.version} # Import/Export Thread Pool Configuration # org.jasig.portal.io.threadPool.initialThreads=0 -org.jasig.portal.io.threadPool.maxThreads=20 +org.jasig.portal.io.threadPool.maxThreads=1 org.jasig.portal.io.threadPool.queueSize=500 org.jasig.portal.io.threadPool.threadPriority=5 org.jasig.portal.io.threadPool.keepAliveSeconds=30 |
CAS
uportal-war/src/main/resources/properties/security.properties (logout cas avec redirect + ajout d'une variable qui représente le contexte du serveur CAS)
...
Bloc de code | ||
---|---|---|
| ||
diff --git a/uportal-war/src/main/webapp/WEB-INF/web.xml b/uportal-war/src/main/webapp/WEB-INF/web.xml index 96ec7c0..5c46989 100644 --- a/uportal-war/src/main/webapp/WEB-INF/web.xml +++ b/uportal-war/src/main/webapp/WEB-INF/web.xml @@ -118,7 +118,7 @@ <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class> <init-param> <param-name>casServerUrlPrefix</param-name> - <param-value>${environment.build.cas.protocol}://${environment.build.cas.server}/cas</param-value> + <param-value>${environment.build.cas.protocol}://${environment.build.cas.server}${environment.build.cas.context}</param-value> </init-param> <init-param> <param-name>serverName</param-name> |
Déploiement
Installer Ant 1.8.X, Maven 3.0.X, Tomcat 6.0.X
Coté tomcat installer un tomcat de base, le laisser en autoDeploy="true"
Premier déploiement :
Bloc de code |
---|
ant -Dmaven.test.skip=true initportal
|
Pour déployer les modifications par la suite
Bloc de code |
---|
ant -Dmaven.test.skip=true clean deploy-war
|
env.cmd : script d'exemple qui positionne les variables d'environnement qui vont bien (pour windows désolé)
LDAP
on utilise des variable d'environnement pour le ldap (esup.ldap.url, esup.ldap.baseDN, ...)
uportal-war/src/main/resources/properties/contexts/ldapContext.xml
Bloc de code | ||
---|---|---|
| ||
diff --git a/uportal-war/src/main/resources/properties/contexts/ldapContext.xml b/uportal-war/src/main/resources/properties/contexts/ldapContext.xml
index 5e7d32a..ceedd74 100644
--- a/uportal-war/src/main/resources/properties/contexts/ldapContext.xml
+++ b/uportal-war/src/main/resources/properties/contexts/ldapContext.xml
@@ -68,4 +68,11 @@
<property name="pooled" value="false"/>
</bean>
-->
+ <bean id="defaultLdapContext">
+ <property name="url" value="${esup.ldap.url}"/>
+ <property name="base" value="${esup.ldap.baseDN}"/>
+ <property name="userName" value="${esup.ldap.bindDN}"/>
+ <property name="password" value="${esup.ldap.bindPasswd}"/>
+ <property name="pooled" value="${esup.ldap.pooled}"/>
+ </bean>
</beans>
|
uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml
Bloc de code | ||
---|---|---|
| ||
diff --git a/uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml b/uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml
index 6e69675..1832d85 100644
--- a/uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml
+++ b/uportal-war/src/main/resources/properties/contexts/personDirectoryContext.xml
@@ -137,10 +137,51 @@
-->
<ref bean="uPortalAccountUserSource" />
<ref bean="uPortalJdbcUserSource" />
+ <ref bean="uPortalLdapAttributeSource"/>
</list>
</property>
</bean>
+ <bean id="uPortalLdapAttributeSource">
+ <property name="contextSource" ref="defaultLdapContext" />
+ <property name="baseDN" value="${esup.ldap.baseDN}" />
+ <property name="queryAttributeMapping">
+ <map>
+ <entry key="username" value="uid"/>
+ </map>
+ </property>
+
+ <property name="resultAttributeMapping">
+ <map>
+ <entry key="eduPersonPrimaryAffiliation"> <value>eduPersonPrimaryAffiliation</value></entry>
+ <entry key="eduPersonAffiliation"> <value>eduPersonAffiliation</value></entry>
+ <entry key="cn"> <value>cn</value></entry>
+ <entry key="description"> <value>description</value></entry>
+ <entry key="displayName"> <value>displayName</value></entry>
+ <entry key="facsimileTelephoneNumber"> <value>facsimileTelephoneNumber</value></entry>
+ <entry key="givenName"> <value>givenName</value></entry>
+ <entry key="mail"> <value>mail</value></entry>
+ <entry key="postalAddress"> <value>postalAddress</value></entry>
+ <entry key="sn"> <value>sn</value></entry>
+ <entry key="telephoneNumber"> <value>telephoneNumber</value></entry>
+ <entry key="uid">
+ <set>
+ <value>uid</value>
+ <value>username</value>
+ <value>user.login.id</value>
+ </set>
+ </entry>
+ <entry key="supannCodeINE"> <value>supannCodeINE</value></entry>
+ <entry key="supannEtuId"> <value>supannEtuId</value></entry>
+ <entry key="supannEmpId"> <value>supannEmpId</value></entry>
+ <entry key="eduPersonAffiliation"> <value>eduPersonAffiliation</value></entry>
+ <entry key="supannaffectation"> <value>supannaffectation</value></entry>
+ <entry key="objectclass"> <value>objectclass</value></entry>
+ <entry key="supannorganisme"> <value>supannorganisme</value></entry>
+ </map>
+ </property>
+ </bean>
+
<bean id="uPortalAccountUserSource">
<property name="localAccountDao" ref="localAccountDao"/>
<property name="usernameAttributeProvider" ref="usernameAttributeProvider" />
|
Déploiement
Installer Ant 1.8.X, Maven 3.0.X, Tomcat 6.0.X
Coté tomcat installer un tomcat de base, le laisser en autoDeploy="true"
Premier déploiement :
Bloc de code |
---|
ant -Dmaven.test.skip=true initportal
|
Pour déployer les modifications par la suite
Bloc de code |
---|
ant -Dmaven.test.skip=true clean deploy-war
|
env.cmd : script d'exemple qui positionne les variables d'environnement qui vont bien (pour windows désolé)
Bloc de code |
---|
SET JAVA_HOME=D:/jdk1.6.0_30
SET ANT_HOME=E:/esup4/apache-ant-1.8.2
SET M2_HOME=E:/esup4/apache-maven-3.0.4
SET TOMCAT_HOME=E:/esup4/apache-tomcat-6.0.35
SET TRUST_CERT=E:/esup4/esup-portail.keystore
SET M2=%M2_HOME%/bin
SET CATALINA_HOME=%TOMCAT_HOME%
SET CATALINA_BASE=%CATALINA_HOME%
SET CATALINA_TMPDIR=%CATALINA_HOME%/temp
SET CATALINA_OPTS=-Djavax.net.ssl.trustStore="%TRUST_CERT%"
SET CATALINA_PID=%ATALINA_TMPDIR%/uportal.pid
SET PATH=%M2%;%ANT_HOME%/bin;%JAVA_HOME%/bin;%PATH%;
SET JAVA_OPTS=-server
SET JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=512m -XX:PermSize=300m
SET JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1520m
SET JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote
SET JAVA_OPTS=%JAVA_OPTS% -Desup.ldap.url="ldap://ldap1.univ.fr:389 ldap://ldap2.univ.fr:389"
SET JAVA_OPTS=%JAVA_OPTS% -Desup.ldap.baseDN="ou=people,dc=univ,dc=fr" |
Bloc de code |
SET JAVA_HOME=D:/jdk1.6.0_30 SET ANT_HOME=E:/esup4/apache-ant-1.8.2 SET M2_HOME=E:/esup4/apache-maven-3.0.4 SET TOMCAT_HOME=E:/esup4/apache-tomcat-6.0.35 SET TRUST_CERT=E:/esup4/esup-portail.keystore SET M2=%M2_HOME%/bin SET CATALINA_HOME=%TOMCAT_HOME% SET CATALINA_BASE=%CATALINA_HOME% SET CATALINA_TMPDIR=%CATALINA_HOME%/temp SET CATALINA_OPTS=-Djavax.net.ssl.trustStore="%TRUST_CERT%" SET CATALINA_PID=%ATALINA_TMPDIR%/uportal.pid SET PATH=%M2%;%ANT_HOME%/bin;%JAVA_HOME%/bin;%PATH%; SET JAVA_OPTS=-server SET JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=512m -XX:PermSize=300mDesup.ldap.pooled=false SET JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1520mDesup.ldap.bindDN="" SET JAVA_OPTS=%JAVA_OPTS% -DcomDesup.sun.management.jmxremoteldap.bindPasswd="" |
start.cmd : script de démarrage de tomcat
Bloc de code |
---|
call E:/esup4/env.cmd DEL /Q "%TOMCAT_HOME%\logs\*.*" DEL /Q "%TOMCAT_HOME%\work\*.*" %TOMCAT_HOME%\bin\catalina jpda start @rem %CATALINA_HOME%\bin\catalina start -security @rem %CATALINA_HOME%\bin\catalina jpda start |
*_+stop.cmd ?:+_* script d'arrêt de tomcat
...