Вы находитесь на странице: 1из 4

Liferay, Alfresco, LDAP and SSO – Full Integration

Instructions for Do-It-Yourselfers

Draft: July 12, 2007


Author: Jonas Yuan

Abstract: A solution of SSO plus LDAP against Liferay Portal and Alfresco Portlet is
ready. This document provides detailed instructions for Do-It-Yourselfers - no codes, no
xml configure, just downloading, installing and playing. Here we suppose using Liferay
Portal v 4.3.0 and alfresco v 2.0.2. Find related files at http://liferay.cignex.com/cignex.

1 Liferay Configuration

1.1 Download
Liferay Enterprise Portal 4.3.0 (Bundled with Tomcat 6.0) at /cignex/1

1.2 Install
Unzip it to any directory of your local machines, such as /temp/Tomcat60

1.3 Configure Database


1.3.1 Download
Download /cignex/1/ROOT.xml, copy it to /temp/Tomcat60/conf/Catalina/localhost

1.3.2 Create Database


create database lportal;
grant all on lportal.* to 'lportal'@'localhost' identified by 'lportal' with grant option;
grant all on lportal.* to 'lportal'@'localhost.localdomain' identified by 'lportal' with grant option;

Download MySQL JDBC Driver. /cignex/1/mysql.jar.


Copy it to /temp/Tomcat60/lib/ext
Download /cignex/1/portal-mysql-43.sql
1.3.3 Input Data
mysql -u lportal -plportal lportal < portal-mysql-43.sql

2 Alfresco Portlet Deployment

2.1 Configure
Set JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=128m -Dfile.encoding=UTF8 -Duser.timezone=GMT
-Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config

Create database
create database alfresco202;
grant all on alfresco202.* to 'alfresco202'@'localhost' identified by 'alfresco202' with
grant option;
grant all on alfresco202.* to 'alfresco202'@'localhost.localdomain' identified by
'alfresco202' with grant option;

Use alfresco war file if you have. Remove portlet jar – named portlet-api-lib.jar. Remove
JDBC jar as in need.

2.2 Download
Simply, just download alfresco.war (Alfresco 2.0.2 plus LDAP) at /cignex/2

For your own alfresco war file, download portlet.xml, liferay-portlet.xml, and liferay-
display.xml from /Cignex/2. Copy these files to alfresco/WEB-INF

Start server if it does not start yet. Deploy war to ../liferay/deploy

2.3 Troubleshoot
When errors come,
1. shutdown server;
2. delete alf_data in /bin;
3. reset database;
4. Then restart server.

In MySQL, reset database


drop database alfresco202;
create database alfresco202;

3 LDAP and SSO in Liferay

Shutdown server if it is running.

3.1 LDAP Server


Use ldpa://docs.cignex.com:10389
Download /cignex/3/portlet-ext.properties
Copy it to Tomcat60/webapps/ROOT/WEB-INF/classes

3.2 SSO CAS Server


Use https://docs.cignex.com/cas-web

Download /cignex/3/cas-client.jar;
Copy it to Tomcat60/webapps/ROOT/WEB-INF/lib

3.3 Troubleshoot
If it is first time to login in Liferay by SSO, it is in need to sign in for agreement.
For example, using jonas/jonas in CAS SSO, sign in as jonas@liferay.com/jonas for
agreement. Then sign out and re-login by SSO. Add content “Alfresco EXT client”.

4 SSO CAS Plus LDAP against Liferay Portal and


Alfresco Portlet

4.1 Alfresco Portlet


Simply, download alfresco.war at /cignex/4. Deploy war to ../liferay/deploy.

Or download cignex-sso.jar at /cignex/4, put it to /alfresco/WEB-INF/lib; download


portlet.xml, put it to /alfresco/WEB-INF; download web.xml, put it to /alfresco/WEB-
INF

4.2 Liferay Portal


Download /cignex/4/cignex-liferay-sso.jar, put it to /temp/Tomcat60/lib/ext; Download
/cignex/4/portal-impl.jar, put it to Tomcat60/webapps/ROOT/WEB-INF/lib.

4.3 One step for all

Download http://liferay.cignex.com/cignex/Cignex-Liferay-tomcat-6.0-4.3.0.zip and


install it.

4.3.1 Create database for alfresco


create database alfresco202;
grant all on alfresco202.* to 'alfresco202'@'localhost' identified by 'alfresco202' with
grant option;
grant all on alfresco202.* to 'alfresco202'@'localhost.localdomain' identified by
'alfresco202' with grant option;

4.3.2 Create Database for liferay


create database lportal;
grant all on lportal.* to 'lportal'@'localhost' identified by 'lportal' with grant option;
grant all on lportal.* to 'lportal'@'localhost.localdomain' identified by 'lportal' with grant option;

4.3.3 Input Data


Download /cignex/1/portal-mysql-43.sql
Import data to database
mysql -u lportal -plportal lportal < portal-mysql-43.sql

Оценить