GithubHelp home page GithubHelp logo

loftuxab / alfresco-ubuntu-install Goto Github PK

View Code? Open in Web Editor NEW
165.0 52.0 118.0 1.44 MB

Alfresco script based install for Ubuntu

Home Page: https://loftux.com/products-and-add-ons/alfresco-utilities

Shell 86.17% HTML 13.15% Vim Snippet 0.68%
lxcommunity-ecm alfresco loftux alfresco-server shell war-files

alfresco-ubuntu-install's Introduction

Loftux AB

Alfresco Ubuntu Installer

This install script and guide was created by Peter Löfgren, Loftux AB.

Please visit https://loftux.com (English) https://loftux.se (Swedish) for more information.

Current version : Alfresco Community 6.1 (6.1.1 Repository,6.1.0 Share) or LXCommunity ECM LX101
Ubuntu Version : 16.04 or later.

Alfresco script based install for Ubuntu servers.

This script will help you set up an Alfresco server instance with all necessary third party components. Some will be installed via Ubuntu packages, some directly downloaded. The script will walk you through the process. In the end, there will be some manual tasks to complete the installation.

Alfresco does have installers for Linux, and you may be better off with using those installers if you just want to do a quick test install.

If you intend to run Alfresco in production, this script can help you both with the install. By examining what the script does, you can also learn what components are involved running an Alfresco instance. This is a must for any Alfresco administrator who runs Alfresco in production.

For commercial support with your installation, upgrades and running a production server, contact Loftux AB (Worldwide).

Installing

To start the install, in Ubuntu terminal run;

curl -O https://raw.githubusercontent.com/loftuxab/alfresco-ubuntu-install/master/alfinstall.sh  
chmod u+x alfinstall.sh
./alfinstall.sh

All install options will be presented with an introduction. They default to 'y' (yes), so type n to skip install of that component. You need sudo access to install.

Please read all of this README before you go ahead.

There is also lots of documentation at http://docs.alfresco.com/5.1. To get started to become an Alfresco server Administrator, read and make yourself familiar with the 'Administering' section.

Notes

  • Only 64-bit Ubuntu is supported. Java cannot address enough memory to support running Alfresco on a 32-bit system.
  • Many components have their download urls pointed to specific version. Whenever a new version comes out, the older version is removed from the download server and this script breaks. These will be updated as soon as they are made known. This is known to happen with LibreOffice and Tomcat. The script will check if the needed components are available and break if they are not.

More on the components/installation steps.

Once the script is downloaded you can modify (if necessary) it to fit your purpose.

LXCommunity ECM

You will be asked to select if you want to install LXCommunity ECM or Alfresco Community.

LXCommunity ECM is a custom build of Alfresco with additional fixes and enhancements and for which you can optionally buy support. You can find more information on this offering at https://loftux.com/alfresco. You can switch between Alfresco Community or LXCommunity ECM as long as they are based on the same schema, see version overview.

Alfresco User

The Alfresco user is the server account used to run tomcat. You should never run tomcat as root, so if you do not already have the alfresco (default in the install script) user, you should add the alfresco user.

In this part of the install is also an update to make sure a specific locale is supported (default sv_SE.utf8). This is useful for LibreOffice date formatting to work correctly during transformations.

Limits

Ubuntu default for number of allowed open files in the file system is too low for alfresco use and tomcat may because of this stop with the error "too many open files". You should update this value if you have not done so.

Read more at http://wiki.alfresco.com/wiki/Too_many_open_files.

Starting/Stopping Alfresco and Search Services

Tomcat is the java application server used to actually run Alfresco. The script downloads the latest version of Tomcat 8, and then updates its configuration files to better support running Alfresco.

Ubuntu systemd is used to stop and start tomcat. You must have a look and verify settings;
/opt/alfresco/alfresco-service.sh

Edit locale setting (LC_ALL) and the memory settings in this file to match your server.

About memory, it has default max set to 2G. That is good enough if you have about 5 users. So add more ram (and then some) to your server, update then Xmx setting in alfresco.conf. Your Alfresco instance will run much smoother.

You will be presented with the option to add either MySql or Postgresql jdbc libraries. You should probably add at least one of them.

Once the install is complete (the entire script and the manual steps following that), to start run
sudo /opt/alfresco/alfresco-service.sh start (16.04) - this is a wrapper, using sudo systemctl start alfresco.service will have the same result.
It also starts/stops Alfresco Search Services, it can be started separately with sudo systemctl start alfresco-search.service.

To stop Tomcat for Alfresco, just switch start to stop in the above command. Using status as a parameter will show status of the Alfresco Tomcat service

Nginx

It is sometimes useful to have a front-end for your Tomcat Alfresco instance. Since Tomcat runs default on port 8080, you can use Nginx as proxy. It is also a lot easier to add ssl support. The default config includes sample configuration for this. Share resource files (anything loaded from /share/res/) is cached in nginx, so it doesn't need to be fetched from tomcat.

The script will use the latest version of the Ubuntu package from Nginx instead of default Ubuntu nginx packages. This allows for http/2 support.

The default config file is found in folder /etc/nginx/conf.d/alfresco.conf. If you want to use ssl, you can replace this file with the sample config in alfresco.conf.ssl. Common settings is found in file basic-settings.conf.

Caveat: The upload progress bar in Share will show the upload as complete when the upload from client to nginx is complete, but the upload from nginx to Tomcat Share/Alfresco continues shortly. Usually this is barely noticeable, since server connections speeds are a lot faster than client server connections.

Maintenance message support

If you are using Nginx as front-end there is a built in fallback to a maintenance page when the Alfresco tomcat instance is stopped. Nginx will detect that tomcat is not responding and show this page. It will display expected downtime and a progress bar.

To set the downtime (in minutes) and a custom message, call the ams.sh script found in script folder. ams.sh 20 "Custom message displayed in page"

The above example will set the downtime to 20 minutes (from when you shut down) and with a custom message. If called without parameters it defaults to 10 minutes. Custom message is optional, but if used you also must set the timeout.

The script will shut down Alfresco tomcat instance. To start it you must call sudo /opt/alfresco/alfresco-service.sh start.

The maintenance.html page is found in its default location /opt/alfresco/www and can be customized to your needs.

If you want to implement this support and already have run the alfinstall.sh script, compare your nginx.conf to what is currently in git/master.

Java JDK

Download and install of Oracle Java 8.

If you choose to use any other Java JDK, adjust paths setting in /etc/init/alfresco.conf.

LibreOffice

Downloads and install LibreOffice from libreoffice.org (technically from a mirror). Alfresco just use LibreOffice for transformations, and later versions have better (hopefully) conversion filters.

In this step ImageMagick is also installed from Ubuntu standard packages, if you skip this step install ImageMagick separately. Some extra font packages like Microsoft true type fonts is also installed, since you likely will add documents to Alfresco that have used them, this will result in better transformations.

ImageMagick

Installed using the Ubuntu default package.

If you get the error no decode delegate for this image format on start in the alfresco.log make sure to check that the path for img.coders= in alfresco-global.properties. The path may be version specific for the installed version.

Alfresco

Download and install of Alfresco itself. Or rather, the alfresco.war and share.war and adds them to tomcat/webapps folder.

You also have the option to install Google Docs and Sharepoint addons. Skip if you do not intend to use them, you can always add then later. You can completely skip this step if you intend to use Enterprise version or any other version. See also the special section about the addons directory.

Solr

Install Solr as indexing engine. Solr runs as a separate application and is slightly more complex to configure. It is recommended that you install Solr. Solr can run on a separate server, you can use this script to install the core for what is needed for that. Refer to the official Alfresco documention for the configuration settings for such a setup.

Addons - Manage amps and war files.

A special directory is created, /opt/alfresco/addons. This directory can be used to manage any addons and the core war files.

  • addons/alfresco - Alfresco amp files.
  • addons/share - Share amp files.
  • addons/war - alfresco.war and share.war files goes in here.
    The script addons/apply.shis what you run to install amp files to war files, and then copy the war files to tomcat/webapps. The script has three parameter options
  • amp - just install the amp files to war files.
  • copy - Copy war files to tomcat/webapps.
  • all - Do both of the above. You can only do this if tomcat is not running.

If you didn't install Alfresco war files with the install script you can use this script to manage your war files. If you for example want to use the Enterprise version, download the war files from Alfresco support portal and add them to the /war directory and the run apply.sh. Or you can always add them directly to tomcat/webapps.

Scripts - Supporting scripts

In the directory /opt/alfresco/scripts there are some useful scripts installed. Or if you did not run the install script, grab them from github. Here is what they do:

  • libreoffice.sh - Start/stop libreoffice manually. Sometimes libreoffice crashes during a transformation, use this script to start it again. Alfresco will re-connect when the server detects libreoffice is running. You can add this to crontab for automatic checks:
    NO LONGER NEEDED: Since version 6 or LX101, Alfresco uses JodConverter with built in process management.

*/10 * * * * /opt/alfresco/scripts/libreoffice.sh start 2>&1 >> /opt/alfresco/logs/office.log
0 2 * * * /opt/alfresco/scripts/libreoffice.sh restart 2>&1 > /opt/alfresco/logs/office.log

This will make sure libreoffice is running (if not already started and tomcat is running). Once per night it will also do a complete restart (in case LibreOffice behaves badly).

  • iptables.sh - Script to add port forwarding. Useful if you want to use cifs, ftp that will not run on lower port numbers if not root. Or if you´re not using nginx as front end and want to forward port 80 to 8080.
  • limitconvert.sh - Script to limit the number of cpu:s ImageMagick convert can use during transformations. Some Document library views with large thumbnails can cause intensive transformation load, and this script make sure some resources are left for other work.
  • createssl.sh - Create self signed certificates, useful for testing purposes. Works well with nginx.
  • mariadb.sh - Install the mariadb database server (the MySql alternative). It is recommended that you instead use a dedicated database server. Seriously, do that. And do some database optimizations, out of scope for this install guide.
  • mysql.sh - Install the mysql database server (the original MySql). It is recommended that you instead use a dedicated database server. Seriously, do that. And do some database optimizations, out of scope for this install guide.
  • postgresql.sh - Same as for MariaDB, but the postgres version.
  • ams.sh - To do a maintenance shutdown. For more, see section under nginx.

Alfresco BART - Backup and Recovery Tool

Alfresco BART is a third party tool to aid with your Backup and Recovery requirements.

You can do the basic install using this script, but it is highly recommended that you visit https://github.com/toniblyx/alfresco-backup-and-recovery-tool/ page to learn more on how to configure this tool.

Frequently Asked Questions (FAQ)

Can this script be used for any version of Alfresco?

Yes, see the Addon section. But do know that it uses latest version of many components, and they may not be Alfresco officially supported stack.

Can I modify the scripts?

Yes, you can either download the install script and modify as needed. Or you clone the entire thing at Github and create your own version. If you create/change anything that you think may be useful, please contribute back.

Upgrading - Can I use this to upgrade an existing install?

At this time, this is not the intended use. So short answer is no.

Longer answer is, you can probably grab pieces of the script to upgrade individual components. Or as is recommended when upgrading, test your upgrade on a separate server. So install a new server with fresh install, then grab a copy of your data and do a test upgrade. If this works, switch to this server. Did you make a backup of your data first?

I want Alfresco and Share on separate server, can this script be used?

Yes (and is also recommended for best performance), but all components are not needed on both servers. The Alfresco server probably doesn't need nginx, the Share server doesn't need LibreOffice, ImageMagick, Swftools and Solr. The 'Alfresco' install step will download both alfresco.war and share.war if run, just remove the one that doesn't apply from tomcat/webapps and addons/war directory.

The script does not use version x of component z, can you fix this?

Probably, but you can also. Just edit the script with the version you want to use, most of the specific links can be found in the beginning of the script.

Why does the script use the latest versions/not use Ubuntu packages?

This combination of packages/downloaded install has been found to work well. But that may not hold true always. If you feel more confident to run a specific version of a component, or want to use a standard Ubuntu package, modify the script. Or skip that part in the install script, and just use this script as an install guide on what needs to be in place for a production server.

License

Copyright 2013-2018 Loftux AB, Peter Löfgren
Distributed under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0)

alfresco-ubuntu-install's People

Contributors

aetxebeste avatar bhagyas avatar chris001 avatar crileiton avatar douglascrp avatar ericlemanissier avatar loftux avatar marcluer avatar nicolas-raoul avatar savicprvoslav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfresco-ubuntu-install's Issues

Undocumented requirement for 64 bit jvm

Peter, First thanks for this install script.

On 32 bit Ubuntu 14.04, ran the script, it uses apt-get to install the matching (32 bit) openjdk 7 JVM from the standard ubuntu 14.04 repo, however it seems to have an undocumented requirement for 64 bit JVM.
Alfresco fails to start.
It sits forever in the browser at the nginx "Alfresco down for maintenance" page.

script~# sudo service alfresco start
alfresco start/running, process 419
~# tail /var/log/upstart/alfresco.log
Error: This Java instance does not support a 64-bit JVM.
Please install the desired version.
~#

ERROR.More than one Alfresco schema was found when querying the database metadata

You might run the postgresql.sh script two or more times, in an attempt to fix the login error and get a working install.
Unfortunately the script doesn't prevent itself from adding the schema 2 times, apparently.
This adding the schema many times, breaks Alfresco.
At startup, the following error is logged.

alfresco.log:

02:30:13,536 INFO  [org.alfresco.repo.admin] [localhost-startStop-1] Using database URL 'jdbc:postgresql://localhost:5432/alfresco' with user 'alfresco'.
02:30:13,818 INFO  [org.alfresco.repo.admin] [localhost-startStop-1] Connected to database PostgreSQL version 9.3.6
02:30:33,895 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
02:30:34,014 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
02:30:34,083 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Ignoring script patch (post-Hibernate): patch.db-V4.2-metadata-query-indexes
02:30:57,687 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor Repository Template Processor for extension ftl
02:30:57,692 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor Repository Script Processor for extension js
02:31:03,334 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted]
02:31:03,400 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted] complete
02:31:03,426 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Connecting to database: jdbc:postgresql://localhost:5432/alfresco, UserName=alfresco, PostgreSQL Native Driver
02:31:03,426 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
02:31:03,538 ERROR [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Schema auto-update failed
org.alfresco.error.AlfrescoRuntimeException: 01280000 
More than one Alfresco schema was found when querying the database metadata.
   Limit the database user's permissions or set the 'hibernate.default_schema' property in 'custom-hibernate-dialect.properties'.
  at org.alfresco.repo.domain.schema.SchemaBootstrap.countAppliedPatches(SchemaBootstrap.java:644)
  at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:879)
  at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1688)
  at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
  at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
  at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
  at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
  at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
  at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:745)
02:31:03,547 ERROR [org.springframework.web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 01280001 Schema auto-update failed
  at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1787)
  at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
  at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
  at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
  at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
  at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
  at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:745)
Caused by: org.alfresco.error.AlfrescoRuntimeException: 01280000 
More than one Alfresco schema was found when querying the database metadata.
   Limit the database user's permissions or set the 'hibernate.default_schema' property in 'custom-hibernate-dialect.properties'.
  at org.alfresco.repo.domain.schema.SchemaBootstrap.countAppliedPatches(SchemaBootstrap.java:644)
  at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:879)
  at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1688)
  ... 23 more
02:31:20,407 WARN  [org.springframework.web.context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.NullPointerException
  at org.alfresco.repo.workflow.activiti.ActivitiEngineInitializer.onShutdown(ActivitiEngineInitializer.java:57)
  at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:67)
  at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
  at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:185)
  at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
  at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)
  at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
  at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586)
  at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
  at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5063)
  at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5719)
  at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:745)
02:31:21,901 WARN  [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'solrSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
02:31:21,909 WARN  [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'activitiesSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
02:31:21,919 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted]
02:31:21,919 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted]
02:31:24,055 WARN  [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'locksSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
02:31:24,101 WARN  [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'propertyValueSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
02:31:24,167 WARN  [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'auditSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
02:31:24,273 WARN  [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'contentSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
02:31:24,315 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'sysAdmin' subsystem, ID: [sysAdmin, default]
02:31:24,315 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'sysAdmin' subsystem, ID: [sysAdmin, default]
02:31:24,409 WARN  [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'repoSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession

What would be the recommended way to fix this so that alfresco would start without error?

Possibly reset a setting in the db?

Clear all of the schema except one?

Modify the script so it will detect an existing schema and not put the db into an unworkable state by adding too many schema?

Error applying amps when running the install script without Java previously installed

If you run the script on a brand new server without Java installed, just after you choose to install any of the optional addons, it show error messages like these:

/opt/alfresco/addons/apply.sh: line 43: java: command not found
ls: cannot access share/*.amp: No such file or directory
/opt/alfresco/addons/apply.sh: line 70: java: command not found
/opt/alfresco/addons/apply.sh: line 73: java: command not found

Script is able to finish, but maybe it would be better to move Java install option before everything else, or ask to install Java before running the script.
And if users don't see those messages, it will end up without those amps installed.

How about including a warning to check if amps were installed?

tomcat URL problem

I'm running this on a 13.10 64 bit clean Ubuntu install.


Tomcat is the application server that runs Alfresco.
You will also get the option to install jdbc lib for Postgresql or MySql/MariaDB.
Install the jdbc lib for the database you intend to use.


Install Tomcat? [y/n] y
Installing Tomcat
Downloading tomcat...

curl: (9) Server denied you to change to the given directory
Extracting...
tar: : Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
mv: cannot stat ‘’: No such file or directory
Downloading tomcat configuration files...
Warning: Failed to create the file /opt/alfresco/tomcat/conf/server.xml: No
Warning: such file or directory

Changing URL to ftp://mirror.nexcess.net/apache/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.tar.gz

worked.

libreoffice version

current install script links libreoffice 4.1.3 which is not available on given address (line 27). it should point to 4.1.4 now.
I'm not sure if it is possible to get latest version dynamically, but this issue will obviously popup again after 4.1.4 gets outdated.

I did not notice this during installation, but after I found out that Alfresco does not create thumbnails.

Default password

Script run, nginx started, alfresco started, but doesn't let me in.
What should be the default username/password to log in?

admin/admin doesn't work.
Also I'm not completely sure if postgres DB was set up correctly (it is encoded us-ascii) and doesn't contain any tables (yet?)

Tomcat version bump

The tomcat binary url in afinstall.sh (7.0.52) is no longer available. This link (to the new version 7.0.53) works:

ftp://ftp.sunet.se/pub/www/servers/apache/dist/tomcat/tomcat-7/v7.0.53/bin/apache-tomcat-7.0.53.tar.gz

Thanks

Adde checks for the url

By suggestion of Marsbard

for REMOTE in $TOMCAT_DOWNLOAD $JDBCPOSTGRESURL/$JDBCPOSTGRES $JDBCMYSQLURL/$JDBCMYSQL \
        $LIBREOFFICE $SWFTOOLS $ALFWARZIP $GOOGLEDOCSREPO $GOOGLEDOCSSHARE $SOLR $SPP
do
        wget --spider $REMOTE  >& /dev/null
        if [ $? != 0 ]
        then
                echo "In alfinstall.sh, please fix this URL: $REMOTE" 
                exit
        fi
done

urls on artifacts.alfresco.com not detected during remote check

someone just came into IRC, I told them to run your script and he got these errors despite the URLs being available, looks like the "wget -spider" or whatever it was is failing for files from that domain

./alfinstall.sh


Alfresco Ubuntu installer by Loftux AB.
Please read the documentation at
https://github.com/loftuxab/alfresco-ubuntu-install.



Checking for the availability of the URLs inside script...


In alfinstall.sh, please fix this URL: https://artifacts.alfresco.com/nexus/service/local/repo_groups/public/content/org/alfresco/integrations/alfresco-googledocs-repo/2.0.8/alfresco-googledocs-repo-2.0.8.amp
In alfinstall.sh, please fix this URL: https://artifacts.alfresco.com/nexus/service/local/repo_groups/public/content/org/alfresco/integrations/alfresco-googledocs-share/2.0.8/alfresco-googledocs-share-2.0.8.amp
In alfinstall.sh, please fix this URL: https://artifacts.alfresco.com/nexus/service/local/repo_groups/public/content/org/alfresco/alfresco-spp/5.0.b/alfresco-spp-5.0.b.amp

Please fix the above errors and rerun.

Preview of doc, docx and odt doesn't work

Using a brand new ubuntu 14.04 server, I saw that doc, docx and odt documents are not correctly previewed.

Installing libxinerama fixed that problem.

sudo apt-get install libxinerama1

LibreOffice URL issue

It appears that LibreOffice did not download. Opening the URL, it's not there. Looks like it has been updated to 4.2.3. Simple enough fix.
new version is at:
http://ftp.sunet.se/pub/Office/tdf/libreoffice/stable/4.2.3/deb/x86_64/LibreOffice_4.2.3_Linux_x86-64_deb.tar.gz

Install LibreOffice? [y/n] y

################################################################## 100.0%

tar: This does not look like a tar archive

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
./alfinstall.sh: line 277: cd: DEBS: No such file or directory
dpkg: error processing *.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
*.deb

Login credential issue

I ran the script successfully but was unable to login with the alfresco default username and password please advise

Upgrade to Tomcat 8 and Java 8

This is an open issue where those who think that the script should use Tomcat 8 and/or Java 8 by default can give there comment. Currently there are no plans to do this, but I am open for this change should there be compelling reasons to do so.

Currently Alfresco runs fine with Tomcat 7 and Java 7, please add your comment on what advantages there would be to use Alfresco with the 8 version (such as stability and performance). Add reference to external resources if you have them that gives backing to you thoughts.

You can always fork the script and use 8 versions, remember for Tomcat to update server.xml, catalina.properties and tomcat-users.xml in https://github.com/loftuxab/alfresco-ubuntu-install/tree/master/tomcat to match what is required for Tomcat 8.

Login authentication not working

The script installs alfresco 5, and the login page for share comes up, but authentication isn't working.
Tried usernames configured during the database install script (alfresco and postgres), and a built in unix account (root). None of them are able to login.
Any suggestions on getting authentication to work.

Ship database engine

Enhancement idea:

MariaDB (or similar) should be shipped in a similar way to LibreOffice, like the official Alfresco installable alfresco-community-4.2.d-installer-linux-x64.bin can do.

Alternatively, the script could install a database engine from Ubuntu's repositories if not install already, and create the user/permissions and update alfresco-global.properties.

Consider not disabling audit in alfresco-global.properties

I'm not sure how long alfresco works this way, but currently, tagging functionality uses audit component for updating Tag Scopes (TaggingServiceImpl#updateTagScope). Default config (Alfresco 4.2.f) from repository.properties:

...
audit.enabled=true
audit.tagging.enabled=true
...

If you disable audit, tag scopes (on sites' level) will not be automatically refreshed (reproducible by adding/removing tag to site's document library item).

By the way, this project is incredibly useful and applicable, and thank you very much for your effort!

Moduliarize (use includes) script

The script is becoming large.
For better maintainability try to use modules and include them. This also opens up the option to create upgrade versions of the scripts, i.e you can use the script to upgrade LibreOffice or Tomcat easily.

Possibly first create a downloader script alfinit.sh.
This will download alfinstall.sh and all includes.
Possible locations
/opt/alfresco/scripts/alfinstall.sh
/opt/alfresco/scripts/include/downloadurl.sh
/opt/alfresco/scripts/include/tomcat.sh
/opt/alfresco/scripts/include/alfresco.sh
/opt/alfresco/scripts/include/(module).sh

The alfinit.sh script itself can then be invoked again to update the basic alfinstall.sh script and the modules. The alfinstall.sh script can then be invoked with "upgrade" as parameter.

Here is a possible modularization pattern
http://stackoverflow.com/questions/78497/design-patterns-or-best-practices-for-shell-scripts

Add JRE_HOME to scripts

If a non-ubuntu JDK is used, JRE_HOME may not be resolved correctly. Add export of JRE_HOME to scripts to fix this.

ImageMagick fail to start - no decode delegate for this image format

This seem to be version specific for the Ubuntu package for ImageMagick.
In alfresco-global.properties set the values for

img.root=/etc/ImageMagick
img.coders=/usr/lib/ImageMagick-6.6.9/modules-Q16/coders

As shown there is a version specific path, so if the ImageMagick package us upgraded, the path need to be adjusted.

admin and 2x databases username/password

Where is it in this alfresco-ubunutu-install.sh that the initial admin login username/password is set?

Where on the system the username/password stored? In "postgres database? In "alfresco" database? Which tables?

The postgresql.sh script sets "postgres" username, and prompts for a password, for the database "postgres", and sets the "alfresco" username for the database "alfresco", without any password.

What purpose is to create the "alfresco" username, add it to database "alfresco", without any password, while the script displays instructions "Remember to update alfresco-global.properties with the alfresco database password"?

solr SEVERE Exception opening zip file. Null pointer exception. Etc.

Have posted this login error issue on Alfresco forum.

They think this solr4 error is the reason why the initial login is failing:

Looking at catalina.out, the solr4 web application is failing to load because there is a problem with the config file solr.xml.

I'm not sure why solr would be relevant to a log in, but certainly without it Alfresco will not function. Also the fact that it is aborting may be killing some components that Alfresco login relies upon.

First order of business is to adjust the solr config so that it will load & run"

Catalina.log:

    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server version:        Apache Tomcat/7.0.59
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server built:          Jan 28 2015 15:51:10 UTC
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server number:         7.0.59.0
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: OS Name:               Linux
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: OS Version:            2.6.32-32-pve
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Architecture:          amd64
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Java Home:             /usr/lib/jvm/java-7-openjdk-amd64/jre
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: JVM Version:           1.7.0_75-b13
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: JVM Vendor:            Oracle Corporation
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: CATALINA_BASE:         /opt/alfresco/tomcat
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: CATALINA_HOME:         /opt/alfresco/tomcat
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.util.logging.config.file=/opt/alfresco/tomcat/conf/logging.properties
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Xms2G
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Xmx3G
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Xss1024k
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -XX:MaxPermSize=256m
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Duser.country=US
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Duser.region=US
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Duser.language=en
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Duser.timezone=Europe/Stockholm
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dfile.encoding=UTF-8
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dsun.jnu.encoding=UTF-8
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dalfresco.home=/opt/alfresco
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dcom.sun.management.jmxremote=true
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.endorsed.dirs=/opt/alfresco/tomcat/endorsed
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dcatalina.base=/opt/alfresco/tomcat
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dcatalina.home=/opt/alfresco/tomcat
    Feb 25, 2015 8:49:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.io.tmpdir=/opt/alfresco/tomcat/temp
    Feb 25, 2015 8:49:10 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5.1.
    Feb 25, 2015 8:49:10 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
    Feb 25, 2015 8:49:10 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
    INFO: OpenSSL successfully initialized (OpenSSL 1.0.1f 6 Jan 2014)
    Feb 25, 2015 8:49:10 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-apr-8080"]
    Feb 25, 2015 8:49:10 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8443"]
    Feb 25, 2015 8:49:11 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
    Feb 25, 2015 8:49:11 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2621 ms
    Feb 25, 2015 8:49:11 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Feb 25, 2015 8:49:11 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.59
    Feb 25, 2015 8:49:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor /opt/alfresco/tomcat/conf/Catalina/localhost/solr4.xml
    Feb 25, 2015 8:49:11 PM org.apache.catalina.startup.SetContextPropertiesRule begin
    WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' did not find a matching property.
    Feb 25, 2015 8:49:11 PM org.apache.catalina.startup.ContextConfig beforeStart
    SEVERE: Exception fixing docBase for context [/solr4]
    java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:215)
        at java.util.zip.ZipFile.<init>(ZipFile.java:145)
        at java.util.jar.JarFile.<init>(JarFile.java:154)
        at java.util.jar.JarFile.<init>(JarFile.java:91)
        at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
        at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
        at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:99)
        at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
        at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
        at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:111)
        at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:754)
        at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:863)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

    Feb 25, 2015 8:49:11 PM org.apache.catalina.core.StandardContext resourcesStart
    SEVERE: Error starting static Resources
    java.lang.NullPointerException
        at java.io.File.<init>(File.java:277)
        at org.apache.catalina.core.StandardContext.getBasePath(StandardContext.java:6065)
        at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5141)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5326)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

    Feb 25, 2015 8:49:11 PM org.apache.catalina.core.ContainerBase addChildInternal
    SEVERE: ContainerBase.addChild: start: 
    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/solr4]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: org.apache.catalina.LifecycleException: Error in resourceStart()
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5327)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 10 more

    Feb 25, 2015 8:49:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
    SEVERE: Error deploying configuration descriptor /opt/alfresco/tomcat/conf/Catalina/localhost/solr4.xml
    java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/solr4]]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

    Feb 25, 2015 8:49:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deployment of configuration descriptor /opt/alfresco/tomcat/conf/Catalina/localhost/solr4.xml has finished in 182 ms
    Feb 25, 2015 8:49:11 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive /opt/alfresco/tomcat/webapps/alfresco.war
    Feb 25, 2015 8:51:38 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deployment of web application archive /opt/alfresco/tomcat/webapps/alfresco.war has finished in 146,336 ms
    Feb 25, 2015 8:51:38 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive /opt/alfresco/tomcat/webapps/share.war
    Feb 25, 2015 8:52:05 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deployment of web application archive /opt/alfresco/tomcat/webapps/share.war has finished in 27,111 ms
    Feb 25, 2015 8:52:05 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-apr-8080"]
    Feb 25, 2015 8:52:05 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8443"]
    Feb 25, 2015 8:52:05 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-apr-8009"]
    Feb 25, 2015 8:52:05 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 173846 ms

Offers the option to automatically install and configure Oracle's Java

I think the required steps to allow the automatic Oracle Java installation could be included into the script.
It could be offered as an option to the user executing the script.

I've written this blog post with the process http://douglascrp.blogspot.com/2014/08/how-to-install-oracle-java-on-ubuntu.html

If user chooses to install Oracle Java, /etc/init/alfresco.conf should also have the parameter bellow set:
env JAVA_HOME=/usr/lib/jvm/java-7-oracle

I can try to change this and create a pull request if you think it's going to be useful.

Wrong path created in tomcat/shared

Script creates tomcat/shared/classes/extension (and web-extension)
Should be tomcat/shared/classes/alfresco/extension (and the same for web-extension).

office.bin using 100% CPU after install

I do not know the reason for this, but top showed that soffice.bin was pegging my cpu. I found a post recommending to set the Logo=0 in /opt/libreoffice4.2/program/sofficerc. After setting this, it appeared to resolve the issue. My build was pretty vanilla, so maybe this should be the default setting? I'll let someone else decide this.

Referenced post
https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/sofficebin-has-cpu-pinned-100

Install halted at addons-step

I tried to use the script on a box running Ubuntu 12.0.4 yesterday, but it constantly halted on the add-on step. After looking into the script I found out that it was when calling java -jar alfresco-mmt.jar install. Executing that part separately (after setting the same environmental variables as in the apply.sh script) gave the following result. After the last line, it stopped, without returning nor using any CPU...

fwr@redoxisab:/opt/alfresco/addons$ sudo rm alfresco.war*
fwr@redoxisab:/opt/alfresco/addons$ sudo cp war/alfresco.war .
fwr@redoxisab:/opt/alfresco/addons$ sudo java -jar alfresco-mmt.jar install alfresco/alfresco-community-spp-4.2.e.amp alfresco.war -verbose -nobackup
Installing AMP 'alfresco/alfresco-community-spp-4.2.e.amp' into WAR 'alfresco.war'
Adding files relating to version '1.3' of module 'org.alfresco.module.vti'
   - File '/WEB-INF/lib/alfresco-vti-4.2.e.jar' added to war from amp
   - File '/WEB-INF/lib/jetty-6.1.26.jar' added to war from amp
   - File '/WEB-INF/lib/jetty-util-6.1.26.jar' added to war from amp
   - File '/WEB-INF/classes/alfresco/messages/vti-webview.properties' added to war from amp
   - File '/WEB-INF/classes/alfresco/messages/vti-webview_ru.properties' added to war from amp
   - File '/WEB-INF/classes/alfresco/messages/webview_en.properties' added to war from amp
   - File '/WEB-INF/classes/alfresco/messages/webview_ru.properties' added to war from amp
   - File '/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/context/vti-context.xml' added to war from amp
   - File '/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/context/vti-handler-context.xml' added to war from amp
   - File '/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/context/vti.properties' added to war from amp
   - Directory '/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/context' added to war
   - File '/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/module-context.xml' added to war from amp
   - Directory '/WEB-INF/classes/alfresco/module/org.alfresco.module.vti' added to war
   - File '/WEB-INF/classes/alfresco/templates/org/alfresco/vti/welcome-info.html.ftl' added to war from amp
   - Directory '/WEB-INF/classes/alfresco/templates/org/alfresco/vti' added to war
   - Directory '/WEB-INF/classes/alfresco/templates/org/alfresco' added to war
   - Directory '/WEB-INF/classes/alfresco/templates/org' added to war
   - File '/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/vti/vti-server.get.desc.xml' added to war from amp

If you have any idea what's going on, I would be delighted!

Kind regards,
Fredrik

Add checksum support

For all the downloaded components add a checksum check

  • Needs to be recalculated for each new build
  • For "internal" files it can be done as part of a build.
  • For external (like the downloaded alfresco war files) they need to be downloaded once to calculate the checksum

Even after outdated Postgres JDBC and Tomcat urls are fixed, Alfresco fails to run.

Fixed outdated Postgresl JDBC and Tomcat urls in the script.
The script completes.
Make the requested modifications - database username password and type - to the start script.
Alfresco still fails to come up fully.
Java process runs, but web interface shows "Alfresco Maintenance. Alfresco down for maintenance "
The log fills up very fast. 100MB in about 12 hours.
All the same entries repeating.
Here is the last 100 lines of /var/log/upstart/alfresco.log

19-Feb-2015 14:43:23.799 SEVERE [main] org.apache.tomcat.util.digester.Digester.
startElement Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.core.JasperListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRu
le.java:116)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1
184)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle
ment(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.
emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
MLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
stractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
arse(SAXParserImpl.java:648)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1457)
at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
at org.apache.catalina.startup.Catalina.start(Catalina.java:613)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

19-Feb-2015 14:43:23.803 WARNING [main] org.apache.catalina.startup.Catalina.loa
d Catalina.start using conf/server.xml: Error at (30, 67) : org.apache.catalina.
core.JasperListener
19-Feb-2015 14:43:23.804 SEVERE [main] org.apache.catalina.startup.Catalina.star
t Cannot start server. Server instance is not configured.
*** ALERT - A stop was issued before Alfresco was properly started. In 120 secon
ds server will stop. ***
19-Feb-2015 14:43:25.054 SEVERE [main] org.apache.tomcat.util.digester.Digester.
startElement Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.core.JasperListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRu
le.java:116)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1
184)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle
ment(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.
emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
MLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
stractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
arse(SAXParserImpl.java:648)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1457)
at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)

19-Feb-2015 14:43:25.072 WARNING [main] org.apache.catalina.startup.Catalina.loa
d Catalina.start using conf/server.xml: Error at (30, 67) : org.apache.catalina.
core.JasperListener
19-Feb-2015 14:43:25.096 SEVERE [main] org.apache.tomcat.util.digester.Digester.
startElement Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.core.JasperListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRu
le.java:116)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1
184)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle
ment(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.
emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
MLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
stractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
arse(SAXParserImpl.java:648)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1457)
at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
at org.apache.catalina.startup.Catalina.start(Catalina.java:613)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

19-Feb-2015 14:43:25.106 WARNING [main] org.apache.catalina.startup.Catalina.loa
d Catalina.start using conf/server.xml: Error at (30, 67) : org.apache.catalina.
core.JasperListener
19-Feb-2015 14:43:25.107 SEVERE [main] org.apache.catalina.startup.Catalina.star
t Cannot start server. Server instance is not configured.
script: open failed: typescript: Permission denied
~#

suggestion

add file
share-config-custom.xml
to directory
/opt/alfresco/tomcat/shared/classes/alfresco/web-extension

somewhere at the end of installation process.
also add some description about purpose of this file (either directly into install script or readme page). I use multiple instance scenario and connection from Share to Alfresco is defined in this config file.

i also suggest to add to Readme that ImageMagick is not needed when installing Share instance... here: https://github.com/loftuxab/alfresco-ubuntu-install#i-want-alfresco-and-share-on-separate-server-can-this-script-be-used

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.