4. Start Alfresco server sudo service alfresco start
Wait for Alfresco to start up I use: sudo tail /opt/"old alfresco folder"/tomcat/logs/catalina.out -f
5. Stop Alfresco server sudo service alfresco stop
6. Check if mySQL is running mysqladmin -u root -p status
7. Backup the Alfresco database to the tmp folder I have to do this from the console as mySQL is restriced. sudo mysqldump -u root -p alfresco > /tmp/alfdbdump.sql Then move the dump file to /opt sudo mv /tmp/alfdbdump.sql /opt
8. Delete the Alfresco service file sudo rm /etc/init.d/alfresco
9. Drop the Alfresco database I have to do this from the console as mySQL is restriced. sudo mysqladmin -u root -p drop alfresco
10. Download latest Alfresco version and FTP it to the Ubuntu server
11. Move it from the home folder to the /opt folder and go there sudo mv "alfresco download" /opt cd /opt
12. Create the new Alfresco database I have to do this from the console as mySQL is restriced. mysql -u root -p mysql> CREATE DATABASE alfresco DEFAULT CHARACTER SET utf8; mysql> GRANT ALL PRIVILEGES ON alfresco.* TO alfresco@localhost IDENTIFIED BY 'alfresco user password'; mysql> FLUSH PRIVILEGES; mysql> exit
13. Make the Alfresco binary installer executable sudo chmod +x "alfresco download"
13. Install the new version sudo ./"alfresco download" –mode text (I use English, Advanced, Java Y, PostgreSQL N, SharePoint Y, Web Quick Start Y, Google Docs Y, LibreOffice Y)
Select a different folder for installation, e.g. /opt/alfresco-x.y.z
Before launching Alfresco Community Share, make sure you copied mysql-connector-java-x.x.x-bin.jar to tomcat/lib. sudo cp /home/[user]/mysql-connector-java-x.x.x-bin.jar /opt/alfresco-x.y.z/tomcat/lib
DO NOT LAUNCH THE ALFRESCO COMMUNITY SHARE!
14. Restore the database Move the dump from /opt to the /tmp folder sudo mv /opt/alfdbdump.sql /tmp Restore the database I have to do this from the console as mySQL is restriced. sudo mysql -u root -p alfresco < /tmp/alfdbdump.sql
15. Stop Alfresco sudo service alfresco stop
16. Move the original content to the new location cd /opt/"old alfresco folder"/alf_data sudo mv contentstore contentstore.deleted /opt/alfresco-x.y.z/alf_data/
17. Turn off Solr Edit the alfresco-global.properties sudo vi /opt/alfresco-x.y.z/tomcat/shared/classes/alfresco-global.properties
21. Put back any customization you did (ATTENTION, this depends on your configuration) E.g. 1. Other changes to alfresco-global.properties 2. Secure Tomcat cd /opt/alfresco-x.y.z/tomcat/webapps/ROOT sudo vi index.html <html>
</html> 3. Changes to tomcat /opt/alfresco-x.y.z/tomcat/conf/tomcat-users.xml 4. Changes to vti /opt/alfresco-x.y.z/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/context Change the name in vti.properties 5. Disable users to create or delete sites Change the alfresco/public-services-security-context.xml file (in the default install found in /opt/alfresco.x.y.z/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/public-services-security-context.xml) Change from org.alfresco.service.cmr.site.SiteService.createSite=ACL_ALLOW to org.alfresco.service.cmr.site.SiteService.createSite=ACL_METHOD.ROLE_ADMINISTRATOR Also for deleteSite
22. Restart the server entirely sudo reboot
ADDITIONALLY CLEAN UP - remove the dump from /tmp - remove the bin file from /opt - remove the old Alfresco folder from /opt - when everything is working ok, remove the backup from /opt