Pages enfant
  • Installer uP4 rapidement

Vous regardez une version antérieure (v. /wiki/display/ESUPMU/Installer+uP4+rapidement) de cette page.

afficher les différences afficher l'historique de la page

« Afficher la version précédente Vous regardez la version actuelle de cette page. (v. 13) afficher la version suivante »

Récupération GIT

Pour linux

installer le client GIT selon la plateforme puis

git clone https://github.com/Jasig/uPortal.git
cd uPortal/
git checkout uportal-4.0.2

Pour windows

Installer "msysgit" http://code.google.com/p/msysgit/ et "tortoisegit" pour avoir une interface graphique http://code.google.com/p/tortoisegit/

Bouton droit dans un dossier > "Git Clone"

Url :Https://github.com/Jasig/uPortal.git

Dans le dossier uPortal fraichement créé > bouton droit > "tortoiseGIT" > "Switch/Checkout"

Cocher Tags > chosir le TAG "uportal-4.0.2"

déchocher  "Create New Branch"

Configurations

/build.properties

copier le build.sample.properties vers build.properties
Adapter uniquement le server.home avec le chemin du tomcat

server.home=E:/esup4/apache-tomcat-6.0.35

/filters/local.properties

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:3306/uPortal4
environment.build.hibernate.connection.username=uportal4
environment.build.hibernate.connection.password=uportal4
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=/

/pom.xml (drivers mysql)

diff --git a/pom.xml b/pom.xml
index 1fa6d03..ebda8cc 100755
--- a/pom.xml
+++ b/pom.xml
@@ -84,10 +84,10 @@
         <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.artifactId>mysql-connector-java</jdbc.artifactId>
+        <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
@@ -342,6 +342,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</groupId>
                 <artifactId>javassist</artifactId>
                 <version>${javassist.version}</version>

/uportal-war/src/main/resources/properties/portal.properties (passage en français par défaut et pb au chargement de la base)

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

uportal-war/src/main/resources/properties/security.properties (logout cas avec redirect + ajout d'une variable qui représente le contexte du serveur CAS)

diff --git a/uportal-war/src/main/resources/properties/security.properties b/uportal-war/src/main/resources/properties/security.properties
index 2de19c9..cb67036 100644
--- a/uportal-war/src/main/resources/properties/security.properties
+++ b/uportal-war/src/main/resources/properties/security.properties
@@ -48,17 +48,17 @@ credentialToken.root.cas=ticket
 ## (See comments in the LogoutServlet class)
 ## It would be better to escape the value of the url parameter, but since there are no parameters on the
 ## unescaped URL and since there are no further parameters on the logout URL, this does work.
-logoutRedirect.root=${environment.build.cas.protocol}://${environment.build.cas.server}/cas/logout?url=${environment.build.uportal.protocol}://${environment.build.uportal.server}${environment.build.uportal.context}/Login
+logoutRedirect.root=${environment.build.cas.protocol}://${environment.build.cas.server}${environment.build.cas.context}/logout?service=${environment.build.uportal.protocol}://${environment.build.uportal.server}${environment.build.uportal.context}/Login
 
 ## This is the factory that supplies the concrete authorization class
 authorizationProvider=org.jasig.portal.security.provider.AuthorizationServiceFactoryImpl
 
 ## Login URL, if specified the CLogin channel will display a Login link with
 ## this URL instead of the standard userName/password form.
-org.jasig.portal.channels.CLogin.CasLoginUrl=${environment.build.cas.protocol}://${environment.build.cas.server}/cas/login?service=${environment.build.uportal.protocol}://${environment.build.uportal.server}${environment.build.uportal.context}/Login
+org.jasig.portal.channels.CLogin.CasLoginUrl=${environment.build.cas.protocol}://${environment.build.cas.server}${environment.build.cas.context}/login?service=${environment.build.uportal.protocol}://${environment.build.uportal.server}${environment.build.uportal.context}/Login
 
 ## URL of the CAS cleartext password service
-#org.jasig.cas3.extensions.clearpass.integration.uportal.PasswordCachingCasAssertionSecurityContextFactory.clearPassCasUrl=${environment.build.cas.protocol}://${environment.build.cas.server}/cas/clearPass
+#org.jasig.cas3.extensions.clearpass.integration.uportal.PasswordCachingCasAssertionSecurityContextFactory.clearPassCasUrl=${environment.build.cas.protocol}://${environment.build.cas.server}${environment.build.cas.context}/clearPass

uportal-war/src/main/webapp/WEB-INF/web.xml (ajout d'une variable qui représente le contexte du serveur CAS)

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 :

ant  -Dmaven.test.skip=true initportal

Pour déployer les modifications par la suite

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é)

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

start.cmd : script de démarrage de tomcat

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 start

*stop.cmd ?:* script d'arrêt de tomcat

call E:/esup4/env.cmd

DEL /Q "%LOG_DIR%\*.*"
call %CATALINA_HOME%\bin\shutdown
  • Aucune étiquette