Tech Kraft

Documentum, AWS, Java, Ruby on Rails, Linux, Windows, App Servers


Quick Alfresco Installation Steps with Zip

Prerequisites:

Java: OpenJDK 11 preferred

Application server: Apache Tomcat

Download and install Tomcat following the instructions from http://tomcat.apache.org

Create an additional classpath to Tomcat, which will be shared among all web applications.

Create the directories required for a Content Services installation under <TOMCAT_HOME>:
Create the shared/classes directory.
Create the shared/lib directory.

Open the /conf/catalina.properties file.

Change the value of the shared.loader= property to the following:

shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

Copy the JDBC drivers for the database you are using to the lib directory from here: Database JDBC Drivers | Confluence Data Center and Server 5.9 | Atlassian Documentation

Download jar to <TOMCAT_HOME>/lib folder

(Optional) Enable Simple JAR modules.

The repository allows you to provide extensions outside of the web application, known as simple JAR modules. If you want to enable this mechanism, follow these steps:

Create the following directories under <TOMCAT_HOME>:
    modules/platform
    modules/share

Copy the files alfresco.xml and share.xml from the distribution zip /web-server/conf/Catalina/localhost to <TOMCAT_HOME>/conf/Catalina/localhost (or hostname).

Configure mutual TLS for Solr communication.

The communication with Solr is encrypted and authenticated via mutual TLS. For this connection, you need an additional Connector.

Note: This Connector isn’t used by end users. Its sole purpose is to handle the communication with Solr.

Open the <TOMCAT_HOME>/conf/server.xml file.

Add the following Connector:

 <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
     SSLEnabled="true" maxThreads="150" scheme="https"
     keystoreFile="xxxxx"
     keystorePass="password" keystoreType="JCEKS"
     secure="true" connectionTimeout="240000"
     truststoreFile="xxxxx"
     truststorePass="password" truststoreType="JCEKS"
     clientAuth="want" sslProtocol="TLS" />

    Note: The keystore and truststore file locations in the above example will be created later, when you install and configure Alfresco Search Services.

    Note: If you’re using a different keystore or truststore type other than the default, JCEKS, you must change the value in the properties file.

Save the server.xml file.

Move the WAR files from /web-server/webapps to the appropriate location for your application server.

For example, for Tomcat, move the WAR files to the <TOMCAT_HOME>/webapps directory

Move the contents from /conf, and /lib under /web-server to the appropriate location for your application server.

For example, for Tomcat, move the files to the existing directories under <TOMCAT_HOME>.

Remove all directories in <TOMCAT_HOME>/webapps.

If you don’t remove these directories, then the WAR files aren’t deployed when the server starts.


Database: PostgreSQL or MySQL

$ sudo apt update -y
$ sudo apt install postgresql postgresql-contrib

To check status:
$ sudo systemctl status postgresql

To log in to your PostgreSQL instance, first switch to the postgres user
$ sudo -i -u postgres
$ psql
\q

To install prerequisite packages for pgAdmin4
$ sudo apt install libgmp3-dev build-essential libssl-dev

Next, install the Python virtual environment and associated dependencies.
$ sudo apt install python3-virtualenv python3-dev libpq-dev

Next, create a directory where you will create a virtual environment.
$ mkdir pgadmin4 && cd pgadmin4

Then create the virtual environment pgadmin4env as the name of the virtual environment.
$ virtualenv pgadmin4env

Once the virtual environment is in place, activate it as shown.
$ source pgadmin4env/bin/activate

Then use the pip tool to install pgadmin4 as shown.
$ pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v6.15/pip/pgadmin4-6.15-py3-none-any.whl

Next, create a configuration file config_local.py.
$ sudo nano pgadmin4env/lib/python3.10/site-packages/pgadmin4/config_local.py

and add the lines below.

import os
DATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/'))
LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')
SQLITE_PATH = os.path.join(DATA_DIR, 'pgadmin4.db')
SESSION_DB_PATH = os.path.join(DATA_DIR, 'sessions')
STORAGE_DIR = os.path.join(DATA_DIR, 'storage')
SERVER_MODE = False
AZURE_CREDENTIAL_CACHE_DIR = os.path.join(DATA_DIR, 'azurecredentialcache')

To start the pgAdmin4 management tool, invoke the command
$ python pgadmin4env/lib/python3.10/site-packages/pgadmin4/pgAdmin4.py

go to the following url in browser:
http://127.0.0.1:5050


Message broker: ActiveMQ

From a command shell, change to the installation directory and run ActiveMQ as a foregroud process:

cd [activemq_install_dir]/bin
./activemq console

From a command shell, change to the installation directory and run ActiveMQ as a daemon process:

cd [activemq_install_dir]/bin
./activemq start


LibreOffice
ImageMagick

Preparing the filesystem and database

These steps describe how to prepare a suitable location for data storage and the database.

Create a new folder on your local filesystem.

This folder can be located anywhere, but you need to make sure that the user account under which Tomcat will run has full read/write access to this location.

In a clustered environment, this folder needs to be shared between all cluster nodes.

Create a new database for Content Services.

It’s good security practice to create a new user account for Content Services which only has permissions to this database.

For PostgreSQL, run the following commands:

create database alfresco encoding ‘utf8’;
create role alfresco LOGIN password ‘alfresco’;
grant all on database alfresco to alfresco;



Leave a comment

About Me

Senior Software Engineer professional with over 16 years of success with multiple open source technologies and various Content Management platforms and solutions.

Proven technical abilities through numerous projects involving enterprise web application design and development, application installation, configuration and support, and workflow and collaboration system designs.

  • Ability to learn new technologies and platforms quickly and apply them to the task at hand.
  • Excellent analytical skills, and strong communication and collaboration abilities.
  • Technical emphasis in including but not limited to Java, Ruby on Rails, Documentum and Alfresco
    in both Linux and Windows based environments

Newsletter