Monday, May 16, 2022

Setup ACS-7.x, ASS-2.x and Local Transformation Service using distribution package step by step Part-2


As part of the step by step series, I outlined the steps to install Alfresco Content Services 7.0.0 and Alfresco Search Services 2.0.1 using distribution package on CentOS 7 x64 environment in my previous post.


You can take a look at the steps here

As many of you have requested ACS7 setup on Windows Platform as well, I am here with another part of step by step series on ACS installation.
Hyland Alfresco has released ACS7.2 recently, See the release notes hereI will be using the latest version for this post.

What we need before we start doing setup?

  1. ACS-7.2.0 package (alfresco-content-services-community-distribution-7.2.0.1)
  2. ASS-2.0.3 package (alfresco-search-services-2.0.3.5)
  3. Java: Oracle jdk-11.0.13 or later/Open JDK 11.0.13 or later (I will use Oracle jdk-11.0.15 for this post)
  4. Tomcat: Tomcat 9.0.62
  5. ActiveMQ: ActiveMQ v5.16.2. Mandatory for transformation services. Check this out for Local Transformation Service
  6. DB: PostgreSQL 13
  7. ImageMagick: ImageMagick v7.1.0
  8. Libreoffice: LibreOffice v7.0.6
  9. Alfresco Transform Core AIO Boot App v2.5.7
Checkout this documentation for additional details on Supported Platforms


Platform:

  • Windows 10 x64

Type of deployment:

  • ACS, Share, ASS (SOLR6), and Local transformation services on same machine
  • Setup With Shared Secret (Without SSL)

Let’s download all the required packages that we need for the setup.


Visit Alfresco community download page and download latest stable versions of ACS and ASS:

  • Download ACS-7.2.0 community:
https://artifacts.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-content-services-community-distribution/7.2.0.1/alfresco-content-services-community-distribution-7.2.0.1.zip


  • Download ASS-2.0.3:
https://artifacts.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-search-services/2.0.3.5/alfresco-search-services-2.0.3.5.zip

 

Note: If you are planning to setup ACS-7.2.0 (Enterprise version) and ASS-2.0.3, then download the appropriate distribution packages from Alfresco Support portal. All the steps outlined below will remain same. We are using community version of ACS 7.2  for this post hence we have to use ASS 2.0.3 as stated in the Supported platforms here


https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html

https://download.oracle.com/otn/java/jdk/11.0.15+8/c4e1848573124815b77d6f1843afccb5/jdk-11.0.15_windows-x64_bin.exe

Note: Make sure you set the JAVA_HOME environment variable (on windows). It is the installation path of jdk. E.g. JAVA_HOME=C:\Program Files\Java\jdk-11.0.15


https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.62/bin/apache-tomcat-9.0.62-windows-x64.zip

Note: Make sure ports 8005, 8080, 8443, AJP port 8009 are open and not in use already. These are default ports used for tomcat. If you have these ports already in use, make sure you change the ports accordingly in <TOMCAT_INSTALLATION>/conf/server.xml.


Download ActiveMQ v5.16.2 binary package (used for transformation service):







Alternative options (ImageMagick notoriously removes the specific versions and shows only latest versions):


Download Exiftool v12.25:

https://artifacts.alfresco.com/nexus/content/groups/public/org/exiftool/image-exiftool/12.25/image-exiftool-12.25.tgz


Download and Install PostgreSQL 13.x:

Alternatively you can also download the binary package and extract it. No installation needed. It is useful if you have trouble doing installation on Windows 10.

Download PostgreSQL 13.x binary

Note: Make sure port 5432 is open and not already in use. Port 5432 is default for postgres to get db connection. If you have this port already in use, make sure you select a different port and use the same while configuring alfresco-global.properties.


Optional Alfresco module packages (amps)-Useful for admins/developers:

https://repo1.maven.org/maven2/org/orderofthebee/support-tools/support-tools-repo/1.1.0.0/support-tools-repo-1.1.0.0-amp.amp

https://repo1.maven.org/maven2/org/orderofthebee/support-tools/support-tools-share/1.1.0.0/support-tools-share-1.1.0.0-amp.amp

https://github.com/abhinavmishra14/js-console/releases/download/0.7.3/javascript-console-platform-0.7.3.amp

https://github.com/abhinavmishra14/js-console/releases/download/0.7.3/javascript-console-share-0.7.3.amp


*** Updated this post to provide prerequisites to install ACS 7.3.x and other related components. All the below given steps should be pretty much the same. You can find more details here ***


Now, we have completed all the prerequisites. Let’s move forward with setup.

Follow the steps given below:

Assuming you have already installed Postgres, launch “pgAdmin4” from your postgres install location <PostgresInstallLocation>\PostgreSQL\13\pgAdmin 4\bin\pgAdmin4.exe

In my case: C:\PostgreSQL\13\pgAdmin 4\bin\pgAdmin4.exe

  • Create a new user named “alfresco” and set a password which will be used by alfresco content service to connect to database. Here we will be using username as “alfresco” and password “alfresco”.
  • Create a new database named : “alfresco”, make sure you select default encoding which is “utf8”.
  • Grant all permissions for user “alfresco” on database “alfresco”.
  • Alternatively, you can open the query tool and execute following SQL queries:
create role alfresco LOGIN password 'alfresco';

create database alfresco encoding 'utf8';

grant all on database alfresco to alfresco;

Prepare acs7.2 setup directory structure:

Create directory structure as shown below on your windows drive (e.g. C:\):




You can create the same structure anywhere else, make sure all the config paths are mapped accordingly. For this post all the setup and configurations will be done in C:\ drive. You can also clone this git repo and copy the pre-existing structure if that helps.

Configure ACS repository:


Note: Make sure ports 8005, 8080, 8443, AJP port 8009 are open and not in use already. These are default ports used for tomcat. If you have these ports already in use, make sure you change the ports accordingly in <TOMCAT_INSTALLATION>/conf/server.xml.

Assuming you have already downloaded the distribution packages from download locations provided above. Use the below given steps to setup and configure alfresco-content-services-community-distribution-7.2.0.1

  • Set ALF_HOME environment variable, this will be helpful for alfresco scripts such as apply_amps.bat, clean_tomcat.bat etc. to work properly. You always have option to manually change the paths in these files as needed. (Optional step)
    • ALF_HOME=C:\alfresco-community72
Keystore configuration:
    • Copy contents from “C:\Downloads\alfresco-content-services-community-distribution-7.2.0.1\keystore” into “C:\alfresco-community72\alf_data\keystore

             Following files will be copied:

      • CreateSSLKeystores.txt -> Contains instructions to create an RSA public/private key pair for the repository with a certificate that has been signed by the Alfresco Certificate Authority (CA).
      • readme.txt -> Text file containing information about other files in a directory.
      • generate_keystores.bat -> Windows batch file for generating secure keys for SOLR communication.
    Note: Useful to generate secure keys for SOLR and Alfresco communication (we are not setting up SSL here so we are just copying the files but we will not be using it for now). 
    Visit here for more info.

    • Copy contents from “C:\Downloads\alfresco-content-services-community-distribution-7.2.0.1\amps” into “C:\alfresco-community72\amps”. We will be installing alfresco module packages (amps) at later stage.
              • alfresco-share-services.amp -> Alfresco share service module containing extensions for search, datalist, sample sites patch etc.
            Note: alfresco-share-services.amp installation is mandatory otherwise several functionalities including share search may not work. And you will also see following warning when you login to share: Alfresco is running without Share Services. See your System Administrator for more details.

              • If you have downloaded the additional amps (optional) given below, then copy them to amps/amps_share directories as appropriate. For this post we will be using these amps:
              • javascript-console-share-0.7.amp (Updated with ACS7 Compatibility bugfix)
                • Copy 'javascript-console-share' amp to "C:\alfresco-community72\amps_share" directory

            • Copy the contents from “C:\Downloads\alfresco-content-services-community-distribution-7.2.0.1\bin” into “C:\alfresco-community72\bin” directory
              • Following files will be copied:
                • alfresco-mmt.jar -> Alfresco Module Management Tool (MMT), A java library which supports alfresco module package installation/uninstallation/listing and preview operations etc.
                • apply_amps.bat -> Utility to install amps kept in “amps” and “amps_share” directory. It will install amps related to alfresco on alfresco.war (keeps the backup of original war file) and amps related to share on share.war (keeps the backup of original war file) For more details visit: https://docs.alfresco.com/content-services/latest/install/zip/amp/
                • clean_tomcat.bat -> Shell script for cleaning out temporary application server files from previous installations.
                • Win32NetBIOS.dll -> DLL handles the connection between the native CIFS server and Alfresco Content Services.
                • Win32NetBIOSx64.dll -> DLL handles the connection between the native CIFS server and Alfresco Content Services.
                • Win32Utils.dll -> DLL handles the connection between the native CIFS server and Alfresco Content Services.
                • Win32Utilsx64.dll -> DLL handles the connection between the native CIFS server and Alfresco Content Services.

            Copy licenses:
            • Copy the contents from “C:\Downloads\alfresco-content-services-community-distribution-7.2.0.1\licenses” into “C:\alfresco-community72\licenses” directory. It contains files that have information about license terms used by alfresco including all third party licenses.

            • Copy the contents from “C:\Downloads\alfresco-content-services-community-distribution-7.2.0.1\web-server\conf” into “C:\alfresco-community72\tomcat\conf” folder. 'conf' directory contains application specific context files for alfresco and share.
            • Copy the contents from “C:\Downloads\alfresco-content-services-community-distribution-7.2.0.1\web-server\lib\” into “C:\alfresco-community72\tomcat\lib\” folder. 'lib' directory contains the PostgreSQL JDBC jar file (postgresql-42.3.2.jar).
            • Copy the contents from “C:\Downloads\alfresco-content-services-community-distribution-7.2.0.1\web-server\shared\classes” into “C:\alfresco-community72\tomcat\shared\classes\” folder. 'shared' directory includes the Alfresco Content Services configuration files:
              • \classes\alfresco-global.properties.sample -> Sample alfresco global properties file, which is used for configuration properties.
              • \classes\alfresco -> Contains the directory structure for the configuration override files, including the extension, and web-extension directories.

            Encryption keystore config: 

              • Create a new directory named 'keystore' under 'C:\alfresco-community72\tomcat\shared\classes\alfresco\extension' directory. We need to copy the 'metadata-keystore' related configs in this newly created directory.
              • Copy the 'metadata-keystore' directory from 'C:\Downloads\alfresco-content-services-community-distribution-7.2.0.1\keystore\metadata-keystore' to 'C:\alfresco-community72\tomcat\shared\classes\alfresco\extension\keystore' directory.
            Note: The alfresco's keystore directory (dir.keystore) config location has changed from previous version. 'dir.keystore' property in alfresco-global.properties will now be something like: 
            'dir.keystore=C:/alfresco-community72/tomcat/shared/classes/alfresco/extension/keystore'
            Metadata encryption keys needs to be now set using 'JAVA_TOOL_OPTIONS' java environment variable. For example:
             
            JAVA_TOOL_OPTIONS="-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=C:\alfresco-community72\tomcat\shared\classes\alfresco\extension\keystore\metadata-keystore\keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede"

            We will take a look at it later in this post. For more info visit: https://docs.alfresco.com/content-services/latest/admin/security/#alfresco-keystore-configuration 
            • Delete all files/folders from “C:\alfresco-community72\tomcat\webapps”.
            • Copy the contents from “C:\Downloads\alfresco-content-services-community-distribution-7.2.0.1\web-server\webapps” into “C:\alfresco-community72\tomcat\webapps\” folder.
              • Following files will be copied:
                • alfresco.war -> Alfresco repository web application.
                • share.war -> Share interface web application.
                • ROOT.war -> Application for the server root, also contains additional code/setup for handling alfresco office services module (alfresco-office-services). Alfresco Office Services (AOS) allow you to access Alfresco Content Services directly from all your Microsoft Office applications. We will not be installing this module since SSL is a mandatory enablement for this module.
                • _vti_bin.war -> App to help and support AOS module.
            • Delete all files/folders from “C:\alfresco-community72\tomcat\work\Catalina\localhost” if there are any.
            • Open and edit server.xml file which can be found under: “C:\alfresco-community72\tomcat\conf” directory [Full path: C:\alfresco-community72\tomcat\conf\server.xml]:
              • Find Connector with port "8080”.
              • Add the URIEncoding and maxHttpHeaderSize attributes.
              • Add the enableLookups, xpoweredBy and server attributes. (Optional Attributes for Tomcat 8.x and later)
                • Set xpoweredBy attribute to true to cause Tomcat to advertise support for the Servlet specification using the header recommended in the specification. The default value is false.
                • Set enableLookups to true if you want calls to request.getRemoteHost() to perform DNS lookups in order to return the actual host name of the remote client. Set to false to skip the DNS lookup and return the IP address in String form instead (thereby improving performance). By default, DNS lookups are disabled.
                • Setting server to true, overrides the server header for the http response. If set, the value for this attribute overrides any Server header set by a web application. If not set, any value specified by the application is used. If the application does not specify a value then no Server header is set.
            <Connector port="8080" protocol="HTTP/1.1"
             URIEncoding="UTF-8" connectionTimeout="20000"
             maxHttpHeaderSize="32768"
             redirectPort="8443" enableLookups="false" xpoweredBy="false" server="AlfrescoECM"/>

            Tomcat uses ISO-8859-1 character encoding when decoding URLs that are received from a browser. This can cause problems when creating, uploading, and renaming files with international characters. By default, Tomcat uses an 8 KB header buffer size, which might not be large enough for the Kerberos authentication protocol. We need to increase this buffer size.         

            Update AJP Connector config you are planning to use it. By default it is commented in tomcat server.xml, make sure you add URIEncoding attribute to the config if you are planning to use it. This port is used when configuring external authentication. 

            See here for more details: 

            <Connector port="8009" address="::1" URIEncoding="UTF-8" protocol="AJP/1.3" redirectPort="8443" xpoweredBy="false"/>

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

            Note: If you have used alternative names for the directories, you must specify these names in the shared.loader property.

            • We need to add JAVA_TOOL_OPTIONS java environment variable for metadata encryption, we had copied the keystore under 'C:\alfresco-community72\tomcat\shared\classes\alfresco\extension\keystore\metadata-keystore' directory already. Check the steps above. Open and edit C:\alfresco-community72\tomcat\bin\catalina.bat . Add the variable after JAVA_OPTS in catalina.bat file. If you add this variable at the end of the file, it is not getting recognized for some reason. So make sure you add the variavle before JAVA_OPTS as mentioned above. See the example screenshot below for reference or check here.
            rem ACS72 Custom changes [Start] ############## 
            set "JAVA_TOOL_OPTIONS=-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=C:\alfresco-community72\tomcat\shared\classes\alfresco\extension\keystore\metadata-keystore\keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede"
            rem ACS72 Custom changes [End] ##############

            Example: 




            • Rename “C:\alfresco-community72\tomcat\shared\classes\alfresco-global.properties.sample” to “alfresco-global.properties
            • Open and edit “C:\alfresco-community72\tomcat\shared\classes\alfresco-global.properties” and add the following configuration properties:
            • Add the “dir.root” property as path to alf_data folder and add 'dir.keystore' property to the above copied encryption keystore path (see here)
            dir.root=C:/alfresco-community72/alf_data
            dir.keystore=C:/alfresco-community72/tomcat/shared/classes/alfresco/extension/keystore
            alfresco.context=alfresco
            alfresco.host=${localname}
            alfresco.port=8080
            alfresco.protocol=http
            share.context=share
            share.host=${localname}
            share.port=8080
            share.protocol=http
              • Add the database connection properties which alfresco will use to create a JDBC connection with db. Use the db name and credentials when we prepared the database.
            db.driver=org.postgresql.Driver
            db.username=alfresco
            db.password=alfresco
            db.name=alfresco
            db.url=jdbc:postgresql://localhost:5432/${db.name}
            db.pool.max=275
            db.pool.validate.query=SELECT 1
              • Add the server mode property, leave it default to ‘UNKNOWN’.
            system.serverMode=UNKNOWN
                • Add the alfresco rmi services port and host properties.
              alfresco.rmi.services.port=50500
              alfresco.rmi.services.host=0.0.0.0



              To setup Local transformation service, we need to install Imagemagick, Libreoffice and AlfrescoPDFRenderer locally and executables will be used by transformation service spring boot application.

              • Install imagemagick in the directory setup as per the structure given above. E.g. install ImageMagick-7.1.0 in C:\alfresco-community72\imagemagick directory (use custom installation option to select the install directory). Alternatively you can download the binary package and extract the image magic binaries in the folder given above as per your choice.

               

              • Install libreoffice in the directory setup as per the structure given above. E.g. install LibreOffice_7.0.6.2 in C:\alfresco-community72\libreoffice directory (use custom installation option to select the install directory).

              • Install ActiveMQ, get the activemq binary package (apache-activemq-5.16.2-bin.zip) downloaded as per the steps given above and extract its contents directly under activemq directory. For example:  C:\alfresco-community72\activemq directory. 

              Note: Make sure ports 61616, 5672, 61613, 1883, 61614 and 8161 are open and not in use already. These are default ports used for activemq. If you have these ports already in use, make sure you change the ports accordingly in <AMQ_INSTALLATION>/conf/activemq.xml and jetty.xml as needed.

              Alfresco PDF Renderer Setup:

              Assuming you have already downloaded the alfresco-pdf-renderer package from download locations provided above. Use the below given steps to install alfresco-pdf-renderer.


              Exiftool Setup:

              Seems like TIKA part of Local transformation service app is looking for exiftool to be available locally. It is used by TIKA for extracting image metadata if TIKAAuto metadata extraction is enabled. I noticed an error when 'exiftool-parser' was invoked by TIKA. So we will download and copy the exiftool under alfresco installation and export its path in environment PATH variable. Assuming you have already downloaded the exiftool package from download locations provided above. Use the below given steps to install exiftool

              • Create a new directory named 'exiftool' under "C:\alfresco-community72\"
              • Extract “C:\Downloads\image-exiftool-12.25.tgz", then again extract from "Image-ExifTool-12.25.tar" and the  copy the executables to "C:\alfresco-community72\exiftool"
              • Set the exiftool directory to Windows PATH Environment Variable:
                %ALF_HOME%\exiftool



                Open and edit “C:\alfresco-community72\tomcat\shared\classes\alfresco-global.properties
                • Enable local transformation service (its enabled by default but just FYI here):
                localTransform.core-aio.url=http://localhost:8090/

                #This property is default true, here it it for information purpose.
                local.transform.service.enabled=true
                • Add the activemq URL property and enabled messaging subsystem. It will be used when you setup transformation service. Note: From ACS 7.3 ActiveMQ is optional unless you need to use out of process extensions for publishing repo events. (repo.event2). 
                messaging.broker.url=tcp://localhost:61616

                #This property is default true, here it it for information purpose.
                messaging.subsystem.autoStart=true

                #If you have setup username and password for AMQ, then set the below properties. In my case I have kept default admin/admin
                messaging.broker.username=admin
                messaging.broker.password=admin

                Note (Only applicable to Enterprise Edition, For community edition local transform service is only available option and must be enabled):

                You can optionally disable local.transform service in alfresco Docker Container and enable transform service (asynchronous). Local Transform Service or Transform Service (supports only asynchronous requests) can be enabled or disabled independently of each other. Please keep in mind that when your deployment has Share and SOLR (think of full text indexing), or both then you'll need to have local.transform and transform service (asynchronous) enabled and running. The Repository will try to transform content using the Transform Service via the T-Router if possible and fall back to direct Local Transform Service. Share makes use of both, so functionality such as preview will be unavailable if local.transform service is disabled.

                Set transformation core aio launcher and steps to launch:

                Assuming you have downloaded the transform-core-aio-boot jar file already as per instruction given above
                • Copy the downloaded jar file to ''C:\alfresco-community72\bin\" directory.

                Post setup of activemq, imagemagick, libreoffice, alfresco-pdf-renderer and transform core all in one boot app jar file, you can start transform-core-aio boot app with following java command with given params:

                
                
                java -DPDFRENDERER_EXE="<alfresco-pdf-renderer_installation_dir>/alfresco-pdf-renderer"
                -DLIBREOFFICE_HOME="<libreoffice_installation_dir>"
                -DIMAGEMAGICK_ROOT="<imagemagick_installation_dir>"
                -DIMAGEMAGICK_DYN="<imagemagick_installation_dir>/lib"
                -DIMAGEMAGICK_EXE="<imagemagick_installation_dir>/convert"
                -DIMAGEMAGICK_CODERS="<imagemagick_installation_dir>/modules/coders"
                -DIMAGEMAGICK_CONFIG="<imagemagick_installation_dir>"
                -DACTIVEMQ_URL=tcp://server:61616
                -jar <path_to_tranform-core-aio-jar>/alfresco-transform-core-aio-boot-x.y.z.jar


                Example (see here as well):

                java -DPDFRENDERER_EXE="C:\alfresco-community72\alfresco-pdf-renderer\alfresco-pdf-renderer.exe" -DLIBREOFFICE_HOME="C:\alfresco-community72\libreoffice" -DIMAGEMAGICK_ROOT="C:\alfresco-community72\imagemagick" -DIMAGEMAGICK_DYN="C:\alfresco-community72\imagemagick\lib" -DIMAGEMAGICK_CODERS="C:\alfresco-community72\imagemagick\modules\coders" -DIMAGEMAGICK_CONFIG="C:\alfresco-community72\imagemagick" -DIMAGEMAGICK_EXE="C:\alfresco-community72\imagemagick\convert.exe" -DACTIVEMQ_URL=tcp://localhost:61616 -jar C:\alfresco-community72\bin\alfresco-transform-core-aio-boot-2.5.7.jar

                Check the output to ensure that it starts successfully. The all-in-one core T-Engine combines the five T-Engines (i.e. LibreOffice, ImageMagick, Alfresco PDF Renderer, Tika, and Misc) into one single engine. All functionality that’s available in the five T-Engines is available in the all-in-one core T-Engine. The command-line options provide the paths to the installation locations and the URL of the messaging broker. 

                If local transformation service is correctly setup as per above instructions and starts up successfully, then you can also access the local transformation service at http://localhost:8090 and play around with samples.




                The jar file we are using above is with OOTB functionalities. As many of you know that most  transformation service related classes are moved to alfresco-transform-core project. 

                Take an example of metadata extractors, earlier when you had to override metadata extractor configuration such as for PdfBoxMetadataExtracter, TikaAutoMetadataExtractor, PoiMetadataExtracter etc., you can define spring beans and override them by providing custom <metadata Extractor>.properties file on the repository side itself as legacy transformation service was still within repository. See example here up to ACS6.x. 

                Now, there is no more legacy transformation service available, you have to build custom docker image with your customization (if you are using containers) or build jar file with your custom changes to launch Local transformation service (if setup is using distribution package or ansible).

                Documentation here indicates that, you can directly update the properties here and build customized jar/docker images and use it. I haven't tried myself yet, but do checkout the pointers given above.
                 
                Some useful posts pertaining to transformation service for you to refer:
                How to use local transformation service  
                Local vs Legacy Transformation Service 

                Metadata Extractors and Embedders Extension Point

                 

                You can also create a custom t-engine as well, learn about the detailed steps here: 

                • Creating-a-t-engine: https://github.com/Alfresco/acs-packaging/blob/master/docs/creating-a-t-engine.md 
                • Developing-a-new-t-engine: https://docs.alfresco.com/content-services/latest/develop/repo-ext-points/content-transformers-renditions/#developing-a-new-t-engine

                 

                Update alfresco-global.properties to add other misc. properties:

                    • Add property for email notification on invite, it is by default disabled.
                    notification.email.siteinvite=false
                      • Add the license location property.
                      ### License location ###
                      dir.license.external=C:/alfresco-community72
                      • Add following properties related to security, smart folder and JMX. All values are default out-of-the-box
                      security.anyDenyDenies=false
                      smart.folders.enabled=false
                      alfresco.jmx.connector.enabled=false

                      • Enable logging so that you can configure any custom loggers or change/update log levels (Optional)
                        • Go to C:\alfresco-community72\tomcat\shared\classes\alfresco\extension\ folder and rename “custom-log4j.properties.sample” to “custom-log4j.properties
                        • You can change the log levels as per your need.

                      • Mandatory Amps:
                        • alfresco-share-services.amp” amp is mandatory for alfresco.war
                      Note: This amp installation is mandatory otherwise several functionalities including share search may not work. And you will also see following warning when you login to share: Alfresco is running without Share Services. See your System Administrator for more details

                      • Optional Amps: As part of this installation, we will be installing some optional amps which will be useful for admins/developers that can help in debugging and administration. In a previous step above we downloaded the amps and copied to appropriate directories.

                      For more details visit: 
                                        For more details visit (This is forked repo containing acs7 fixes):
                      https://github.com/abhinavmishra14/js-console

                        • Execute 'apply_amps.bat' script to apply amps, it will install amps copied under C:\alfresco-community72\amps and C:\alfresco-community72\amps_share directories to alfresco.war and share.war.
                          • Open windows command prompt
                          • Go to C:\alfresco-community72\bin path
                          • Execute the 'apply_amps.bat'
                          • After amps are install, you can choose to remove the backup files created by apply_amps.bat tool.
                          • You would see following output as result of executing 'apply_amps.bat':
                      This script will apply all the AMPs in C:\alfresco-community72\amps to the alfresco.war and share.war files in C:\alfresco-community72\tomcat\webapps
                      Press control-c to stop this script . . .
                      Press any key to continue . . .
                      Module 'ootbee-support-tools-repo' installed in 'C:\alfresco-community72\tomcat\webapps\alfresco.war'
                         -    Title:        OOTBee Support Tools - Repository Module
                         -    Version:      1.1.0.0.9999999999
                         -    Install Date: Sun May 15 00:07:59 EDT 2022
                         -    Description:   Addon to enhance the Repository and Share Admin Console/Tools with new tools and make tools previously exclusive to the Enterprise Edition addon Alfresco Support Tools available in Community Edition
                      Module 'de.fme.alfresco.JavascriptConsole-repo' installed in 'C:\alfresco-community72\tomcat\webapps\alfresco.war'
                         -    Title:        Javascript Console Alfresco Platform/Repository JAR Module
                         -    Version:      0.7.3
                         -    Install Date: Sun May 15 00:07:58 EDT 2022
                         -    Description:   Administration console module to execute arbitrary javascript code.
                      Module 'alfresco-share-services' installed in 'C:\alfresco-community72\tomcat\webapps\alfresco.war'
                         -    Title:        Alfresco Share Services AMP
                         -    Version:      14.147
                         -    Install Date: Sun May 15 00:07:58 EDT 2022
                         -    Description:   Module to be applied to alfresco.war, containing APIs for Alfresco Share
                      Module 'support-tools-share' installed in 'C:\alfresco-community72\tomcat\webapps\share.war'
                         -    Title:        OOTBee Support Tools - Share Module
                         -    Version:      1.1.0.0.9999999999
                         -    Install Date: Sun May 15 00:08:07 EDT 2022
                         -    Description:   Addon to enhance the Repository and Share Admin Console/Tools with new tools and make tools previously exclusive to the Enterprise Edition addon Alfresco Support Tools available in Community Edition
                      Module 'de.fme.alfresco.JavascriptConsole-share' installed in 'C:\alfresco-community72\tomcat\webapps\share.war'
                         -    Title:        Javascript Console Alfresco Share JAR Module
                         -    Version:      0.7.3
                         -    Install Date: Sun May 15 00:08:05 EDT 2022
                         -    Description:   Adminstration console module to execute arbitrary javascript code.
                      .
                      About to clean out tomcat/webapps/alfresco directory and temporary files...
                      Press any key to continue . . .



                      • Make sure you update the "repository-url" to point to the alfresco host and port, in case you are setting up alfresco and share on different servers. Default values are "localhost" and "8080". We are setting up both ACS and Share on same host so we will leave it default.
                      <!--
                         If set, will present a WebDAV link for the current item on the Document and Folder details pages.
                         Also used to generate the "View in Alfresco Explorer" action for folders.
                      -->
                      <repository-url>http://localhost:8080/alfresco</repository-url>

                      • Make sure you update the share "Remote" configuration to point to the alfresco host and port, in case you are setting up alfresco and share on different servers. Default values are "localhost" and "8080". We are setting up both ACS and Share on same host so we will leave it default.
                      <config evaluator="string-compare" condition="Remote">
                            <remote>
                               <endpoint>
                                  <id>alfresco-noauth</id>
                                  <name>Alfresco - unauthenticated access</name>
                                  <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
                                  <connector-id>alfresco</connector-id>
                                  <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
                                  <identity>none</identity>
                               </endpoint>
                      
                               <endpoint>
                                  <id>alfresco</id>
                                  <name>Alfresco - user access</name>
                                  <description>Access to Alfresco Repository WebScripts that require user authentication</description>
                                  <connector-id>alfresco</connector-id>
                                  <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
                                  <identity>user</identity>
                               </endpoint>
                      
                               <endpoint>
                                  <id>alfresco-feed</id>
                                  <name>Alfresco Feed</name>
                                  <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
                                  <connector-id>http</connector-id>
                                  <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
                                  <basic-auth>true</basic-auth>
                                  <identity>user</identity>
                               </endpoint>
                               
                               <endpoint>
                                  <id>alfresco-api</id>
                                  <parent-id>alfresco</parent-id>
                                  <name>Alfresco Public API - user access</name>
                                  <description>Access to Alfresco Repository Public API that require user authentication.
                                               This makes use of the authentication that is provided by parent 'alfresco' endpoint.</description>
                                  <connector-id>alfresco</connector-id>
                                  <endpoint-url>http://localhost:8080/alfresco/api</endpoint-url>
                                  <identity>user</identity>
                               </endpoint>
                            </remote>
                         </config>
                      

                      For more details see: 

                        • There is a known issue with share where user search doesn't work. For more info see these issues (The issue still persist in Share 7):
                        • Find the <show-authorization-status>true</show-authorization-status> tag and change the value to 'false', in the config having condition as "users".
                        • If the config not present and you can't find the '<show-authorization-status>' element then add the following config and keep the value for '<show-authorization-status>' as 'false'. Update C:\alfresco-community72\tomcat\shared\classes\alfresco\web-extension\share-config-custom.xmlAdd below given config where <show-authorization-status> value should be false.

                      Update C:\alfresco-community72\tomcat\shared\classes\alfresco\web-extension\share-config-custom.xml
                      <config evaluator="string-compare" condition="Users" replace="true">
                              <users>
                                  <!-- minimum length for username and password -->
                                  <username-min-length>2</username-min-length>
                                  <password-min-length>3</password-min-length>
                                  <!-- Default value is 'true', setting it to 'false' to fix the user search issue. -->
                                  <show-authorization-status>false</show-authorization-status>
                              </users>
                              <!-- This enables/disables the Add External Users Panel on the Add Users page. -->
                              <enable-external-users-panel>false</enable-external-users-panel>
                       </config>


                      Setup and Configure ASS (Alfresco Search Services):


                      Assuming you have already downloaded the distribution packages from download locations provided above. Use the below given steps to setup and configure alfresco-search-services-2.0.3.5

                      • Unzip the “alfresco-search-services-2.0.3.5.zip” package which we downloaded initially.
                      • Copy the extracted folder “alfresco-search-services” to e.g. C:\ drive. Full path will be “C:\alfresco-search-services
                      • Open “C:\alfresco-community72\tomcat\shared\classes\alfresco-global.properties” and add the following configuration properties:
                      solr.host=localhost
                      solr.port=8983
                      solr.secureComms=secret #Possible values are: secret, https
                      solr.sharedSecret=secret
                      solr.base.url=/solr
                      index.subsystem.name=solr6

                      Note: We are setting up solr6 without SSL and with shared secret, hence using non SSL port and setting secureComms property as secret. 

                      • We are enabling the multi language search support, Its optional if you wish to enable it. By default it is disabled. Open “C:\alfresco-search-services\solrhome\conf\shared.properties” and update following:
                      alfresco.cross.locale.datatype.0={http://www.alfresco.org/model/dictionary/1.0}text
                      alfresco.cross.locale.datatype.1={http://www.alfresco.org/model/dictionary/1.0}content
                      alfresco.cross.locale.datatype.2={http://www.alfresco.org/model/dictionary/1.0}mltext
                      • We are enabling search suggestions for some properties, it is disabled by default. This feature is optional if you wish to enable it. You can also add additional properties down the line. Open “C:\alfresco-search-services\solrhome\conf\shared.properties” and update following:
                      alfresco.suggestable.property.0={http://www.alfresco.org/model/content/1.0}name
                      alfresco.suggestable.property.1={http://www.alfresco.org/model/content/1.0}title 
                      alfresco.suggestable.property.2={http://www.alfresco.org/model/content/1.0}description 
                      alfresco.suggestable.property.3={http://www.alfresco.org/model/content/1.0}content

                      More details on shared.properties can be found here: https://docs.alfresco.com/search-services/latest/install/options/

                      set SOLR_SOLR_HOST=localhost
                      set SOLR_SOLR_PORT=8983
                      set SOLR_SOLR_BASEURL=/solr
                      set SOLR_ALFRESCO_HOST=localhost
                      set SOLR_ALFRESCO_PORT=8080
                      set SOLR_ALFRESCO_BASEURL=/alfresco
                      
                      :: Since we are setting up with no SSL and shared secret, this property need to be set to secret. Default is https
                      set SOLR_ALFRESCO_SECURECOMMS=secret
                      
                      rem ACS72 shared secret changes [Start] ##############
                      set JAVA_TOOL_OPTIONS=-Dalfresco.secureComms.secret=secret
                      
                      rem ############ OR Instead of JAVA_TOOL_OPTIONS, you can also export SOLR_OPTS , example below. Make sure you dont export both###
                      rem set SOLR_OPTS=-Dalfresco.secureComms.secret=secret
                      
                      rem ACS72 shared secret changes [End] ##############
                      • You can also set SOLR_HOME variable in solr.in.cmd (if you see error like  ERROR: Solr home directory C:\alfresco-search-services must contain solr.xml,  then this setting is must) 
                      set SOLR_HOME=C:\alfresco-search-services\solrhome

                      Alternatively you can set the properties in “C:\alfresco-search-services\solrhome\templates\rerank\conf\solrcore.properties” file as well before cores are created. If you have both alfresco and archive cores already created use the environment variable based approach. Example:

                      alfresco.host=localhost
                      alfresco.port=8080
                      alfresco.port.ssl=8443
                      alfresco.baseUrl=/alfresco
                      # secret, https
                      alfresco.secureComms=secret

                      For all the externalized search service configurations (environment variables), visit: https://docs.alfresco.com/search-services/latest/config/#search-services-externalized-configuration 

                      • Starting and stopping solr6 (aka alfresco search service) instructions.
                      Starting Solr6: 
                      .\solr\bin\solr.cmd start -a "-Dcreate.alfresco.defaults=alfresco,archive"

                      The command line param, -a passes additional JVM parameters, e.g., system properties using -D.

                      Note that, -Dcreate.alfresco.defaults=alfresco,archive command automatically creates the alfresco and archive cores. So you need to pass this param only on first/initial startup of solr in order to allow cores being created and configured.

                      Once Search Services is up and running, you should see a message similar to the following:

                        Startup message: 
                        Waiting up to 180 seconds to see Solr running on port 8983 [\]  
                        Started Solr server on port 8983 (pid=443218). Happy searching!

                        Stopping Solr6: 
                        .\solr\bin\solr.cmd stop -p 8983
                        
                        Or
                        
                        .\solr\bin\solr.cmd stop -all
                        • Configure solr log, The logs are stored in the C:\alfresco-search-services\logs\solr.log file, by default. This can be configured in solr.in.cmd using SOLR_LOGS_DIR. This is optional setup. We are keeping default settings
                        set SOLR_LOGS_DIR=..\..\logs
                        set LOG4J_CONFIG=file:!SOLR_LOGS_DIR!\log4j.properties
                        {
                          "authentication" : {
                            "class": "org.alfresco.solr.security.SecretSharedAuthPlugin"
                          }
                        }
                        • Verify the SOLR Admin UI. Use the URL below to launch SOLR Admin UI and validate the status and cores, Solr shared secret mode doesn't include authentication by default, but it will require to add the shared secret word ("secret" we have used above) in HTTP Header requests using by default X-Alfresco-Search-Secret property. Accessing SOLR Web Console requires using a Browser plugin to add this header to the HTTP Request.
                        http://localhost:8983/solr (Pass X-Alfresco-Search-Secret http header with shared secret value)
                        http://localhost:8983/solr/#/alfresco --> To check alfresco core status

                          • You will see following warning when you try to access the solr admin console without the shared secret header. 
                          • You can use the modheader browser extension to pass the header info, for example:




                        Now we are done with all the setup and config changes. Here are full “alfresco-global.properties”, “custom-log4j.properties”, “shared.properties” , “solr.in.cmd”, "solrcore.properties" files for reference:



                        ###############################
                        ## Common Alfresco Properties #
                        ###############################
                        
                        
                        dir.root=C:/alfresco-community72/alf_data
                        dir.contentstore=${dir.root}/contentstore
                        dir.contentstore.deleted=${dir.root}/contentstore.deleted
                        
                        
                        #
                        # Encryption properties
                        #
                        # default keystores location is now this, it was changed from previous versions
                        # for more details see: https://docs.alfresco.com/content-services/latest/admin/security/#alfresco-keystore-configuration
                        dir.keystore=C:/alfresco-community72/tomcat/shared/classes/alfresco/extension/keystore
                        
                        #
                        # URL Generation Parameters (The ${localname} token is replaced by the local server name)
                        #-------------
                        alfresco.context=alfresco
                        alfresco.host=${localname}
                        alfresco.port=8080
                        alfresco.protocol=http
                        share.context=share
                        share.host=${localname}
                        share.port=8080
                        share.protocol=http
                        
                        ### database connection properties ###
                        db.driver=org.postgresql.Driver
                        db.username=alfresco
                        db.password=alfresco
                        db.name=alfresco
                        db.url=jdbc:postgresql://localhost:5432/${db.name}
                        # Note: your database must also be able to accept at least this many connections.  Please see your database documentation for instructions on how to configure this.
                        db.pool.max=275
                        db.pool.validate.query=SELECT 1
                        
                        # The server mode. Set value here
                        # UNKNOWN | TEST | BACKUP | PRODUCTION
                        system.serverMode=UNKNOWN
                        
                        ### RMI registry port for JMX ###
                        alfresco.rmi.services.port=50500
                        
                        # Default value of alfresco.rmi.services.host is 0.0.0.0 which means 'listen on all adapters'.
                        # This allows connections to JMX both remotely and locally.
                        alfresco.rmi.services.host=0.0.0.0
                        
                        #
                        #
                        # Assign individual ports for each service for best performance 
                        # or run several services on the same port. You can even run everything on 50500 if needed.
                        # Select 0 to use a random unused port.
                        #monitor.rmi.service.port=50508
                        
                        
                        ### E-mail site invitation setting ###
                        notification.email.siteinvite=false
                        
                        ### License location ###
                        dir.license.external=C:/alfresco-community72
                        
                        ### Allow extended ResultSet processing
                        security.anyDenyDenies=false
                        
                        ### Smart Folders Config Properties ###
                        smart.folders.enabled=false
                        
                        ### Remote JMX (Default: disabled) ###
                        alfresco.jmx.connector.enabled=false
                        
                        ## AMQ And Transformation services
                        localTransform.core-aio.url=http://localhost:8090/
                        local.transform.service.enabled=true
                        messaging.broker.url=tcp://localhost:61616
                        messaging.subsystem.autoStart=true
                        #If you have setup username and password for AMQ, then set the below properties. In my case I have kept default admin/admin
                        messaging.broker.username=admin
                        messaging.broker.password=admin
                        
                        ################ Solr Search service configurations ###############
                        
                        #
                        # Index Recovery Mode
                        #-------------
                        #index.recovery.mode=AUTO
                        
                        # Set this property unless you have explicitly chosen to expose some repository APIs without authentication
                        solr.host=localhost
                        solr.port=8983
                        #secret, https
                        solr.secureComms=secret
                        solr.sharedSecret=secret
                        solr.base.url=/solr
                        index.subsystem.name=solr6
                        
                        


                        custom-log4j.properties:

                        #Tranformer specific logs
                        log4j.logger.org.alfresco.repo.content.transform.TransformerDebug=info
                        log4j.logger.org.alfresco.util.exec.RuntimeExecBootstrapBean=info
                        log4j.logger.org.alfresco.util.exec.RuntimeExec=info
                        
                        #ScriptLogger
                        log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug
                        
                        #Log for email executer
                        log4j.logger.org.alfresco.repo.action.executer.MailActionExecuter=info
                        
                        #Transaction specific logs
                        log4j.logger.org.alfresco.repo.transaction.RetryingTransactionHelper=info
                        
                        #Solr specific logs
                        log4j.logger.org.alfresco.solr.query.AbstractQParser=debug
                        log4j.logger.org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient=debug
                        
                        #Metadata extractor 
                        log4j.logger.org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter=info
                        log4j.logger.org.alfresco.repo.content.metadata.MetadataExtracterRegistry=info
                        
                        #Thumbnail logs
                        log4j.logger.org.alfresco.repo.thumbnail=info
                        
                        # FTP server debugging
                        log4j.logger.org.alfresco.ftp.protocol=info
                        log4j.logger.org.alfresco.ftp.server=info
                        


                        shared.properties:

                        
                        # Shared Properties file
                        
                        #Host details an external client would use to connect to Solr
                        solr.host=localhost
                        #If not set then solr.port will be the jetty.port
                        #solr.port=8983
                        solr.baseurl=/solr
                        
                        # Properties treated as identifiers when indexed
                        
                        alfresco.identifier.property.0={http://www.alfresco.org/model/content/1.0}creator
                        alfresco.identifier.property.1={http://www.alfresco.org/model/content/1.0}modifier
                        alfresco.identifier.property.2={http://www.alfresco.org/model/content/1.0}userName
                        alfresco.identifier.property.3={http://www.alfresco.org/model/content/1.0}authorityName
                        alfresco.identifier.property.4={http://www.alfresco.org/model/content/1.0}lockOwner
                        
                        # Suggestable Properties
                        alfresco.suggestable.property.0={http://www.alfresco.org/model/content/1.0}name
                        alfresco.suggestable.property.1={http://www.alfresco.org/model/content/1.0}title
                        alfresco.suggestable.property.2={http://www.alfresco.org/model/content/1.0}description
                        alfresco.suggestable.property.3={http://www.alfresco.org/model/content/1.0}content
                        
                        # Data types that support cross locale/word splitting/token patterns if tokenised
                        alfresco.cross.locale.property.0={http://www.alfresco.org/model/content/1.0}name
                        alfresco.cross.locale.property.1={http://www.alfresco.org/model/content/1.0}lockOwner
                        
                        # Data types that support cross locale/word splitting/token patterns if tokenised
                        alfresco.cross.locale.datatype.0={http://www.alfresco.org/model/dictionary/1.0}text
                        alfresco.cross.locale.datatype.1={http://www.alfresco.org/model/dictionary/1.0}content
                        alfresco.cross.locale.datatype.2={http://www.alfresco.org/model/dictionary/1.0}mltext
                        
                        alfresco.model.tracker.cron=0/10 * * * * ? *
                        
                        # Whether path queries are enabled.
                        alfresco.cascade.tracker.enabled=true
                        
                        


                        solr.in.cmd:

                        @echo off
                        
                        REM Increase Java Min/Max Heap as needed to support your indexing / query needs
                        set SOLR_JAVA_MEM=-Xms2g -Xmx2g
                        
                        REM Alfresco configuration. This file is automatically included by solr. You can define your custom settings here
                        set SOLR_OPTS=%SOLR_OPTS% -Dsolr.jetty.request.header.size=1000000 -Dsolr.jetty.threads.stop.timeout=300000 -Ddisable.configEdit=true 
                        
                        REM Location where Solr should write logs to. Absolute or relative to solr start dir
                        set SOLR_LOGS_DIR=..\..\logs
                        set LOG4J_CONFIG=file:!SOLR_LOGS_DIR!\log4j.properties
                        
                        
                        set SOLR_SOLR_HOST=localhost
                        set SOLR_SOLR_PORT=8983
                        set SOLR_SOLR_BASEURL=/solr
                        set SOLR_ALFRESCO_HOST=localhost
                        set SOLR_ALFRESCO_PORT=8080
                        set SOLR_ALFRESCO_BASEURL=/alfresco
                        
                        :: Since we are setting up with no SSL, this property need to be set to secret. Default is https
                        set SOLR_ALFRESCO_SECURECOMMS=secret
                        
                        rem ACS72 shared secret changes [Start] ##############
                        set JAVA_TOOL_OPTIONS=-Dalfresco.secureComms.secret=secret

                        rem ############ OR Instead of JAVA_TOOL_OPTIONS, you can also export SOLR_OPTS , example below. Make sure you dont export both###
                        rem set SOLR_OPTS=-Dalfresco.secureComms.secret=secret
                        
                        rem ACS72 shared secret changes [End] ##############
                        


                        solrcore.properties (Highlighting important properties only):

                        alfresco.host=localhost
                        alfresco.port=8080
                        alfresco.port.ssl=8443
                        alfresco.baseUrl=/alfresco

                        Start and test:


                        There are three services that we need to start one by one in order:

                        • Start ActiveMQ
                          • To start ActiveMQ, you can execute the following:
                            • Open command prompt and execute this command: C:\alfresco-community72\activemq\bin\win64\activemq.bat start
                        • Start localTransformationService
                          • To start Local transformation service, you can execute the following:
                            • Open command prompt and execute this command: java -DPDFRENDERER_EXE="C:\alfresco-community72\alfresco-pdf-renderer\alfresco-pdf-renderer.exe" -DLIBREOFFICE_HOME="C:\alfresco-community72\libreoffice" -DIMAGEMAGICK_ROOT="C:\alfresco-community72\imagemagick" -DIMAGEMAGICK_DYN="C:\alfresco-community72\imagemagick" -DIMAGEMAGICK_CODERS="C:\alfresco-community72\imagemagick\modules\coders" -DIMAGEMAGICK_CONFIG="C:\alfresco-community72\imagemagick" -DIMAGEMAGICK_EXE="C:\alfresco-community72\imagemagick\convert.exe" -DACTIVEMQ_URL=tcp://localhost:61616?timeout=3000 -jar C:\alfresco-community72\bin\alfresco-transform-core-aio-boot-2.5.7.jar
                        • Start DB
                          • To start DB, you can do either of the following:
                            • Use windows services, and start “postgresql-x64-13” service.
                            • Or Open command prompt and execute this command: C:\PostgreSQL\13\bin\pg_ctl.exe start -D “C:\PostgreSQL\13\data"

                        • Start Alfresco
                          • To start Alfresco, you can do either of the following:
                            • Open command prompt and navigate to “C:\alfresco-community72\tomcat\bin” and execute following command: catalina.bat start
                            • Or navigate to “C:\alfresco-community72\tomcat\bin” folder and execute “startup.bat”

                        • Start Solr6
                          • To start SOLR6, use the following command by navigating to “C:\alfresco-search-services\solr\bin” folder via command prompt:
                            • Initial start only: C:\alfresco-search-services\solr\bin\solr.cmd start -a "-Dcreate.alfresco.defaults=alfresco,archive"
                            • Consecutive start command: C:\alfresco-search-services\solr\bin\solr.cmd start

                          Note: See the search service configuration section for more details.

                         

                        I have created this bat file “start.bat”, you can use this to start all services instead of doing one by one.

                        start.bat:


                        @echo off
                        
                        ECHO ################ Starting ACS, DB, Local Transformation Service and Solr Services ##############
                        ECHO.
                        
                        
                        SET ALF_INSTALL_PATH=%1
                        SET SOLR_INSTALL_PATH=%2
                        SET POSTGRES_INSTALL_PATH=%3
                        
                        :init
                        	IF "%~1" == "" (
                        	   SET ALF_INSTALL_PATH=C:\\alfresco-community72
                        	)
                        	
                        	IF "%~2" == "" (
                        		SET SOLR_INSTALL_PATH=C:\\alfresco-search-services
                        	)
                        	
                        	IF "%~3" == "" (
                        		SET POSTGRES_INSTALL_PATH=C:\\PostgreSQL\\13
                        	)
                        
                        	goto startAMQLocal
                        
                        :startAMQLocal
                                echo.
                        	echo Starting Active MQ service ...
                        	start "ActiveMQ" /MIN cmd /c %ALF_INSTALL_PATH%\activemq\bin\win64\activemq.bat start
                        	timeout 10
                                if errorlevel 1 (goto end) else (goto startTrServLocal)
                        	
                        	
                        :startTrServLocal
                            echo.
                        	echo Starting Local transformation service..
                        	start "localTransformationService" java -DPDFRENDERER_EXE="%ALF_INSTALL_PATH%\\alfresco-pdf-renderer\\alfresco-pdf-renderer.exe"^
                        		-DLIBREOFFICE_HOME="%ALF_INSTALL_PATH%\\libreoffice"^
                        		-DIMAGEMAGICK_ROOT="%ALF_INSTALL_PATH%\\imagemagick"^
                        		-DIMAGEMAGICK_DYN="%ALF_INSTALL_PATH%\\imagemagick"^
                        		-DIMAGEMAGICK_CODERS="%ALF_INSTALL_PATH%\\imagemagick\\modules\\coders"^
                        		-DIMAGEMAGICK_CONFIG="%ALF_INSTALL_PATH%\\imagemagick"^
                        		-DIMAGEMAGICK_EXE="%ALF_INSTALL_PATH%\\imagemagick\\convert.exe"^
                        		-DACTIVEMQ_URL=failover:(tcp://localhost:61616)?timeout=3000^
                        		-jar %ALF_INSTALL_PATH%\\bin\\alfresco-transform-core-aio-boot-2.5.7.jar
                        		
                        	timeout 10
                        
                                if errorlevel 1 (goto end) else (goto startDB)
                        	
                        :startDB
                        	echo Starting DB...
                        	:: Using the windows service to start the db.
                        	:: net start postgresql-x64-13
                        	REM You can also use this command, if there is any issue with permission elevation on windows
                        	%POSTGRES_INSTALL_PATH%\bin\pg_ctl.exe restart -D "%POSTGRES_INSTALL_PATH%\data"
                        	if errorlevel 1 (goto end) else (goto startACS)
                        
                        :startACS
                        	echo.
                        	echo Starting ACS...
                        	SET CATALINA_HOME=%ALF_INSTALL_PATH%\tomcat
                        	start "Tomcat" /MIN /WAIT cmd /c %ALF_INSTALL_PATH%\tomcat\bin\catalina.bat start 
                        	if errorlevel 1 (goto end) else (goto startSolr)
                        	
                        :startSolr
                        	echo.
                        	set "initial=false"
                        
                        	:: check if cores exists
                        	echo.
                        	set "initial=false"
                        	CD %SOLR_INSTALL_PATH%\solrhome
                        	:: check if cores exists
                        	
                        	set Exts=alfresco archive
                        	for %%A in (%Exts%) do (
                        	  echo Checking core: %%A
                        	  if not exist %%A\NUL (
                        		echo %%A doesn't exist
                        	    set "initial=true"
                        	  ) else (
                        		echo %%A already exist
                        		set "initial=false"
                        	  )
                        	)
                        
                        	CD %ALF_INSTALL_PATH%
                        	if "%initial%" == "true" (
                        		GOTO startSolrInitial
                        	) else (
                        		GOTO startSolrConsecutive
                        	)
                        
                        :startSolrInitial
                        	echo.
                        	echo Starting SOLR for the first time, alfresco and archive cores will be created...	
                        	start "SOLR6" /MIN /WAIT cmd /c %SOLR_INSTALL_PATH%\solr\bin\solr.cmd start -a "-Dcreate.alfresco.defaults=alfresco,archive"
                        	if errorlevel 1 (goto end)
                        	
                        :startSolrConsecutive
                        	echo.
                        	echo Starting SOLR...
                        	start "SOLR6" /MIN /WAIT cmd /c %SOLR_INSTALL_PATH%\solr\bin\solr.cmd start
                        	if errorlevel 1 (goto end)
                        	
                        
                        :end
                        	echo.
                                echo Exiting..
                        	timeout 10
                        


                        Note: If you see any warning in logs such as "org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/alfresco/templates/org/alfresco/dashboard.ftl] to the cache for web application [/share] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache" or "org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/share] - consider increasing the maximum size of the cache. After eviction approximately [9,411] KB of data remained in the cache." then you can increase the resource case of disable resource caching. Follow the below given steps if you see these warnings:
                        • By default value for resource caching is 10240 kbytes, even when not added to [ALF_HOME]\tomcat\conf\context.xml. so either increase it until you stop seeing the warning or disable it completely.
                        • Make sure you clean the tomcat 'work' (C:\alfresco-community72\tomcat\work\Catalina) directory before restarting the server.

                          <Resources cacheMaxSize="100000" cachingAllowed="true"/>
                          Or disable the caching
                          <Resources cachingAllowed="false" />         
                            • The above configuration is default for tomcat but since for 'alfresco' and 'share' webapps we have cross contexts under '[ALF_HOME]\tomcat\conf\Catalina\localhost\ ' directory.
                            • Make the above given configuration changes in "alfresco.xml" and "share.xml" and clean the tomcat 'work' (C:\alfresco-community72\tomcat\work\Catalina) directory before restarting the server
                          <Context crossContext="true">
                            <Resources cachingAllowed="true" cacheMaxSize="100000">
                              <PostResources base="${catalina.base}/../modules/platform"
                                             className="org.apache.catalina.webresources.DirResourceSet"
                                             webAppMount="/WEB-INF/lib"/>
                            </Resources>
                          </Context>
                          <Context crossContext="true">
                            <Resources cachingAllowed="true" cacheMaxSize="100000">
                              <PostResources base="${catalina.base}/../modules/share"
                                             className="org.apache.catalina.webresources.DirResourceSet"
                                             webAppMount="/WEB-INF/lib"/>
                            </Resources>
                          </Context>

                          Stopping:


                          There are three services that we need to stop one by one in order:

                          • Stop localTransformationService
                            • Kill the process running the service on windows command processor.
                          • Stop Alfresco
                            • To stop Alfresco, you can do either of the following:
                              • Open command prompt and navigate to “C:\alfresco-community72\tomcat\bin” and execute following command: catalina.bat stop
                              • Or navigate to “C:\alfresco-community72\tomcat\bin” folder and execute “shutdown.bat”
                          • Stop DB
                            • To stop DB, you can do either of the following:
                              • Use windows services, and stop “postgresql-x64-11” service.
                              • Or Open command prompt and execute this command: C:\PostgreSQL\13\bin\pg_ctl.exe stop -D “C:\PostgreSQL\13\data"
                          • Stop Solr6
                            • To stop SOLR6, use the following command by navigating to “C:\alfresco-search-services\solr\bin” folder via command prompt:
                              • C:\alfresco-search-services\solr\bin\solr.cmd stop -all
                              • Or C:\alfresco-search-services\solr\bin\solr.cmd stop -p 8983
                          Note: See the search service configuration section for more details.
                          • Stop ActiveMQ
                            • To start ActiveMQ, you can execute the following:
                              • Open command prompt and execute this command: C:\alfresco-community72\activemq\bin\win64\activemq.bat stop
                              • or Kill the process running the service on windows command processor.

                            I have created this bat file “stop.bat”, you can use this to stop all services instead of doing one by one.

                            stop.bat:


                            @echo off
                            
                            ECHO ################ Stopping ACS, DB, Local Transformation Service and Solr Services ##############
                            ECHO.
                            
                            SET ALF_INSTALL_PATH=%1
                            SET SOLR_INSTALL_PATH=%2
                            SET POSTGRES_INSTALL_PATH=%3
                            
                            :init
                            	IF "%~1" == "" (
                            	   SET ALF_INSTALL_PATH=C:\\alfresco-community72
                            	)
                            	
                            	IF "%~2" == "" (
                            		SET SOLR_INSTALL_PATH=C:\\alfresco-search-services
                            	)
                            	
                            	IF "%~3" == "" (
                            		SET POSTGRES_INSTALL_PATH=C:\\PostgreSQL\\13
                            	)
                            	
                            	goto stopTrServLocal
                            
                            :stopTrServLocal
                                    echo.
                            	echo Stopping Local transformation service ...
                            	taskkill /fi "WINDOWTITLE eq localTransformationService"
                            	if errorlevel 1 (goto end) else (goto stopACS)
                            	
                            :stopACS
                            	echo.
                            	echo Stopping ACS from %ALF_INSTALL_PATH% ...
                            	SET CATALINA_HOME=%ALF_INSTALL_PATH%\tomcat
                            	start /MIN /WAIT cmd /c %ALF_INSTALL_PATH%\tomcat\bin\catalina.bat stop
                            	taskkill /fi "WINDOWTITLE eq Tomcat"
                            	taskkill /F /IM soffice.bin
                            	if errorlevel 1 (goto end) else (goto stopDB)
                            
                            :stopDB
                            	echo.
                            	echo Stopping DB from %POSTGRES_INSTALL_PATH% ...
                            	:: Using the windows service to stop the db.
                            	:: net stop postgresql-x64-13
                            	REM You can also use this command, if there is any issue with permission elevation on windows
                            	%POSTGRES_INSTALL_PATH%\bin\pg_ctl.exe stop -D "%POSTGRES_INSTALL_PATH%\data"
                            	if errorlevel 1 (goto end) else (goto stopSolr)
                            	
                            :stopSolr
                            	echo.
                            	echo Stopping SOLR from %SOLR_INSTALL_PATH% ...
                            	start /MIN /WAIT cmd /c %SOLR_INSTALL_PATH%\solr\bin\solr.cmd stop -all
                            	taskkill /fi "WINDOWTITLE eq SOLR6"
                            	if errorlevel 1 (goto end) else (goto stopAMQLocal)
                            
                            :stopAMQLocal
                                    echo.
                            	echo Stopping Active MQ service ...
                            	taskkill /F /IM wrapper.exe
                            	taskkill /fi "WINDOWTITLE eq ActiveMQ"
                                    if errorlevel 1 (goto end)
                            	
                            :end
                                echo.
                                echo Exiting..
                                timeout 10
                            


                            All the structure and updated files are available here for reference:

                            https://github.com/abhinavmishra14/alfresco7-solr-localtransform-dist-setup


                            For Linux platform visit this post: 

                            Setup ACS-7.x, ASS-2.x and Local Transformation Service using distribution package step by step Part 1

                            Note: If you are planning to setup ACS-7.1.x/ACS-7.2.x/ACS-7.3.x (Enterprise version) and ASS-2.0.2/ASS-2.0.3/ASS-2.0.6, then download the appropriate distribution packages from Alfresco Support portal. All the steps outlined above will remain pretty much the same.



                            -----------------------------------------------------------------------------------------------------------------

                            If you want to setup ACS-7.3.x, complete the prerequisites given below and follow the installation steps. Checkout the release notes here.



                            Download following packages required to setup ACS-7.3 and follow the steps outlined above. All steps should be pretty much the same. 

                            1.     ACS-7.3.x package (alfresco-content-services-community-distribution-7.3.1)

                            Download:https://maven.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-content-services-community-distribution/7.3.1/alfresco-content-services-community-distribution-7.3.1.zip

                            2.     ASS-2.x package (alfresco-search-services-2.0.6)

                            Download: https://maven.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-search-services/2.0.6/alfresco-search-services-2.0.6.zip

                            3.     Alfresco Transform Core All-in-one (alfresco-transform-core-aio-2.7.x)

                            Download: https://maven.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-transform-core-aio/2.7.0-A1/alfresco-transform-core-aio-2.7.0-A1.jar

                            If you would like to upgrade to Transform Core 3.x, check this post: https://hub.alfresco.com/t5/alfresco-content-services-blog/alfresco-7-3-upgrading-to-transform-core-3-0-0/ba-p/315364

                            4.     Java: Oracle jdk-17.0.4 or later/Open JDK 17.0.4 or later

                            Download OracleJDK 17.0.xhttps://download.oracle.com/java/17/archive/jdk-17.0.4.1_windows-x64_bin.msi

                            5.     Tomcat 9: Tomcat 9.0.72

                            Download: https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.74/bin/apache-tomcat-9.0.74-windows-x64.zip

                            6.     ActiveMQ v5.17: ActiveMQ v5.17.4.

                            Download: https://archive.apache.org/dist/activemq/5.17.4/apache-activemq-5.17.4-bin.zip

                            7.     DB: PostgreSQL 14.7

                            Download: https://get.enterprisedb.com/postgresql/postgresql-14.7-2-windows-x64.exe

                            8.     ImageMagick v7.1.x: ImageMagick v7.1.1-8-Q16

                            Download: https://download.imagemagick.org/archive/binaries/ImageMagick-7.1.1-8-Q16-HDRI-x64-dll.exe

                            Alternative options (ImageMagick notoriously removes the specific versions and shows only latest versions):

                            https://imagemagick.org/script/download.php#windows

                            https://download.imagemagick.org/ImageMagick/download/binaries/

                            9. Libreoffice: LibreOffice v7.2.5

                            Download: https://downloadarchive.documentfoundation.org/libreoffice/old/7.2.5.2/win/x86_64/LibreOffice_7.2.5_Win_x64.msi

                            All alternatives: https://downloadarchive.documentfoundation.org/libreoffice/old/

                            10. PDF Renderer: alfresco-pdf-renderer v1.1

                            Download: https://maven.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-pdf-renderer/1.1/alfresco-pdf-renderer-1.1-win64.tgz  

                             11. Exif tool v12.x: image-exiftool 12.5






                            66 comments:

                            1. Thanks for the great article. Thanks to it I was able to set up in Windows. My question is, how do I change the maximum size of the Excel and Word previews?

                              ReplyDelete
                              Replies
                              1. Thanks and i am glad to hear that you are able to setup. See the response to your other question below.

                                Delete
                            2. Thanks for the great article. Thanks to it I was able to set up in Windows. My question is, how do I change the maximum size of the Excel and Word previews?

                              ReplyDelete
                              Replies
                              1. So before local/transformation service when alfresco used to have legacy transformation service, these sizes used to be controlled via alfresco-global.properties. Here is a reference from legacy service : https://github.com/AlfrescoArchive/alfresco-repository/blob/master/src/main/resources/alfresco/subsystems/Transformers/default/transformers.properties#L185

                                Now since 6.x onwards legacy transformation service was deprecated and then from ACS7.x onwards it has been completely removed. So the above properties no longer works.
                                Everything related to transformation and metadata extraction is now part of this repo: https://github.com/Alfresco/alfresco-transform-core

                                Now, to solve you problem you may try updating this libreoffice_engine_config.json's 'maxSourceSizeBytes' object value where needed: https://github.com/Alfresco/alfresco-transform-core/blob/master/alfresco-transform-libreoffice/alfresco-transform-libreoffice/src/main/resources/libreoffice_engine_config.json libreoffice_engine_config

                                To do this you need to do following:

                                1- Clone the git repo locally : https://github.com/Alfresco/alfresco-transform-core.git

                                2- Update the https://github.com/Alfresco/alfresco-transform-core/blob/master/alfresco-transform-libreoffice/alfresco-transform-libreoffice/src/main/resources/libreoffice_engine_config.json

                                3- Build the artifacts using the parent pom : https://github.com/Alfresco/alfresco-transform-core/blob/master/pom.xml , Use the "mvn clean install" or "mvn clean package" command to get the artifacts.

                                4- In https://github.com/Alfresco/alfresco-transform-core/tree/master/alfresco-transform-core-aio/alfresco-transform-core-aio-boot project's target directory, you will find the new "alfresco-transform-core-aio-boot-2.6.1-SNAPSHOT.jar" file.

                                5- Replace this newly built Jar in "'C:\alfresco-community72\bin\" - as outlined here: https://javaworld-abhinav.blogspot.com/2022/05/setup-acs-7-ass-2-and-local-windows.html#local-trserv-core-aio-launch

                                6- Stop all services and restart them all again and test to see if your previews works.

                                Hope this works.

                                Delete
                              2. Thanks for answering my question.
                                I get an error in step 3, build artifact.

                                [WARNING] The POM for org.codehaus.mojo:license-maven-plugin:jar:2.0.1.alfresco-2 is missing, no dependency information available
                                [INFO] ------------------------------------------------------------------------
                                [INFO] Reactor Summary for alfresco-transform-core 2.6.1-SNAPSHOT:
                                [INFO]
                                [INFO] alfresco-transform-core ............................ SUCCESS [ 0.858 s]
                                [INFO] Alfresco Transform Model ........................... FAILURE [ 0.016 s]
                                [INFO] alfresco-transformer-base .......................... SKIPPED
                                [INFO] Alfresco ImageMagick Transformer ................... SKIPPED
                                [INFO] Alfresco ImageMagick Transformer Spring Boot ....... SKIPPED
                                [INFO] Alfresco LibreOffice Transformer ................... SKIPPED
                                [INFO] Alfresco LibreOffice Transformer Spring Boot ....... SKIPPED
                                [INFO] Alfresco Miscellaneous Transformer ................. SKIPPED
                                [INFO] Alfresco Miscellaneous Transformer Spring Boot ..... SKIPPED
                                [INFO] Alfresco Pdf Renderer Transformer .................. SKIPPED
                                [INFO] Alfresco Pdf Renderer Spring Boot .................. SKIPPED
                                [INFO] Alfresco Tika Transformer .......................... SKIPPED
                                [INFO] Alfresco Tika Transformer Spring Boot .............. SKIPPED
                                [INFO] Alfresco Core All-In-One Transformer ............... SKIPPED
                                [INFO] Alfresco Core All-In-One Transformer Spring Boot ... SKIPPED
                                [INFO] ------------------------------------------------------------------------
                                [INFO] BUILD FAILURE
                                [INFO] ------------------------------------------------------------------------
                                [INFO] Total time: 1.201 s
                                [INFO] Finished at: 2022-05-24T16:46:46+09:00
                                [INFO] ------------------------------------------------------------------------
                                [ERROR] Plugin org.codehaus.mojo:license-maven-plugin:2.0.1.alfresco-2 or one of
                                its dependencies could not be resolved: Failure to find org.codehaus.mojo:licen
                                se-maven-plugin:jar:2.0.1.alfresco-2 in https://repo.maven.apache.org/maven2 was
                                cached in the local repository, resolution will not be reattempted until the up
                                date interval of central has elapsed or updates are forced -> [Help 1]
                                org.apache.maven.plugin.PluginResolutionException: Plugin org.codehaus.mojo:lice
                                nse-maven-plugin:2.0.1.alfresco-2 or one of its dependencies could not be resolv
                                ed: Failure to find org.codehaus.mojo:license-maven-plugin:jar:2.0.1.alfresco-2
                                in https://repo.maven.apache.org/maven2 was cached in the local repository, reso
                                lution will not be reattempted until the update interval of central has elapsed
                                or updates are forced

                                https://repo.maven.apache.org/maven2/org/codehaus/mojo/license-maven-plugin/2.0.1.alfresco-2/license-maven-plugin-2.0.1.alfresco-2.pom

                                I understand that the reason is that this page does not exist, but I do not know what to do. How can I work around the error?

                                Delete
                              3. Hmm, i will have to take a look at the repository and try to build. I will reply back if i find something.

                                Delete
                              4. I am able to build the project successfully. You may not have correct maven settings. Please follow these steps and retry:

                                1- Update maven settings.xml as per the sample given below (open the link and copy the xml content):


                                https://hub.alfresco.com/t5/forums/forumtopicprintpage/board-id/forum-ECM-software/message-id/17984/print-single-message/true/page/1

                                2- Run the maven command as (skip tests): mvn clean install -DskipTests

                                Delete
                              5. I was able to assemble it successfully. Thank you very much. Thank you very much.

                                https://github.com/Alfresco/alfresco-transform-core/blob/master/alfresco-transform-libreoffice/alfresco-transform-libreoffice/src/main/resources/libreoffice_engine_config.json

                                I changed "maxSourceSizeBytes" in libreoffice_engine_config.json above as follows, but I can preview a file size larger than the setting value.
                                Is there something wrong with the setting?

                                {"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "maxSourceSizeBytes": 1024, "targetMediaType ": "application/pdf" },

                                Delete
                              6. It should usually pick up the config updates. Try enabling the log here: https://github.com/Alfresco/alfresco-transform-core/blob/master/alfresco-transform-libreoffice/alfresco-transform-libreoffice-boot/src/main/resources/application.properties

                                Add following log configs, build the artifacts and try to see if you can spot the size related info :


                                logging.level.org.alfresco.transformer.LibreOfficeController=debug
                                logging.level.org.alfresco.transformer=debug

                                Delete
                              7. Thank you. Where will this log be output to?

                                Delete
                              8. See the properties file where it is referring to? Oboviously the transformation service logs

                                Delete
                              9. The maximum size could be changed. Thank you very much.

                                Delete
                              10. Glad to hear that you are able to achieve your requirement. HTH

                                Delete
                            3. Hello Dear
                              thanks for your attention to my request
                              I followed alfresco tutorial for version 7.2 of alfresco on windows correctly, but the issue is that I get the following error message: 04240002 Keystores are invalid

                              ReplyDelete
                              Replies
                              1. This error indicates config issue with keystore. Setup steps are described here: https://javaworld-abhinav.blogspot.com/2022/05/setup-acs-7-ass-2-and-local-windows.html#encryption-keystore-cfg

                                After you copy the keystore files to C:/alfresco-community72/tomcat/shared/classes/alfresco/extension/keystore, update the alfresco-global.properties to set this: 'dir.keystore=C:/alfresco-community72/tomcat/shared/classes/alfresco/extension/keystore'

                                And at last update the catalina.bat with following entry:

                                JAVA_TOOL_OPTIONS="-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=C:\alfresco-community72\tomcat\shared\classes\alfresco\extension\keystore\metadata-keystore\keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede"

                                If you are still seeing the error, please share alfresco.log, catalina.out, alfresco-global.properties, catalina.bat, solr.in.cmd and solrcore.properties. Unfortunately there is no way to attach the file so you can upload to a google drive and share the links.

                                Delete
                              2. Hello Dear
                                Thank you very much for your help.

                                Delete
                            4. Hello Dear Abhinav
                              I have another issue with sending emails.
                              I have three users: admin, user1 and user2
                              when admin invites user1 or user2 to join a site, they receive notifications.
                              but when user1 invites admin or user2, I get this error:
                              2022-05-28 13:38:13,313 ERROR [org.alfresco.repo.action.executer.MailActionExecuter] [mailAsyncAction6] Failed to send email to [user2] : org.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 554 5.2.252 SendAsDenied; admin@domain.com not allowed to send as user1@domain.com; STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message [BeginDiagnosticData]Cannot submit message. 0.35250:AF320000, 1.36674:01000000, 1.61250:00000000, 1.45378:02000000, 1.44866:00000000, 1.36674:7A000000, 1.61250:00000000, 1.45378:05000000, 1.44866:00140000, 1.36674:0A000000, 1.61250:00000000, 1.45378:16000000, 1.44866:0B3E0000, 1.36674:0E000000, 1.61250:00000000, 1.45378:243E0000, 1.44866:44020000, 16.55847:15190000,
                              my conf:
                              mail.host=smtp.office365.com
                              mail.port=25
                              mail.username=admin@domain.com
                              mail.password=Password
                              mail.encoding=UTF-8
                              mail.from.default=admin@domain.com
                              mail.smtp.starttls.enable=true
                              mail.smtp.auth=true
                              mail.from.enabled=true

                              i searched on alfresco and google nothing

                              ReplyDelete
                              Replies
                              1. Well the documentation has clear instructions. Look at this error, it indicates that smtp is not allowing to impersonate another user.

                                "org.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 554 5.2.252 SendAsDenied; admin@domain.com not allowed to send as user1@domain.com;"


                                Try disabling mail.from.enabled=false.

                                Please review these docs:

                                https://docs.alfresco.com/content-services/latest/config/email/#manage-outbound-emails

                                https://docs.alfresco.com/content-services/latest/config/email/#outbound-smtp-configuration-properties

                                Delete
                            5. thanks for your help. it works
                              mail.from.enabled=false.

                              ReplyDelete
                              Replies
                              1. I am glad you are able to resolve the error. Thanks for informing.

                                Delete
                            6. thanks for your help. it works
                              mail.from.enabled=false.

                              ReplyDelete
                              Replies
                              1. I am glad you are able to resolve the error. Happy to help. Thanks for informing.

                                Delete
                            7. Thank you Abhinav for sharing these wonderful blog. Alfresco documentation is pathetic and you made the installation a cake walk. I have been trying to setup on my windows 11 laptop for a week now and gone through hell of alfresco installation steps documentation. Came across this blog on google and you saved my day. Thanks again.

                              Love from UK

                              ReplyDelete
                              Replies
                              1. Thanks. Docs are also improving, alfresco is doing some good job there.

                                Delete
                            8. Thanks for all about the instruction. But I have one issue here:

                              C:\alfresco-search-services>.\solr\bin\solr.cmd start -a "-Dcreate.alfresco.defaults=alfresco,archive"
                              Picked up JAVA_TOOL_OPTIONS: -Dalfresco.secureComms.secret=secret
                              Picked up JAVA_TOOL_OPTIONS: -Dalfresco.secureComms.secret=secret
                              Picked up JAVA_TOOL_OPTIONS: -Dalfresco.secureComms.secret=secret
                              Picked up JAVA_TOOL_OPTIONS: -Dalfresco.secureComms.secret=secret
                              Picked up JAVA_TOOL_OPTIONS: -Dalfresco.secureComms.secret=secret
                              Picked up JAVA_TOOL_OPTIONS: -Dalfresco.secureComms.secret=secret
                              Unrecognized VM option 'UseConcMarkSweepGC'
                              Error: Could not create the Java Virtual Machine.
                              Error: A fatal exception has occurred. Program will exit.
                              Waiting up to 30 to see Solr running on port 8983

                              ERROR: Solr at http://localhost:8983/solr did not come online within 30 seconds!


                              C:\alfresco-search-services>

                              ReplyDelete
                              Replies
                              1. Check your java version matches to the supported platforms guide. Also see is java is setup correctly. Make sure JAVA_HOME variable is set and when you run "java -version", you get the same version that is required for the setup to work. Following variable should also be set correctly in solr.in.cmd file

                                set SOLR_ALFRESCO_SECURECOMMS=secret
                                set JAVA_TOOL_OPTIONS=-Dalfresco.secureComms.secret=secret

                                Delete
                              2. I already set those variables and java -version gives me below values

                                C:\alfresco\alf72\alfresco-search-services>java -version
                                java version "11.0.16" 2022-07-19 LTS
                                Java(TM) SE Runtime Environment 18.9 (build 11.0.16+11-LTS-199)
                                Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.16+11-LTS-199, mixed mode)

                                Delete
                              3. If you are having try with SOLR_OPTS and see if it works. For example:

                                set SOLR_SOLR_HOST=localhost
                                set SOLR_SOLR_PORT=8983
                                set SOLR_SOLR_BASEURL=/solr
                                set SOLR_ALFRESCO_HOST=localhost
                                set SOLR_ALFRESCO_PORT=8080
                                set SOLR_ALFRESCO_BASEURL=/alfresco

                                :: Since we are setting up with no SSL and shared secret, this property need to be set to secret. Default is https
                                set SOLR_ALFRESCO_SECURECOMMS=secret

                                rem ACS72 shared secret changes [Start] ##############
                                rem set JAVA_TOOL_OPTIONS=-Dalfresco.secureComms.secret=secret

                                set SOLR_OPTS=-Dalfresco.secureComms.secret=secret

                                rem ACS72 shared secret changes [End] ##############

                                Delete
                              4. Or there is way to disable the shared secret communication as well. Follow the steps given below:

                                1- Rename “security.json” to “security.json.backup” in $SOLR_INSTALLATION/solrhome (C:\alfresco\alf72\alfresco-search-services\solrhome\secutiry.json”)

                                2- Update the following property in alfresco-global.properties (JAVA_OPTS in docker-compose):

                                solr.secureComms=none

                                3- Remove following property from alfresco-global.properties (JAVA_OPTS in docker-compose)

                                solr.sharedSecret=secret

                                4- Update the following property in : C:\alfresco\alf72\alfresco-search-services\solrhome\alfresco\conf\solrcore.properties:

                                alfresco.secureComms=none

                                5- Update the following property in : C:\alfresco\alf72\alfresco-search-services\solrhome\archive\conf\solrcore.properties:

                                alfresco.secureComms=none

                                Delete
                            9. Thanks for the great article.
                              I would like to change the font specification in ImageMagick, where do I modify it?

                              ReplyDelete
                              Replies
                              1. I am not sure if that is supported out of the box. Alfresco transform services makes use of "convert" command from within with default settings. I have not tried so can't be sure. You will have to try yourself. You may have to extend/modify this class to provide additional options: https://github.com/Alfresco/alfresco-transform-core/blob/master/engines/imagemagick/src/main/java/org/alfresco/transform/imagemagick/ImageMagickOptionsBuilder.java

                                https://legacy.imagemagick.org/Usage/fonts/

                                Delete
                            10. After upgrading to 7.x the view in browser option in share doesnt seem to work for office files(doc,xls). It works for pdf though. Preview works for all. Am i missing something or is that how it should work?

                              ReplyDelete
                              Replies
                              1. Please check if you have completed the local transformation setup correctly as per: https://javaworld-abhinav.blogspot.com/2022/05/setup-acs-7-ass-2-and-local-windows.html#setup-trserv-local

                                Libreoffice must be installed, up and running

                                Delete

                            11. Hello thank you very much.
                              I was able to install without much problem.
                              I have tried to set ssl/https but everything i have tried nothing has worked.
                              Do you plan to make a guide with ssl/https implementation? That would be great, thank you very much.

                              ReplyDelete
                            12. Hello. great job. I have an error when i start alfresco with share.xml deployment:
                              : 0 SEVERE [main] org.apache.catalina.startup.HostConfig.deployDescriptor Erreur lors du d├®ploiement du descripteur de configuration [C:\klinck\alfresco-content-services-7.3.0\tomcat\conf\Catalina\localhost\share.xml]
                              java.lang.IllegalStateException: Erreur lors du d├®marrage du conteneur fils
                              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
                              ...
                              Caused by: org.apache.catalina.LifecycleException: Echec de d├®marrage du composant [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/share]]
                              at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
                              ... 37 more
                              Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
                              at java.base/java.lang.Class.getDeclaredFields0(Native Method)


                              How can I solve that ? Thx

                              ReplyDelete
                              Replies
                              1. Seems like some sort of miss configured or missing steps. Please re-visit the steps to make sure all are done correctly.

                                Delete
                            13. Is there a way to restrict memory when i start the transformation jars? router, sfs and core. Also want to reduce logging to only error. I am running transformation services, activemq and acs on same host so need to make sure memory is distributed properly.

                              ReplyDelete
                              Replies
                              1. Yes you can pass java opts (-Xms256m -Xmx2096m) at command line when you start the services. Example:

                                start "localTransformationService" java -Xms256m -Xmx2096m -DPDFRENDERER_EXE="%ALF_INSTALL_PATH%\\alfresco-pdf-renderer\\alfresco-pdf-renderer.exe"^
                                -DLIBREOFFICE_HOME="%ALF_INSTALL_PATH%\\libreoffice"^
                                -DIMAGEMAGICK_ROOT="%ALF_INSTALL_PATH%\\imagemagick"^
                                -DIMAGEMAGICK_DYN="%ALF_INSTALL_PATH%\\imagemagick"^
                                -DIMAGEMAGICK_CODERS="%ALF_INSTALL_PATH%\\imagemagick\\modules\\coders"^
                                -DIMAGEMAGICK_CONFIG="%ALF_INSTALL_PATH%\\imagemagick"^
                                -DIMAGEMAGICK_EXE="%ALF_INSTALL_PATH%\\imagemagick\\convert.exe"^
                                -DACTIVEMQ_URL=failover:(tcp://localhost:61616)?timeout=3000^
                                -jar %ALF_INSTALL_PATH%\\bin\\alfresco-transform-core-aio-boot-2.5.7.jar

                                Delete
                            14. Thanks for instruction. I have issue when run transformation:

                              java.lang.IllegalArgumentException: officeHome must exist and be a directory

                              and when I open file in alfresco-content-app get this error on tomcat:

                              Failed 01120030 libreoffice returned a 500 status All in One Transformer - NullPointerException http://localhost:8090/transform targetExtension=pdf sourceEncoding=UTF-8 sourceMimetype=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet sourceExtension=xlsx targetMimetype=application/pdf

                              ReplyDelete
                              Replies
                              1. Seems like problem with your transform service setup. Please review the setup steps from here: https://javaworld-abhinav.blogspot.com/2022/05/setup-acs-7-ass-2-and-local-windows.html#setup-trserv-local

                                Make sure libreoffice is configured correctly and appropriate path is configured when you start: https://javaworld-abhinav.blogspot.com/2022/05/setup-acs-7-ass-2-and-local-windows.html#local-trserv-core-aio-launch

                                Delete
                            15. Thanks for article.
                              I get exception when run transformation:
                              java.lang.IllegalArgumentException: officeHome must exist and be a directory
                              ...

                              ReplyDelete
                            16. Dear Abhinav,
                              Javascript console version you gave not working with my ACS7.3.1, can you check whats wrong? and if you can provide repository link or latest version of that would great. I am getting 500 error while click on execute, even logger.log("hello"); gives 500 error. like https://alfresco.atlassian.net/browse/MNT-23572

                              ReplyDelete
                              Replies
                              1. This comment has been removed by the author.

                                Delete
                              2. Try these :

                                https://github.com/abhinavmishra14/js-console/releases/download/0.7.3/javascript-console-platform-0.7.3.amp

                                https://github.com/abhinavmishra14/js-console/releases/download/0.7.3/javascript-console-share-0.7.3.amp

                                Delete
                            17. Thank you for providing the details around versions and related module versions. I was trying to install 7.3 but wasn’t how to get the specific versions downloaded. Love your blog as always. You have been an inspiration sir!

                              Keep it up.

                              ReplyDelete
                            18. Not able to setup same thing with windows 11. Probably issue with compatibility. JRE crashing on solr using java version "17.0.6" 2023-01-17 LTS

                              ReplyDelete
                              Replies
                              1. Would you mind posting the error log for better understanding ? Make sure you use the compatible supported versions for the ACS 7.1 and 7.2 and its components. https://docs.alfresco.com/content-services/7.2/support/
                                https://docs.alfresco.com/search-services/latest/support/

                                Only ACS 7.3 and 7.4 supports JRE 17.x. Check all supported platforms here: https://docs.alfresco.com/content-services/latest/support/

                                Delete
                            19. thanks for the great article and your effort , my question is how i can change language ??

                              ReplyDelete
                            20. Hi,
                              I was able to follow all your instructions in setting up 7.3 community in windows server 2019.
                              However when accessing the dashboard in browser localhost:8080 it prompts me that alfresco.global.properties is still in accessible.
                              How can I fix this?

                              ReplyDelete
                              Replies
                              1. Make sure you have completed the following step correctly. Review your configs and make appropriate corrections.

                                Open and edit the C:\alfresco-community73\tomcat\conf\catalina.properties file:
                                Update the value of the shared.loader= property to the following:
                                shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

                                Delete
                            21. Hi Sir,
                              I am trying to install Alfresco Community Edition 7.1 on windows but I am getting the below error.
                              "Cannot find Alfresco Repository on this server. (Does this application have access to alfresco-global.properties? Does this application have cross-context permissions?)"

                              ReplyDelete
                              Replies

                              1. I would suggest to revisit all the steps again. Seems you missed setting the path where alfresco-global.properties is picked from. Make sure you set the shared.loader config correctly. for example:

                                Open and edit the \tomcat\conf\catalina.properties file:
                                Update the value of the shared.loader= property to the following:

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

                                Delete
                              2. I already did this but I have one doubt, the Alfresco Community edition 7.1 zip file uses the "/" slash eg: shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar. but in my system, the path is present as "C:\alfresco-community71\tomcat\shared\classes". should I replace this "/" slash with "\"?

                                Delete
                              3. That's fine, as long as you have created folders shared, shared/lib, shared/classes and mapped the shared.loader then it should pick the alfresco-global.properties. Review your setup once again step by step and see what's missing. This is pure missing config/step problem.

                                Delete
                              4. Can you please guide me on how to install Alfresco Community Edition 7.1 with Tomcat in Windows or can you share installation-related videos that will help me to install Alfresco Community Edition 7.1.

                                Delete
                              5. Can you please guide me on how to install Alfresco Community Edition 7.1 with Tomcat in windows or can you share installation-related videos that will help me to install Alfresco Community Edition 7.1.

                                Delete
                              6. This post is all about installing 7.x on windows. https://javaworld-abhinav.blogspot.com/2022/05/setup-acs-7-ass-2-and-local-windows.html

                                You have to go through each step and follow it. It is not possible to document every minor version.

                                Delete
                            22. Hello Abhinav, Thanks for this blog
                              Can you confirm is this applicable to install 7.3 as well over windows 10 or 11 machine??

                              ReplyDelete
                            23. Hi Abhinav,
                              This is detailed article, great
                              I have used community edition alfresco 7.3.1 on windows 10

                              below are observations
                              1) Alfresco content service / activemq / transformation service works fine
                              2) For solr, I have changed port and running it but I observed every time when I start it says
                              "solr could not able to start in 60 seconds" [ or whatever timeout we specified ]
                              but in background when I hit browser it works.

                              3) Admin console --> user search not working showing me "error loading items" even my solr search works fine with documents.

                              last two points have query , why it behave strange on vanilla, are those bugs?
                              in community?

                              ReplyDelete
                              Replies
                              1. I have not see the timeout error with solr with my setups before. I have not tried 7.3 yet. But the 3rd issue related to "user search" is a bug in alfresco share. Here is the fix under this: https://javaworld-abhinav.blogspot.com/2022/05/setup-acs-7-ass-2-and-local-windows.html#share-config-custom-changes. Example here: https://github.com/abhinavmishra14/alfresco7-solr-localtransform-dist-setup/blob/alfresco7.2.x/windows-platform/alfresco-community72/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml#L405

                                Delete
                            24. Abhinav,
                              This is great article,
                              OS : windows 10
                              I want if you can create similar for alfresco 23.1 (community), it is changed, we are not able to start alfresco tomcat using above steps now, (probably now ssl AJP port is mandatory) but we don't know steps.

                              That would help us great...

                              ReplyDelete
                              Replies
                              1. https://docs.alfresco.com/content-services/latest/install/zip/tomcat/#install-application-server AJP is still optional. Please share the error details. It is hard to understand why tomcat wouldn't start unless we can see any errors and try to understand the cause.

                                Delete

                            Thanks for your comments/Suggestions.