Alfresco Notes

1 minute read

Yet another CMS, yet another Java-based PITA installation … sigh

Downloads

Procedure

This procedure was performed on Mac OS X 10.9 with MacPorts

MySQL 5

$ sudo port install mysql5 mysql5-server
...
$ sudo -u _mysql mysql_install_db5
...
$ /opt/local/lib/mysql5/bin/mysql_secure_installation
...
$ mysql5 -uroot -p
...
mysql> CREATE USER 'alfresco'@'localhost' IDENTIFIED BY 'alfresco';
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE DATABASE alfresco;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL ON alfresco.* TO 'alfresco'@'localhost';
Query OK, 0 rows affected (0.00 sec)

Tomcat 7

  • unpack release and set CATALINA_HOME to that directory
  • edit ${CATALINA_HOME}/conf/tomcat-users.xml
<tomcat-users>
  <role rolename="manager-gui"/>
  <user username="admin" password="admin" roles="manager-gui"/>
</tomcat-users>
  • use ${CATALINA_HOME}/bin/catalina.sh {start|stop}
  • access via http://localhost:8080
  • copy mysql-connector-java-5.1.34-bin.jar to ${CATALINA_HOME}/lib/
  • edit ${CATALINE_HOME}/conf/catalina.properties and modify setting of the shared loader:
shared.loader=shared/classes

Alfresco 5

$ mkdir ${ALFRESCO_HOME}
  • prepare configuration of Alfresco using properties files in shared/classes
$ mkdir -p ${CATALINA_HOME}/shared/classes
$ cp ${ALFRESCO_SRC}//web-server/shared/classes/alfresco-global.properties.sample ${CATALINA_HOME}/shared/classes/alfresco-global.properties
  • edit ${CATALINA_HOME}/shared/classes/alfresco-global.properties:
dir.root=${ALFRESCO_HOME}  # not the variable, but its content ;-)
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?useUnicode=yes&characterEncoding=UTF-8 
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
db.pool.max=40
# only use ldap authentication
authentication.chain=ldap1:ldap
  • setup ldap authentication extension configuration
    • create extension directory
$ mkdir -p ${CATALINA_HOME}/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1
  • create the configuration ldap-authentication.properties in that directory
ldap.authentication.active=true

ntlm.authentication.sso.enabled=false

ldap.authentication.allowGuestLogin=true
ldap.authentication.userNameFormat=uid=%s,ou=People,dc=christophe,dc=vg
ldap.authentication.java.naming.provider.url=ldap://localhost:389
ldap.authentication.defaultAdministratorUserNames=
ldap.synchronization.java.naming.security.principal=cn=admin,dc=christophe,dc=vg
ldap.synchronization.java.naming.security.credentials=secret
ldap.synchronization.groupSearchBase=ou=Groups,dc=christophe,dc=vg
ldap.synchronization.userSearchBase=ou=People,dc=christophe,dc=vg
  • deploy
cp ${ALFRESCO_SRC}/web-server/webapps/{alfresco,share}.war ${CATALINA_HOME}/webapps/

Categories: