21 steps to upgrade Alfresco community edition

Thanks to Kostas Katsaros who wrote an howto on http://www.fossoffice.com/en/2012/10/31/alfresco-community-upgrade/

I had followed the steps as mentioned on his blog and upgraded Alfresco on Amazon AWS.

 

Here are the 21 steps to upgrade Alfresco 

Change to root user or use 'sudo' before every command

 

1] stop alfresco server. From the Alfresco installation folder, execute the command

sh /opt/alfresco-4.0.d/alfresco.sh stop

2] backup Alfresco installation

cp /opt/alfresco-4.0.d /opt/backup_of_alfresco-4.0.d -R

 

3] Turn off Solr

Edit the alfresco-global.properties

vi /opt/alfresco-4.0.d/tomcat/shared/classes/alfresco-global.properties

Change solr indexing as under:

### Solr indexing ###

index.subsystem.name=solrnoindex

dir.keystore=${dir.root}/keystore

#solr.port.ssl=8443

 

(replace solr with noindex)

 

4] start and stop Alfresco server (the sleep command will give ample time for the server to start properly)

sh /opt/alfresco-4.0.d/alfresco.sh start && sleep 300 && sh /opt/alfresco-4.0.d/alfresco.sh stop

5] start postgresql server

sh /opt/alfresco-4.0.d/alfresco.sh start postgresql

 

6] Install Postgresql client

apt-get install postgresql-client-common postgresql-client

7] Change to Postgres user

su postgres

 

8] backup the database

pg_dump -h localhost alfresco > /opt/alfdbdump

exit

9] stop postgresql database

sh /opt/alfresco-4.0.d/alfresco.sh stop

10] delete the Alfresco service file

rm /etc/init.d/alfresco

11] install the new version in a new directory (/opt/alfresco-4.2.b)

Note: do not start Alfresco when it prompts during installation. Use the same admin password as previous installation

12] start postgresql database

sh /opt/alfresco-4.0.d/alfresco.sh start postgresql

13] change to postgres user

su postgres

14] delete the Alfresco database

dropdb alfresco -h localhost -i

 

15] Create a new Alfresco database

createdb -T template0 alfresco -h localhost

 

16] restore the database

psql alfresco -h localhost < /opt/alfdbdump

17] stop Alfresco

sh /opt/alfresco-4.2.b/alfresco.sh stop

 

18] Copy the backup to new location

cd /opt/alfresco-4.0.d/alf_data

mv contentstore contentstore.deleted /opt/alfresco-4.2.b/alf_data/

 

19] start and stop Alfresco

sh /opt/alfresco-4.2.b/alfresco.sh start && sleep 300 && sh /opt/alfresco-4.2.b/alfresco.sh stop

20] Revert to Solr

/opt/alfresco-4.2.b/tomcat/shared/classes/alfresco-global.properties

Change solr indexing as under:

### Solr indexing ###

index.subsystem.name=solrnoindex

dir.keystore=${dir.root}/keystore

#solr.port.ssl=8443

(change noindex to solr)

21] Start Alfresco

sh /opt/alfresco-4.2.b/alfresco.sh start

 

If you had enabled LDAP Authentication on the previous install then you will have to copy the contents from /opt/alfresco-4.0.d/tomcat/shared/classes/alfresco-global.properties. 

Refer to How to Setup Windows AD authentication on Alfresco Share to Setup Windows AD authentication on Alfresco Share article for more information and if you had enabled site templates and dashboard refer to Step by Step guide to Customize Alfresco Share layout dashlets pages and document library