Alfresco Installation

Un article de Bluexml.com.

Sommaire

Installing Alfresco

Alfresco is the Open Source Alternative for Enterprise Content Management (ECM), providing Document Management, Collaboration, Records Management, Knowledge Management, Web Content Management and Imaging.

We work on the community version 2.9B . You can download this version as an EXE file here:

You can now launch your Alfresco.

Links :

Install with SQL Server (2005)

  • In your SQL Server Management Studio create a database Alfresco.
  • After, create a connection user (by eg : alfresco with password alfresco)
  • Go to <ALFRESCO_HOME>/tomcat/shared/classes/alfresco/extension and edit custom-repository.properties and uncomment this line :
db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
db.url=jdbc:sqlserver://localhost;DatabaseName=alfresco

(comment previous database configuration if there is any)

  • Uncomment user and password informations :
db.username=alfresco
db.password=alfresco
  • Go to custom-hibernate-dialect.properties and uncomment the line about SQLserver, eg:
hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect

Depends on line choosen but you will need to put the JDBC jar file corresponding in <ALFRESCO_HOME>/common/lib. The Microsoft's library can be found on Microsoft website. JTDS library (realy useful for SQL server 2000 with java 1.5) can be found here.

  • Start alfresco. If there is Lucene error, try to put index.recovery.mode=FULL in custom-repository.properties and delete data in alf_data (data will be lost, use import / export instead) and tables in sql server.

LDAP integration

A screenshot to see the LDAP test use in this files
A screenshot to see the LDAP test use in this files

Edit this files :

  • ldap-authentication.properties
  • ldap-synchronisation.properties
  • ldap-authentication-content.xml
  • ldap-synchronisation-context.xml
  • chaining-authentication-context.xml

(.xml are .xml.sample files, modified their name will make alfresco use ldap configuration)

Here are exemple files : ldap-authentication.properties

#
# This properties file brings together the common options for LDAP authentication rather than editing the bean definitions
#

# How to map the user id entered by the user to taht passed through to LDAP
# - simple 
#    - this must be a DN and would be something like
#      CN=%s,DC=company,DC=com
# - digest
#    - usually pass through what is entered
#      %s     
ldap.authentication.userNameFormat=uid=%s,ou=users,dc=blueXml,dc=com

# The LDAP context factory to use
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

# The URL to connect to the LDAP server 
ldap.authentication.java.naming.provider.url=ldap://localhost:389

# The authentication mechanism to use
ldap.authentication.java.naming.security.authentication=simple

# The default principal to use (only used for LDAP sync)
ldap.authentication.java.naming.security.principal=

# The password for the default principal (only used for LDAP sync)
ldap.authentication.java.naming.security.credentials=

ldap-synchronisation.properties

# 
# This properties file is used to configure LDAP syncronisation
#

# The query to find the people to import
ldap.synchronisation.personQuery=(objectclass=inetOrgPerson)

# The search base of the query to find people to import
ldap.synchronisation.personSearchBase=ou=users,dc=blueXml,dc=com

# The attribute name on people objects found in LDAP to use as the uid in Alfresco
ldap.synchronisation.userIdAttributeName=uid

# The attribute on person objects in LDAP to map to the first name property in Alfresco
ldap.synchronisation.userFirstNameAttributeName=givenName

# The attribute on person objects in LDAP to map to the last name property in Alfresco
ldap.synchronisation.userLastNameAttributeName=sn

# The attribute on person objects in LDAP to map to the email property in Alfresco
ldap.synchronisation.userEmailAttributeName=mail

# The attribute on person objects in LDAP to map to the organizational id  property in Alfresco
ldap.synchronisation.userOrganizationalIdAttributeName=o

# The default home folder provider to use for people created via LDAP import
ldap.synchronisation.defaultHomeFolderProvider=homeDirectory

# The query to find group objects
ldap.synchronisation.groupQuery=(objectclass=groupOfNames)

# The search base to use to find group objects
ldap.synchronisation.groupSearchBase=ou=groups,dc=blueXml,dc=com

# The attribute on LDAP group objects to map to the gid property in Alfrecso
ldap.synchronisation.groupIdAttributeName=cn

# The group type in LDAP
ldap.synchronisation.groupType=groupOfNames

# The person type in LDAP
ldap.synchronisation.personType=inetOrgPerson

# The attribute in LDAP on group objects that defines the DN for its members
ldap.synchronisation.groupMemberAttributeName=member

# The cron expression defining when people imports should take place
ldap.synchronisation.import.person.cron=0 0 * * * ?

# The cron expression defining when group imports should take place 
ldap.synchronisation.import.group.cron=0 30 * * * ?

# Should all groups be cleared out at import time?
# - this is safe as groups are not used in Alfresco for other things (unlike person objects which you should never clear out during an import)
# - setting this to true means old group definitions will be tidied up.
ldap.synchronisation.import.group.clearAllChildren=true

chaining-authentication-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

    <beans>

        <bean id="authenticationServiceImpl" class="org.alfresco.repo.security.authentication.ChainingAuthenticationServiceImpl">
            <property name="authenticationServices">
                <list>
                    <ref bean="authenticationServiceImplLDAP"/>
                </list>
            </property>
            <property name="mutableAuthenticationService">
                <ref bean="authenticationServiceImplAlfresco"/>
            </property>
        </bean>

        <bean id="authenticationServiceImplAlfresco" class="org.alfresco.repo.security.authentication.AuthenticationServiceImpl">
            <property name="authenticationDao">
                <ref bean="authenticationDaoAlfresco"/>
            </property>
            <property name="ticketComponent">
                <ref bean="ticketComponent"/>
            </property>
            <property name="authenticationComponent">
                <ref bean="authenticationComponentImplAlfresco"/>
            </property>
        </bean>
             
        <bean id="authenticationDaoAlfresco" class="org.alfresco.repo.security.authentication.RepositoryAuthenticationDao">
            <property name="nodeService">
                <ref bean="nodeService"/>
            </property>
            <property name="dictionaryService">
                <ref bean="dictionaryService"/>
            </property>
            <property name="namespaceService">
                <ref bean="namespaceService"/>
            </property>
            <property name="searchService">
                <ref bean="searchService"/>
            </property>
            <property name="userNamesAreCaseSensitive">
                <value>${user.name.caseSensitive}</value>
            </property>
            <property name="passwordEncoder">
                <ref bean="passwordEncoder"/>
            </property>
        </bean>

        <bean id="authenticationComponentImplAlfresco" class="org.alfresco.repo.security.authentication.AuthenticationComponentImpl">
            <property name="authenticationDao">
                <ref bean="authenticationDaoAlfresco"/>
            </property>
            <property name="authenticationManager">
                <ref bean="authenticationManager"/>
            </property>
            <property name="allowGuestLogin">
                <value>true</value>
            </property>
        </bean>

        <bean id="authenticationServiceImplLDAP" class="org.alfresco.repo.security.authentication.AuthenticationServiceImpl">
            <property name="authenticationDao">
                <ref bean="authenticationDaoLDAP" />
            </property>
            <property name="ticketComponent">
                <ref bean="ticketComponent" />
            </property>
            <property name="authenticationComponent">
                <ref bean="authenticationComponentImplLDAP" />
            </property>
        </bean>

        <bean id="authenticationComponentImplLDAP" class="org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl">
            <property name="LDAPInitialDirContextFactory">
                <ref bean="ldapInitialDirContextFactory"/>
            </property>
            <property name="userNameFormat">
                <value>{ldap.authentication.userNameFormat}</value>
            </property>
        </bean>

        <bean id="authenticationDaoLDAP" class="org.alfresco.repo.security.authentication.ntlm.NullMutableAuthenticationDao"/>

    </beans>

Other files (ldap-authentication-content.xml and ldap-synchronisation-context.xml) just need to be rename from .xml.sample to .xml.

NTLM SSO + CIFS + LDAP integration sample configuration

Information about this kind of installation have been described step by step (for Alfresco 2.1) on Alfresco Forum : here

Caution : you need a user who can be logged on network, not a local user.

To see the CIFS files : connect a new network driver using <HOST_NAME>A/Alfresco.

Start on port 80

Alfresco with Tomcat starts on port 8080. Most people run Tomcat behind another Webserver (like Apache) but if we won't to start Alfresco as a stand alone Webserver we need to start it on port 80.

On windows

All you have to do is changing the port number in <ALFRESCO_HOME>/tomcat/conf/server.xml from 8080 to 80 and you are done.


Linux

See tutorial here.

Starts Alfresco as a windows sercice

Go to <ALFRESCO_HOME>/tomcat/bin and launch "service.bat install" Start tomcat5w.exe and check data. Go to windows services management and choose auto for service startup.

If issues (you can see log in <ALFRESCO_HOME>/tomcat/logs in a file named "stdout*") try to add <ALFRESCO_HOME>/bin to system path.

Installing BlueXML Modules for Alfresco

To improve the quality of the Alfresco web client, we have created few components to install directly in the Alfresco installation. You must launch Alfresco firstly (the WAR file contained in the Alfresco installation must be extracted in the Alfreco directory, it's made during the launching of Alfresco). You can download our components here :

This ZIP file contains a set of ZIP files. This contained files must be moved and extracted in this folder <ALFRESCO_DIR>\tomcat\webapps\alfresco. You can re-launch Alfresco to verify the good installation of our components.

Updating BlueXML Modules for Alfresco

Follow the same steps as in the installation of the BlueXML Modules for Alfresco.