Our road from Alfresco CE 5.0.c to Alfresco CE 5.1.g

by / Thursday, 28 July 2016 / Published in Blog
Alfresco SDK 3.0 beta 1 available
Alfresco Application Framework

Alfresco 5.1.g

Two months ago Alfresco Community 5.1.g (201605 GA) was released. This is the last release from branch 5.1 and we have installed it several times successfully for our customers. Our internal server for Alfresco is running Ubuntu 12.04, so we were waiting to upgrade to 14.04 or 16.04 before upgrading Alfresco. However, finally we decided to discard that operative system upgrading and go directly with the Alfresco one.

Starting point

  • We have and Alfresco CE 5.0.c running on PostgreSQL 9.3 in an Ubuntu 12.04
  • The server has 8 GB RAM: 4 dedicated to Alfresco (and SOLR) and the other available for PostgreSQL, LibreOffice and operative system
  • The repository size is 60 GB and contains around 150,000 documents
  • Authentication is integrated with our corporative OpenLDAP
  • Several AMP customization modules are deployed
  • There is a customized backup process

Executing the upgrading process

Note. These steps may not be suitable for your environment, so they are only intended to be a guideline for your own processes.

# Backup 5.0.d

$ sudo service alfresco stop

$ sudo mv /opt/alfresco /opt/alfresco-old
$ cd /opt/alfresco/postgresql/bin/
$ ./pg_dump alfresco > /tmp/exportFile.dmp


# Install 201605 GA (5.1.g)

$ wget http://dl.alfresco.com/release/community/201605-build-00010/alfresco-community-installer-201605-linux-x64.bin
$ chmod +x alfresco-community-installer-201605-linux-x64.bin

$ sudo mkdir /opt/alfresco
$ sudo apt-get install libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2 libxinerama1 libglu1-mesa
$ sudo ./alfresco-community-installer-201605-linux-x64.bin
Language Selection

Please select the installation language
[1] English - English
[2] French - Français
[3] Spanish - Español
[4] Italian - Italiano
[5] German - Deutsch
[6] Japanese - 日本語
[7] Dutch - Nederlands
[8] Russian - Русский
[9] Simplified Chinese - 简体中文
[10] Norwegian - Norsk bokmål
[11] Brazilian Portuguese - Português Brasileiro
Please choose an option [1] : 1
----------------------------------------------------------------------------
Welcome to the Alfresco Community Setup Wizard.

----------------------------------------------------------------------------
Installation Type

[1] Easy - Install using the default configuration.
[2] Advanced - Configure server ports and service properties.: Choose optional components to install.
Please choose an option [1] : 2

----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.

Java [Y/n] :Y

PostgreSQL [Y/n] :Y

LibreOffice [Y/n] :Y

Alfresco Community : Y (Cannot be edited)

Solr1 [y/N] : n

Solr4 [Y/n] :Y

Alfresco Office Services [Y/n] :n

Web Quick Start [y/N] : n

Google Docs Integration [Y/n] :n

Is the selection above correct? [Y/n]: Y

----------------------------------------------------------------------------
Installation Folder

Choose a folder to install Alfresco Community.

Select a folder: [/opt/alfresco-community]: /opt/alfresco

----------------------------------------------------------------------------
Database Server Parameters

Enter the port of your database.

Database Server Port: [5432]:

----------------------------------------------------------------------------
Tomcat Port Configuration

Enter your Tomcat configuration parameters.

Web Server Domain: [127.0.0.1]: ecm.alfresco.es

Tomcat Server Port: [8080]: 9080

Tomcat Shutdown Port: [8005]: 9005

Tomcat SSL Port: [8443]: 9443

Tomcat AJP Port: [8009]: 9009

----------------------------------------------------------------------------
LibreOffice Server Port

Enter the port that the LibreOffice Server will listen to.

LibreOffice Server Port: [8100]:

----------------------------------------------------------------------------
Alfresco FTP Port

Choose a port number for the integrated Alfresco FTP server.

Port: [21]:

----------------------------------------------------------------------------
Admin Password

Specify a password for the Alfresco administrator account.

Admin Password: :
Repeat Password: :
----------------------------------------------------------------------------
Install as a service

If you register Alfresco Community as a service it will automatically start
Alfresco Community on machine startup.

Install Alfresco Community as a service? [Y/n]: n


----------------------------------------------------------------------------
Warning

This environment is not configured optimally for Alfresco - review this list
before continuing.

While these issues won’t prevent Alfresco from functioning, some product
features might not be available, or the system might not perform optimally.

CPU clock speed is too slow
 (2.0 GHz+): 1.9 GHz
SMTP TCP port in use
: 25


Press [Enter] to continue:

----------------------------------------------------------------------------
Setup is now ready to begin installing Alfresco Community on your computer.

Do you want to continue? [Y/n]: Y

----------------------------------------------------------------------------
Please wait while Setup installs Alfresco Community on your computer.

 Installing
 0% ______________ 50% ______________ 100%
 #########################################

----------------------------------------------------------------------------
Setup has finished installing Alfresco Community on your computer.

View Readme File [Y/n]: n

Launch Alfresco Community [Y/n]: n

# Restore 5.0.d AMPs and configuration

$ cd /opt/alfresco/amps
$ sudo cp /opt/alfresco-old/amps/*.amp .

$ cd ..
$ cd amps_share
$ sudo cp /opt/alfresco-old/amps_share/*.amp .

$ sudo /opt/alfresco/bin/apply-amps.sh

$ sudo vi /opt/alfresco/tomcat/shared/classes/alfresco-global.properties

###############################
## Common Alfresco Properties #
###############################

dir.root=/opt/alfresco/alf_data

alfresco.context=alfresco
alfresco.host=ecm.alfresco.es
alfresco.port=443
alfresco.protocol=https

share.context=share
share.host=ecm.alfresco.es
share.port=443
share.protocol=https

aos.baseUrlOverwrite=https://ecm.alfresco.es/alfresco/aos

### database connection properties ###
db.driver=org.postgresql.Driver
db.username=alfresco
db.password=XXXXXXXX
db.name=alfresco
db.url=jdbc:postgresql://localhost:5432/${db.name}
# Note: your database must also be able to accept at least this many connections.  Please see your database documentation for instructions on how to configure this.
db.pool.max=275
db.pool.validate.query=SELECT 1

# The server mode. Set value here
# UNKNOWN | TEST | BACKUP | PRODUCTION
system.serverMode=PRODUCTION

### FTP Server Configuration ###
ftp.port=21
ftp.enable=true

### RMI registry port for JMX ###
alfresco.rmi.services.port=50500

### External executable locations ###
ooo.exe=/opt/alfresco/libreoffice/program/soffice.bin
ooo.enabled=true
ooo.port=8100
img.root=/opt/alfresco/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert

jodconverter.enabled=false
jodconverter.officeHome=/opt/alfresco/libreoffice
jodconverter.portNumbers=8100

### Initial admin password ###
alfresco_user_store.adminpassword=XXXXXXXXXXXXXXXXX

### E-mail site invitation setting ###
notification.email.siteinvite=false

### License location ###
dir.license.external=/opt/alfresco

### Solr indexing ###
index.subsystem.name=solr4
dir.keystore=${dir.root}/keystore
solr.host=localhost
solr.port.ssl=9443
solr.secureComms=none
solr.port=9080

### Allow extended ResultSet processing
security.anyDenyDenies=false

### Smart Folders Config Properties ###
smart.folders.enabled=true

### Remote JMX (Default: disabled) ###
alfresco.jmx.connector.enabled=false

synchronization.autoCreatePeopleOnLogin=false
synchronization.import.cron=0 0/15 * * * ?

authentication.chain=alfinst:alfrescoNtlm,ldap-ad1:ldap-ad
ntlm.authentication.sso.enabled=false

## Transformers ##
content.transformer.OpenOffice.mimeTypeLimits.docx.pdf.maxSourceSizeKBytes=10768
content.transformer.OpenOffice.mimeTypeLimits.ppt.pdf.maxSourceSizeKBytes=10768
content.transformer.OpenOffice.mimeTypeLimits.pptx.pdf.maxSourceSizeKBytes=10768
content.transformer.OpenOffice.Pdf2swf.mimeTypeLimits.doc.swf.maxSourceSizeKBytes=10256
content.transformer.OpenOffice.Pdf2swf.mimeTypeLimits.docx.swf.maxSourceSizeKBytes=10256
content.transformer.OpenOffice.Pdf2swf.mimeTypeLimits.ppt.swf.maxSourceSizeKBytes=10256
content.transformer.OpenOffice.Pdf2swf.mimeTypeLimits.pptx.swf.maxSourceSizeKBytes=10256

# Outbound email
mail.host=127.0.0.1
mail.port=25
mail.username=anonymous
mail.password=
mail.from.default=alfresco@keensoft.es
mail.smtp.auth=false

# LDAP
ldap.authentication.active=true
ldap.authentication.allowGuestLogin=false
ldap.authentication.userNameFormat=uid\=%s,ou\=People,dc\=keensoft,dc\=es
ldap.authentication.java.naming.provider.url=ldap://127.0.0.1:389
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.authentication.java.naming.security.authentication=simple
ldap.synchronization.java.naming.security.principal=uid=alfrescobind,ou=NoPeople,dc=keensoft,dc=es
ldap.synchronization.java.naming.security.credentials=XXXXXX
ldap.authentication.escapeCommasInUid=false
ldap.authentication.defaultAdministratorUserNames=
ldap.synchronization.groupQuery=(objectclass\=posixGroup)
ldap.synchronization.groupDifferentialQuery=(objectclass\=posixGroup)
ldap.synchronization.personQuery=(objectclass\=account)
ldap.synchronization.personDifferentialQuery=(objectclass\=account)
ldap.synchronization.groupSearchBase=ou\=Groups,dc\=keensoft,dc\=es
ldap.synchronization.userSearchBase=ou\=People,dc\=keensoft,dc\=es
ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp
ldap.synchronization.timestampFormat=yyyyMMddHHmmss'Z'
ldap.synchronization.userIdAttributeName=uid
ldap.synchronization.userFirstNameAttributeName=uid
ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider
ldap.synchronization.groupIdAttributeName=cn
ldap.synchronization.groupType=posixGroup
ldap.synchronization.personType=account
ldap.synchronization.groupMemberAttributeName=memberUid
ldap.synchronization.enableProgressEstimation=true
ldap.synchronization.userEmailAttributeName=mail
# Required for user groups synchronization
ldap.synchronization.attributeBatchSize=0


# Configure SOLR4 by using HTTP

$ sudo vi /opt/alfresco/solr4/workspace-SpacesStore/conf/solrcore.properties
alfresco.secureComms=none

$ sudo vi solr4/archive-SpacesStore/conf/solrcore.properties
alfresco.secureComms=none

$ sudo service alfresco start


# Installing AOS

$ sudo service alfresco stop
$ unzip alfresco-aos-module-1.1.zip
$ sudo cp _vti_bin.war /opt/alfresco/tomcat/webapps/
$ sudo cp alfresco-aos-module-1.1.amp /opt/alfresco/amps
$ cd /opt/alfresco/bin
$ sudo ./apply_amps.sh -force
$ sudo service alfresco start


# Restoring database dump

$ sudo service alfresco stop
$ sudo /opt/alfresco/postgresql/scripts/ctl.sh start

$ sudo su - postgres
$ cd /opt/alfresco/postgresql/bin
$ ./psql
postgres=# drop database alfresco;
DROP DATABASE

postgres=# CREATE DATABASE alfresco
postgres-# WITH OWNER = alfresco
postgres-# ENCODING = 'UTF8'
postgres-# TABLESPACE = pg_default
postgres-# CONNECTION LIMIT = -1
postgres-# TEMPLATE template0;
CREATE DATABASE

postgres-# \q

$ exit

$ sudo /opt/alfresco/postgresql/bin/psql -U alfresco alfresco < /tmp/exportFile.dmp


# Restoring content store data

$ cd /opt/alfresco/alf_data
$ sudo rm -rf contentstore
$ sudo rm -rf contentstore.deleted
$ cd solr4/
$ sudo rm -rf *
$ cd ..

$ sudo mv /opt/alfresco-old/alf_data/contentstore contentstore
$ sudo mv /opt/alfresco-old/alf_data/contentstore.deleted contentstore.deleted

$ sudo service alfresco start

This process has taken about 1 hour and, as SOLR indexes have not been restored, another hour has passed till the service has been fully available.

Why we are upgrading

Apart from the new features from Alfresco 5.1, we were interested in Microsoft Office 2016 integration, which is complete for Windows and Mac clients in this release. However, AOS requires HTTPs protocol, so you have to follow some to those available guides to make Alfresco running under SSL.

Alfresco is working to make upgrading processes even easier, but as it can be seen following the right order is enough to get a successful upgrading.

Responsable tecnológico para soluciones de gestión documental en keensoft. Especialista en Alfresco y en implantaciones de Administración Electrónica.

Tagged under:

Leave a Reply

TOP