Install Alfresco Community Docker



Alfresco Community Edition is a standards-compliant content repository. It includes granular access control, support for social networks, and an embedded workflow engine that integrates with business processes. The Bitnami Alfresco stack supports federated servers, roles-based permissions and support for mobile clients. Other features (only available in the Enterprise Edition) include an. Alfresco Content Services, the enterprise edition of the open source ECM solution, provides open, flexible, highly scalable Enterprise Content Management capabilities. Content is accessible wherever and however you work and easily integrates with your other business applications.

  1. Install Alfresco Community Docker Cli
  2. Install Alfresco Community Edition Docker

There are a number of processes and procedures for maintaining and administering a Content Services production environment.

System paths convention

When using the Content Services documentation, there are a number of conventions for common system paths.

Note:

  • Explicit Linux paths use forward slashes:

    /srv/some-directory

  • Explicit Windows paths use back slashes

    C:some-directory

  • Where you see forward slashes, the same path can apply in both Linux or Windows environments:

    /some-directory/

Content Services installation directory

The installation directory is referenced throughout this guide as <installLocation>.

For example:

  • (Linux): /opt/alfresco
  • (Windows): C:alfresco

<classpathRoot> directory

The <classpathRoot> is a directory whose contents are automatically added to the start of your application server classpath. The location of this directory varies depending on your application server.

For example:

  • (Linux): <installLocation>/tomcat/shared/classes/
  • (Windows): <installLocation>tomcatsharedclasses

alfresco-global.properties file

The alfresco-global.properties file is where you store all the configuration settings for your environment. The file is in Java properties format, so backslashes must be escaped. The file should be placed in <classpathRoot>. An alfresco-global.properties.sample file is supplied with the WAR distribution zip file. This .sample file contains examples of common settings that you can copy into your alfresco-global.properties file.

<extension> directory

The <extension> directory is where you store Spring configuration files that extend and override the Repository (i.e. alfresco.war) system configuration. This directory can be found at <classpathRoot>/alfresco/extension.

<web-extension> directory

The <web-extension> directory is where you store Spring configurations that extend and override the system Share (i.e. share.war) configuration. This directory can be found at <classpathRoot>/alfresco/web-extension.

<solrRootDir> directory

The <solrRootDir> directory is the Search Services home directory which contains the Solr core directories and configuration files. This directory can be found at <SOLR_HOME>.

<configRoot> directory

The <configRoot> directory contains the default Repository (i.e. alfresco.war) configuration.

For example, for Tomcat, <configRoot> is <installLocation>/tomcat/webapps/alfresco/WEB-INF.

<configRootShare> directory

The <configRootShare> directory contains the default application configuration for Share (i.e. share.war).

For example, for Tomcat, <configRootShare> is <installLocation>/tomcat/webapps/share/WEB-INF.

Heartbeat feature

Content Services can send a ‘heartbeat’ to Alfresco. The heartbeat contains anonymous information that can help Alfresco to understand product usage and to better meet the needs of your organization. Our aim is to use the anonymous information to help us make decisions about product development so that our investment benefits as many users as possible.

Disable the Heartbeat

The Heartbeat feature is set to true by default:

If you’re using Content Services it’s not possible to change the value of the heartbeat.enabled property because the default license supersedes the property. If you’re unable to share this anonymous data with us you can request a license from Alfresco Support with Heartbeat already disabled. Contact Alfresco Support for more information.

Transmitted data

The anonymous data transmitted by the repository includes the Content Services version number, number of items in the repository, the size of a cluster, and the number of active users. Information about feature usage including content models, workflows, Smart Folders, and APIs are also sent. Other products will also share anonymous data necessary for Alfresco to understand their usage.

To see the data that’s sent to Alfresco, see the following logs:

Best practices

Here are some best practice guidelines for Content Services administrators. Use these tips to improve your experience of Content Services:

  1. Allow sufficient time to plan your project and identify the most optimal path for you.
  2. Benchmark the system you want to use to ensure you can tune it for best performance and high availability before you go live.
  3. Ensure customizations occur using the <extensions> and <web-extensions> directories, and/or AMP files to help smooth upgrade and debugging processes.
  4. Discover more about FreeMarker templates. You can create custom views for your spaces, and email templates to fit your organization, among other things.
  5. Discover more about web scripts. This requires some, but not extensive, technical knowledge, and is very powerful.
  6. Use File and Folder Templates to create reusable components and enable business processes.
  7. Microsoft Office integration makes adoption of Content Services seamless.
  8. Email integration provides simple and safe way to store emails inside the repository.
  9. Coordinate with Alfresco on short-term consulting. This allows you and/or your System Integrator to work with Alfresco on architecture and planning.
  10. Take advantage of the support for multiple security protocols, which makes it suitable for large enterprises.
  11. Use the Support Portal, a subscription site that provides downloads, further documentation, and a Knowledge Base.
  12. Take advantage of Content Services training. Get the knowledge and information you need to make your implementation successful.

Also, use these tips to help you manage your environment:

  1. Make sure you use a transactional database.
  2. Keep your Search indexes on your fastest local disk.
  3. Version only what and when you need to.
  4. If you find yourself constantly creating the same space hierarchy as well as rules and aspects to them, consider creating File and Folder Templates instead.
  5. Increase the database connection pool size for large numbers of concurrent users or sessions.
  6. Use the System Information to view system properties, such as schema and server versions.
  7. Use the Node Browser (searchable by node reference, xpath, or lucene) to view all properties, parent and child nodes, aspects applied, permissions, and associations.

Common mistakes

Avoid these common mistakes when administering a Content Services environment.

  1. Not keeping extended configurations and customizations separate in the shared directory. Do not put them in the configuration root. If you do, you’ll lose them during upgrades.
  2. Not ensuring that the database driver is copied to the application server lib directory when installing.
  3. Not testing the backup strategy.
  4. Making changes to the system without testing them thoroughly on a test and pre-production machine first.
  5. Failing to set the dir.root property to an absolute path location.
  6. Not fully shutting down a running instance of Content Services, so the next time you try and start it, Content Services says: Address already in use: JVM_Bind:8080 (especially on Linux).
Community

Community Edition is pre-configured with a set of system configuration parameters.

Many of the system configuration parameters are completely exposed as properties, which you can extend or override either in the alfresco-global.properties file or by using Admin Tools in Share.

The global properties file is used to detect the extended properties. You can use the global properties to set all your property settings; whenever you make a change, you must restart the server to apply those changes.

Admin Tools in Alfresco Share is an alternative way of making changes to some configurations.

Note: For advanced configuration, you can also extend or override the Spring bean definitions that control Java classes. Add or copy a Spring bean file named *-context.xml to the <extension> directory, or <web-extension> directory to extend Share. For examples of the Spring bean extensions, download the sample extension files.

Using alfresco-global.properties

Install Alfresco Community Docker Cli

The global properties alfresco-global.properties file contains the customizations for extending Community Edition.

Install

If you install manually using the WAR file, you can modify properties in the alfresco-global.properties file.

A sample global properties file is supplied with the installation. By default, the file contains sample settings for running Community Edition, for example, the location of the content and index data, the database connection properties, the location of third-party software, and database driver properties.

Install Alfresco Community Docker

Modify global properties file

Important: For edits to the alfresco-global.properties file, when specifying paths for Windows systems, you must replace the Windows path separator characters with either the separator or the forward slash / Unix path separator.

If you’re installing manually, then you can use the alfresco-global.properties.sample file. This sample file contains some of the common properties required for setting up Community Edition.

  1. Locate and open the alfresco-global.properties.sample file.

    For example, for Tomcat, browse to the $TOMCAT_HOME/shared/classes/ directory.

    This file contains sample configuration settings. To enable or modify a setting, remove the comment (#) character. Comment out all the properties you don’t want to modify by adding the “#” character.

  2. Ensure that the dir.root= property points to a root location for the storage of content binaries and index files.

    For example: dir.root=/var/data/alfresco/alf_data

    Note: It’s strongly recommended that you always set this value to an absolute file system path as shown above. This ensures that no matter how the instance is started, it will always find the directories where content has previously been written.

  3. Set the database connection properties.

    PropertyDescription
    db.username=alfrescoSpecifies the name of the main database user. This name is used to authenticate with the database.
    db.password=alfrescoSpecifies the password for the database user. This password is used to authenticate with the database.

    Additional database properties can be set for further configuration. See Configuring databases for more information.

  4. Specify the locations of the following external software:

    PropertyDescription
    jodconverter.enabled=Specifies whether to use the JODConverter. Set the property to true.
    img.root=Specifies the location of the ImageMagick installation.
    img.coders=Specifies the path to the image coders directory. Normally ${img.root}/modules/coders
    img.config=Specifies the path to the image config directory. Normally ${img.root} on Windows and ${img.root}/config on Linux.
    img.exe=Specifies the path to the convert executable. Normally ${img.root}convert.exe on Windows and /usr/bin/convert on Linux.
    alfresco-pdf-renderer.exeSpecifies the path to the Alfresco PDF renderer executable. Normally this will be C:Alfrescoalfresco-pdf-renderer.exe on Windows and /usr/bin/alfresco-pdf-renderer on Linux.
  5. Configure your supported database for use. See Configuring databases.

  6. Select a JDBC driver used with each connection type.

  7. Add your global custom configurations.

    Note: Ensure that you use single-byte character sets (ISO-8859-1 Latin 1) in your alfresco-global.properties settings, particularly the system.webdav.rootPath setting. If you require other characters, you can use Unicode equivalents. For example, if your root path in Cyrillic was фолдер, which means folder in English, a valid value would be:

  8. Save your file without the .sample extension.

You need to restart the server for the configuration changes to take effect.

Set composite properties in global properties file

The imap.server.mountPoints property is used as an example for setting composite properties.

The ImapConfigMountPointsBean class that holds the component beans has four properties of its own:

  • beanName
  • store
  • rootPath
  • mode
  1. Open the <classpathRoot>/alfresco-global.properties file.

  2. To set some overall defaults for all component instances, use the format:

    These values would show up, for example, when you added a new component instance but didn’t specify its properties.

    For example:

    This example doesn’t define a default for beanName because there’s a way of populating it for each instance.

  3. To set up the imap.server.mountPoints with a composite value, set the master composite property using a comma-separated list.

    For example:

    This defines that the property contains two ImapConfigMountPointsBean instances, named Repository_virtual and Repository_archive. Because ImapConfigMountPointsBean implements the BeanNameAware Spring interface and has a beanName property, these instance names are automatically set as the bean names.

  4. To define component properties specific to each component instance, use the format:

    For example:

Using the Java command line to change settings dynamically

All Community Edition properties can be set using the standard alfresco-global.properties configuration file. There might be circumstances where it is more convenient to change properties on the fly. The Java command line provides an alternative method of setting the properties.

The most common use of the Java command line is in a multiple-machine environment where the basic, common customizations are set using standard properties and the machine-specific values are set using command line options.

For example, an administrator is likely to configure all installs to behave similarly by setting properties in the configuration files, but will use the Java command line to vary settings like the database connection and Content Store locations.

You can use the -D options for setting properties on the Java command line. Add a -Dprop=value to JAVA_OPTS, or for anything that is sent to the Java command line, for example:

Customize applications

You can make basic configuration updates to customize Community Edition, or modify properties files to apply configuration changes.

  • Updating system configuration parameters

    You can configure Community Edition for your specific environment by editing the alfresco-global.properties file.

  • A number of options are available to customize Share. To configure Share, use the configuration file, share-config-custom.xml .

  • When you install Alfresco Search Services, several Solr-related configuration files are made available to you. To configure Solr, use the configuration file, solrcore.properties.

Note: Remember not to use the default user names, URLs, or passwords with different environments.

Note: You can customize or scale up to meet your login and security requirements. See Setting up authentication and security for more information.

Customize individual configuration items

Configuration is implemented using three types of files:

  • Extension files
  • Bean files
  • Spring bean definitions

Customize extension files

Extension files end with the extension .xml, and define <config> tags. A typical configuration file is <web-extension>/share-config-custom.xml.

A configuration file contains <alfresco-config> tags outside the <config> tags. You must preserve these tags in your customized file.

  1. Open the configuration file that you want to customize.

  2. Edit each pair of <config>...</config> tags that you want to modify.

    Replace a configuration

    To replace the configuration, add a replace=“true” attribute to the configuration element. For example:

    Note: Any configuration within a section marked this way completely replaces any configuration found in the Community Edition maintained files.

    Modify one property

    The attribute replace completely replaces the configuration. To modify one property, add the changed piece.

  3. Save your customized file.

Modify Spring bean definition files

For advanced configuration, you can also extend or override the Spring bean definitions that control the Community Edition Java classes.

The Spring bean definitions are within configuration files in the following directories:

  • The <extension> directory contains the configuration files for extending Community Edition.
  • The <web-extension> directory contains the configuration files for extending Alfresco Share.
  1. Browse to the <extension> directory. For example, for Tomcat:

    • (Windows) C:Alfrescotomcatsharedclassesalfrescoextension
    • (Linux) tomcat/shared/classes/alfresco/extension

    Each file has a copy with a .sample extension.

  2. Open the configuration file with the .sample extension.

  3. Add your configuration to the file.

  4. Save the file without the .sample extension.

Install Alfresco Community Edition Docker

Customize Activity Email Summary

The Activity Email Summary ignores certain activity types by default. Use this information to override the Spring bean definition to include these activity types.

The Spring bean definition for the ActivitiesFeed subsystem is called activities-feed-context.xml and can be downloaded from the Alfresco SVN: activities-feed-context.xml.

  1. Download the file and save to the <subsystems/ActivitiesFeed/default> directory.

    The file contains the following bean override for the file-previewed and file-downloaded values:

  2. Remove or comment out the following lines to include the file-previewed and file-downloaded entries in your Activity Email Summary:

  3. Save your file.

Customize bean files

Bean files end with the extension .xml and contain <bean> tags. You can modify <bean> tags to define properties or point to customized files.

There are two common uses of beans:

  • To define properties
  • To point to one or more of your customized files

A typical bean file is <extension>/custom-repository-context.xml. A bean file contains <?xml> and <!DOCTYPE> headers, and <beans> tags outside the <bean> tags. You must preserve these items in your customized file.

Important: When you override a <bean>, the entire effects of the original bean are lost. The effect is the same as if you had overridden a <config> by using replace='true'. Therefore, the overriding <bean> must contain any information from the default bean that you want to keep, as well as any additional information.

For example, if a core bean has four values, and you want to modify a single value, the resultant bean must still have four values. However, if you want to add a value, then the resultant bean must have five values - the original four values plus the added value.

  1. Open the bean file that you want to customize.

    For example, the following <bean> is from <configRoot>/classes/alfresco/action-services-context.xml:

  2. Delete each pair of <bean>...</bean> tags that you don’t want to modify.

  3. Modify the contents of the remaining <bean> tags.

    For example, the following overrides the publicAction property from the previous example:

  4. Save the file.