You can take a look at the steps here:
Many folks contacted me via Linkedin for steps on Linux environment. So I spared some time to go over setup steps using distribution package on Linux environment.
What we need before we start doing setup?
- ACS-6.2.0-ga package (alfresco-content-services-community-distribution-6.2.0-ga)
- ASS-1.4.0 package (alfresco-search-services-1.4.0)
- Java: Oracle jdk-11.0.1 or later/Open JDK 11.0.1 or later
- Tomcat: Tomcat 8.5.43
- ActiveMQ: ActiveMQ v5.15.8 (Optional). Mandatory for transformation services when using enterprise version (async transform service) and/or Out of process extensions.
- DB: PostgreSQL 11.10
- ImageMagick: ImageMagick v7.0.10
- Libreoffice: LibreOffice v6.3.5.2
Platform:
- CentOS 7 x64
- ACS, Share and SOLR6 on same machine
- Setup Without SSL
Interested in ACS7.x? checkout this post:
- Download ACS 6.2.0-ga:
https://download.alfresco.com/cloudfront/release/community/201911-GA-build-368/alfresco-content-services-community-distribution-6.2.0-ga.zip
- Download ASS 1.4.0:
Note: If you are planning to setup ACS 6.2.1/6.2.2 (Enterprise versions) and ASS 2.0, 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 6.2 for this post hence we have to use ASS 1.4 as stated in the Supported platforms here
Download Tomcat 8.5.43 binary package:
https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.43/bin/apache-tomcat-8.5.43.tar.gz
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.15.8 binary package (used for transformation services):
https://archive.apache.org/dist/activemq/5.15.8/apache-activemq-5.15.8-bin.tar.gz
Imagemagick dist.:
Imagemagick lib dist.:
Dependencies for imagemagick:
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Alternatively, distributions can download from here:
https://imagemagick.org/script/download.php#unix
Download LibreOffice v6.3.5.2:
Alternatively, distributions can download from here:
Optional Alfresco module packages (amps)-Useful for admins/developers:
https://repo1.maven.org/maven2/de/fmaul/javascript-console-repo/0.6/javascript-console-repo-0.6.amp
Now, we have downloaded the packages and unlike Windows environment there are several additional pre-requisites that needs to be done before we can start setting up ACS and Solr6. So follow the steps as outlined below.
We would be needing a user and a group for running alfresco content services and solr6 (aka alfresco search services) in the Linux environment.
User and Group for Alfresco Content Services:
- Create a group named 'Alfresco'
$ sudo groupadd Alfresco
- Create a system user named 'alfresco'
$ sudo adduser alfresco --system
- Add the user 'alfresco' to the group 'Alfresco'
$ sudo usermod -a -G Alfresco alfresco
- Verify group membership
$ sudo groups alfresco
Output--> alfresco : alfresco Alfresco
User and Group for Solr6 (Alfresco Search Services):
- Create a group named 'Solr'
$ sudo groupadd Solr
- Create a system user named 'solr'
$ sudo adduser solr --system
- Add the user 'solr' to the group 'Solr'
$ sudo usermod -a -G Solr solr
- Verify group membership
$ sudo groups solr
Output--> solr : solr Solr
We will be using these users/groups at later stages to setup appropriate permission levels for ACS and Solr6.
Create directory structure for ACS6.2.0-ga
- Create a directory named 'alfresco-community62ga' under '/usr/local/' directory. We will setup everything for ACS in this directory.
$ sudo mkdir /usr/local/alfresco-community62ga
- Create sub-directories under '/usr/local/alfresco-community62ga' as below:
- Set initial permissions to structure created above:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga$ sudo chmod 775 /usr/local/alfresco-community62ga$ sudo chmod -R 775 /usr/local/alfresco-community62ga/alf_data
Note: We will be setting up some more permissions when we setup tomcat.
- Add ALF_HOME to permanent environment variable, Edit '.bash_profile' file:
$ sudo vim .bash_profile
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs export ALF_HOME=/usr/local/alfresco-community62ga PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ALF_HOME export PATH
Note that environment variable gets reset after you re-start the server. So to keep the variable permanent we are editing ".bash_profile".
- Create a directory named 'alfresco-search-services' under '/usr/local/' directory. We will setup everything here.
$ sudo mkdir /usr/local/alfresco-search-services
- Set initial permissions to structure created folder:
$ sudo chgrp -R Solr /usr/local/alfresco-search-services
$ sudo chmod 775 /usr/local/alfresco-search-services
$ sudo chmod -R 755 /usr/local/alfresco-search-services/*
We will be setting up some more permissions when we setup solr6 at a later stage.
- Add SOLR_HOME to permanent environment variable, Edit '.bash_profile' file:
$ sudo vim .bash_profile
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs export ALF_HOME=/usr/local/alfresco-community62ga export SOLR_HOME=/usr/local/alfresco-search-servicesPATH=$PATH:$HOME/.local/bin:$HOME/bin:$ALF_HOME:$SOLR_HOME export PATH
- Update packages, it is a best practice to start with an updated operating system before installing a package. If you have not done so, use the following command to update CentOS and reboot:
$ sudo yum update -y
$ sudo reboot
- Install latest stable version of Java-11
$ sudo yum install java-11-openjdk-devel
- This will install java11 in following directory: /usr/lib/jvm/java-11
- Run following command to check what is the default java version
$ sudo java -version
- If you see java version other than java-11, then you can switch and set the default version as java-11. Run the following command:
$ sudo alternatives --config java
This will prompt you to select the version you want to set as default. Select a number from the list, e.g. if java-11 is at number 3, then type '3' and press enter. Revalidate the java version again.
- set JAVA_HOME environment variable, Edit '.bash_profile' file:
$ sudo vim .bash_profile
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs export JAVA_HOME=/usr/lib/jvm/java-11 export ALF_HOME=/usr/local/alfresco-community62ga export SOLR_HOME=/usr/local/alfresco-search-servicesPATH=$PATH:$HOME/.local/bin:$HOME/bin:$ALF_HOME:$SOLR_HOME export PATH
- Update packages, it is a best practice to start with an updated operating system before installing a package. If you have not done so, use the following command to update CentOS and reboot:
$ sudo yum update -y
$ sudo reboot
Note: If you had followed the steps to install Java11 as outlined above, you have had already updated the package, so you can skip the above given step.
- Configure Yum Repo
$ sudo rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
- Install PostgreSQL Server and Client
$ sudo yum install postgresql11-server postgresql11 -y
- Initialize Database
$ sudo /usr/pgsql-11/bin/postgresql-11-setup initdb
The default directory where PostgreSQL data storage is: /var/lib/pgsql/11/data
- Enable and Start PostgreSQL Service
$ sudo systemctl enable postgresql-11.service
$ sudo systemctl start postgresql-11.service
- Configure Firewall for remote access
$ sudo firewall-cmd --add-service=postgresql --permanent
$ sudo firewall-cmd --reload
- Enable Remote Access so users can connect to postgresql server, edit 'postgresql.conf'
- Change the listen_address to '*' and Uncomment the port in the configuration file:
$ sudo vim /var/lib/pgsql/11/data/postgresql.conf
listen_addresses = '*' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost'; use '*' for all # (change requires restart) port = 5432 # (change requires restart)
'listen_addresses' Specifies the TCP/IP address(es) on which the server is to listen for connections from client applications. The value takes the form of a comma-separated list of host names and/or numeric IP addresses. The special entry * corresponds to all available IP interfaces. The entry 0.0.0.0 allows listening for all IPv4 addresses and :: allows listening for all IPv6 addresses. If the list is empty, the server does not listen on any IP interface at all, in which case only Unix-domain sockets can be used to connect to it.
The TCP 'port' the server listens on; 5432 by default. Note that the same port number is used for all IP addresses the server listens on. This parameter can only be set at server start.
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.
Visit here for more details: https://www.postgresql.org/docs/11/runtime-config-connection.html
- We need to also let PostgreSQL know to accept remote connections, edit pg_hba.conf add/update the following:
$ sudo vim /var/lib/pgsql/11/data/pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD # Accept from anywhere host all all 0.0.0.0/0 md5 host all all ::/0 md5 # Comment out all other configurations that use 'ident' as method to avoid error like: FATAL: Ident authentication failed for user "..." #host all all 127.0.0.1/32 ident #host all all ::1/128 ident #host replication all 127.0.0.1/32 ident #host replication all ::1/128 ident
- Restart service after making configuration changes
$ sudo systemctl restart postgresql-11.service
- Set PostgreSQL Admin Password
$ sudo su - postgres
# Type 'psql' to launch postgresql terminal -bash-4.2$ psql # Run below given query to set the password. postgres=# alter user postgres with password 'alfresco'; # Type exit to terminate the terminal exit # Type exit to leave the bash terminal exit
- Let's verify the postgresql version as a final step:
- Update packages, it is a best practice to start with an updated operating system before installing a package. If you have not done so, use the following command to update CentOS and reboot:
$ sudo yum update -y
$ sudo reboot
Note: If you had followed the steps to install pg11 as outlined above, you have had already updated the package, so you can skip the above given step.
- Install pgAdmin
$ sudo yum install pgadmin4 -y
- Start and enable httpd service to start on boot
$ sudo systemctl start httpd && sudo systemctl enable httpd
- You can confirm service status by running:
$ sudo systemctl status httpd
- Enable pgAdmin Apache Configuration
$ sudo cp /etc/httpd/conf.d/pgadmin4.conf.sample /etc/httpd/conf.d/pgadmin4.conf
- Configure VirtualHost
$ sudo vim /etc/httpd/conf.d/pgadmin4.conf
- Edit the Apache configuration file to add/update a VirtualHost as appears below, Make sure port '80' is not already in use. If used already then choose a different port accordingly:
<VirtualHost *:80> LoadModule wsgi_module modules/pgadmin4-python3-mod_wsgi.so WSGIDaemonProcess pgadmin processes=1 threads=25 WSGIScriptAlias /pgadmin4 /usr/lib/python3.6/site-packages/pgadmin4-web/pgAdmin4.wsgi <Directory /usr/lib/python3.6/site-packages/pgadmin4-web/> WSGIProcessGroup pgadmin WSGIApplicationGroup %{GLOBAL} <IfModule mod_authz_core.c> # Apache 2.4 Require all granted </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory> </VirtualHost>
- Confirm the above edit and syntax are ok and then restart httpd:
$ sudo httpd -t && sudo systemctl restart httpd
- Configure Data Directories
- Create data directories to be used by pgAdmin4 and provide the directories in the config file:
$ sudo mkdir -p /var/lib/pgadmin4/ /var/log/pgadmin4/
$ sudo vim /usr/lib/python3.6/site-packages/pgadmin4-web/config_distro.py
# Add the following in config_distro.py file: LOG_FILE = '/var/log/pgadmin4/pgadmin4.log' SQLITE_PATH = '/var/lib/pgadmin4/pgadmin4.db' SESSION_DB_PATH = '/var/lib/pgadmin4/sessions' STORAGE_DIR = '/var/lib/pgadmin4/storage'
- Set permissions for pgAdmin directories to apache user
$ sudo chown -R apache:apache /var/lib/pgadmin4 /var/log/pgadmin4
- Run the following command to create the configuration database:
$ sudo python3 /usr/lib/python3.6/site-packages/pgadmin4-web/setup.py
# Provide an email address (will be used as userId) & provide password when prompted Email address: admin@abhinav.com Password: <INPUT PASSWORD> Retype password:<Confirm PASSWORD> pgAdmin 4 - Application Initialisation ======================================
- Configure SELinux (if status is Enforced/Enforcing).
- SELinux gives that extra layer of security to the resources in the system. It provides the MAC (mandatory access control) as contrary to the DAC (Discretionary access control). SELinux can operate in any of the 3 modes :
- Enforced : Actions contrary to the policy are blocked and a corresponding event is logged in the audit log.
- Permissive : Permissive mode loads the SELinux software, but doesn’t enforce the rules, only logging is performed.
- Disabled : The SELinux is disabled entirely.
- To check the status of SELinux, use either of the below command:
$ sudo getenforce
$ sudo sestatus
- If status says 'Enforcing', then follow the below steps for pgAdmin4:
- Create and apply a policy to allow Apache user access pgAdmin directories.
$ sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/lib/pgadmin4(/.*)?"
$ sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/log/pgadmin4(/.*)?"
$ sudo restorecon -R /var/lib/pgadmin4/
$ sudo restorecon -R /var/log/pgadmin4/
- Restart 'httpd' service.
$ sudo systemctl restart httpd
- To access pgAdmin 4 Web Interface, if you have an active firewall service, allow http port
$ sudo firewall-cmd --permanent --add-service=http
$ sudo firewall-cmd --reload
- To launch pgadmin4 use below url (you can use server name setup as part of virtual host config above):
- In case you are not able to connect from pgAdmin due to SELinux preventing the connection, then execute following commands and restart postgresql-11
$ sudo semanage port -a -t postgresql_port_t -p tcp 5432
$ sudo setsebool -P httpd_can_network_connect_db 1
- Launch pgAdmin4 and prepare 'alfresco' database, user and assign privileges
- 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:
$ sudo su - postgres
# Type 'psql' to launch postgresql terminal -bash-4.2$ psql # Create user named 'alfresco' and db named 'alfresco' and make 'alfresco' the owner of 'alfresco' db. postgres=# create role alfresco LOGIN password 'alfresco'; postgres=# create database alfresco encoding 'utf8'; postgres=# grant all on database alfresco to alfresco; # Type exit to terminate the terminal exit # Type exit to leave the bash terminal exit
- or Alternatively you can also use below commands:
$ sudo -u postgres createuser -D -A -P alfresco # On prompt provide password as 'alfresco'
$ sudo -u postgres createdb -O alfresco alfresco # Create db and assign user alfresco as owner.
- Update packages, it is a best practice to start with an updated operating system before installing a package. If you have not done so, use the following command to update CentOS and reboot:
$ sudo yum update -y
$ sudo reboot
Note: If you had followed the steps to install pg11 as outlined above, you have had already updated the package, so you can skip the above given step.
- Use rpm file's path as per your current download location. In my case files are downloaded the packages in '/home/centos/Downloads/Imagemagick/' folder.
$ sudo yum localinstall /home/centos/Downloads/Imagemagick/*.rpm -y
- Imagemagick and its dependencies will be installed and can be found in these locations
- Executables locations:
/usr/bin/convert /usr/bin/indentify /usr/bin/magick /usr/bin/magick-script
- Lib location:
/usr/lib64/ImageMagick-7.0.10
- Imagemagick configuration based on above locations for alfresco would be:
img.root=/usr/lib64/ImageMagick-7.0.10 img.dyn=/usr/bin img.gslib=/usr/bin img.exe=${img.dyn}/convert img.config=${img.root}/config-Q16HDRI img.coders=${img.root}/modules-Q16HDRI/coders
Note: For our convenience we will be creating 'links' to executable and libraries at later stage to keep everything in one place. We have a imagemagick folder within '/usr/local/alfresco-community62ga/' directory when we created the initial structure for setup. You can choose to keep executables and library at default location (as shown above) and use the above given properties in alfresco-global.properties as is. It is up to you.
- Now that we have installed the imagemagick, let's do a round of test to make sure executables are working as expected. Use below command:
$ /usr/bin/convert /home/centos/Downloads/test.png /home/centos/Downloads/test.jpg
- Update packages, it is a best practice to start with an updated operating system before installing a package. If you have not done so, use the following command to update CentOS and reboot:
$ sudo yum update -y
$ sudo reboot
Note: If you had followed the steps to install pg11 as outlined above, you have had already updated the package, so you can skip the above given step.
- Use rpm file's path as per your current download location. In my case files are downloaded the packages and extracted in '/home/centos/Downloads/LibreOffice_6.3.5.2_Linux_x86-64_rpm/' folder.
$ sudo yum localinstall /home/centos/Downloads/LibreOffice_6.3.5.2_Linux_x86-64_rpm/RPMS/*.rpm -y
- LibreOffice and its dependencies will be installed and can be found in the following location:
/opt/libreoffice6.3
- LibreOffice configuration based on above locations for alfresco would be:
ooo.exe=/opt/libreoffice6.3/program/soffice.bin
ooo.enabled=false ooo.port=8100 jodconverter.enabled=true jodconverter.officeHome=/opt/libreoffice6.3 jodconverter.portNumbers=8100
Note: For our convenience we will be creating 'links' to executable and libraries at later stage to keep everything in one place. We have a libreoffice folder within '/usr/local/alfresco-community62ga/' directory when we created the initial structure for setup. You can choose to keep executables and library at default location (as shown above) and use the above given properties in alfresco-global.properties as is. It is up to you.
Install ActiveMQ 5.15.8 (Optional):
This step is optional, you can do it if you want to use transformation services or plan to use it in future. If you want to continue using legacy transformation services then skip this step. For this post we will be using legacy transformation services so, I have marked this step as optional but want to go through installation steps for the benefit of others who plan to use transformation services down the line.
- Extract the package '/home/centos/Downloads/apache-activemq-5.15.8-bin.tar.gz' and copy the contents of 'apache-activemq-5.15.8-bin' into '/usr/local/alfresco-community62ga/activemq' directory
$ sudo cp -R /home/centos/Downloads/apache-activemq-5.15.8-bin/ /usr/local/alfresco-community62ga/activemq/
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.If you do setup ActiveMQ as a future plan and not using ActiveMQ, then disable the service and ports. Enable them back when you are ready to use transformation services.
- We will create a system service for activemq
$ sudo vim /etc/systemd/system/activemq.service
# Put the below instructions in activemq.service and save
[Unit] Description=ActiveMQ service After=network.target [Service] Type=forking ExecStart=/usr/local/alfresco-community62ga/activemq/bin/activemq start ExecStop=/usr/local/alfresco-community62ga/activemq/bin/activemq stop User=alfresco Group=Alfresco WorkingDirectory=~/usr/local/alfresco-community62ga/activemq/data Restart=always RestartSec=9 StandardOutput=syslog StandardError=syslog SyslogIdentifier=activemq [Install] WantedBy=multi-user.target
- Reload demons
$ sudo systemctl daemon-reload
- Change the permission for the activemq/data directory to alfresco:Alfresco (user:group)
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/activemq
$ sudo chown -R alfresco:Alfresco /usr/local/alfresco-community62ga/activemq/data
- Start and enable ActiveMQ to automatically start at boot time
$ sudo systemctl start activemq
$ sudo systemctl enable activemq
- To check status whether activemq service is running or not, use below given command:
$ sudo systemctl status activemq
- We will open following ports:
- 8161 --> for Web Console - 5672 --> for AMQP - 61616 --> for OpenWire - 61613 --> for STOMP
$ sudo firewall-cmd --zone=public --permanent --add-port=8161/tcp $ sudo firewall-cmd --zone=public --permanent --add-port=5672/tcp $ sudo firewall-cmd --zone=public --permanent --add-port=61616/tcp $ sudo firewall-cmd --zone=public --permanent --add-port=61613/tcp $ sudo firewall-cmd --reload
- Test the web console: http://localhost:8161/admin
- If you see '503' http status code and page doesn't show up then this could due to SELinux or Permission issues. Run following command to allow SELinux pass the request on 8161 port and fix permissions:
$ sudo semanage port -a -t http_port_t -p tcp 8161
- One of the directory named 'tmp' is created by activemq at run time may be causing permission issues since service is started as 'alfresco' user and not the 'root' user, so we will create 'tmp' directory before hand and put appropriate permissions for the safe side:
$ sudo mkdir /usr/local/alfresco-community62ga/activemq/tmp $ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/activemq/tmp $ sudo chmod -R 775 /usr/local/alfresco-community62ga/activemq/tmp
Reminder: Now that everything setup and working, we will disable the service and disable the ports we opened above as, for this setup we are not using transformation services.
- Extract the package '/home/centos/Downloads/apache-tomcat-8.5.43.tar.gz' and copy the contents of 'apache-tomcat-8.5.43' into '/usr/local/alfresco-community62ga/tomcat' directory
$ sudo cp -R /home/centos/Downloads/apache-tomcat-8.5.43/ /usr/local/alfresco-community62ga/tomcat/
- Update directory permissions:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga $ sudo chmod -R 755 /usr/local/alfresco-community62ga/tomcat/bin $ sudo chmod -R 755 /usr/local/alfresco-community62ga/tomcat/conf $ sudo chmod -R 755 /usr/local/alfresco-community62ga/tomcat/shared $ sudo chmod -R 755 /usr/local/alfresco-community62ga/tomcat/lib $ sudo chmod -R 775 /usr/local/alfresco-community62ga/tomcat/temp $ sudo chmod -R 775 /usr/local/alfresco-community62ga/tomcat/logs $ sudo chmod -R 775 /usr/local/alfresco-community62ga/tomcat/work $ sudo chmod -R 775 /usr/local/alfresco-community62ga/tomcat/webapps
- We will create a system service for tomcat
$ sudo vim /etc/systemd/system/tomcat.service
# Put the below instructions in tomcat.service and save
#Systemd unit file for tomcat [Unit] Description=Apache Tomcat Web Application Container After=syslog.target network.target [Service] Type=forking Restart=always Environment=JAVA_HOME=/usr/lib/jvm/jre Environment=CATALINA_PID=/usr/local/alfresco-community62ga/tomcat/temp/tomcat.pid Environment=CATALINA_HOME=/usr/local/alfresco-community62ga/tomcat Environment=CATALINA_BASE=/usr/local/alfresco-community62ga/tomcat Environment='CATALINA_OPTS=-Xms3G -Xmx4G -Xss1024k -server -XX:+UseParallelGC' Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom' ExecStart=/usr/local/alfresco-community62ga/tomcat/bin/startup.sh ExecStop=/bin/kill -15 $MAINPID WorkingDirectory=/usr/local/alfresco-community62ga/tomcat User=alfresco Group=Alfresco [Install] WantedBy=multi-user.target
- Reload demons
$ sudo systemctl daemon-reload
- Start and enable Tomcat to automatically start at boot time
$ sudo systemctl start tomcat
$ sudo systemctl enable tomcat
- To check status whether tomcat service is running or not, use below given command:
$ sudo systemctl status tomcat
- We will open following ports for alfresco and share access:
- 8080 - 8443
$ sudo firewall-cmd --zone=public --permanent --add-port=8080/tcp $ sudo firewall-cmd --zone=public --permanent --add-port=8443/tcp $ sudo firewall-cmd --reload
Setup and Configure ACS:
- Copy contents from “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/alf_data/keystore” into “/usr/local/alfresco-community62ga/alf_data/keystore”
- Following files will be copied:
- keystore -> Secret key keystore containing the secret key used to encrypt and decrypt node properties.
- keystore-passwords.properties -> Contains password protecting the keystore entries.
$ sudo cp /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/alf_data/keystore/* /usr/local/alfresco-community62ga/alf_data/keystore/
- Copy contents from “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/keystore” into “/usr/local/alfresco-community62ga/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.sh -> Shell script file for generating secure keys for SOLR communication.
$ sudo cp /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/keystore/* /usr/local/alfresco-community62ga/alf_data/keystore/
Note: These files will be used to setup Data Encryption (not supported on community version) and SSL 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)
- Update the file permissions for '/usr/local/alfresco-community62ga/alf_data/keystore' directory:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/alf_data/keystore
$ sudo chmod -R 755 /usr/local/alfresco-community62ga/alf_data/keystore
- Copy contents from “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/amps” into “/usr/local/alfresco-community62ga/amps”. We will be installing alfresco module packages (amps) at later stage.
$ sudo cp /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/amps/alfresco-share-services.amp /usr/local/alfresco-community62ga/amps/
- 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:
- support-tools-repo-1.1.0.0-amp.amp
- Copy 'support-tools-repo' amp to "/usr/local/alfresco-community62ga/amps/" directory
- support-tools-share-1.1.0.0-amp.amp
- Copy 'support-tools-share' amp to "/usr/local/alfresco-community62ga/amps_share/" directory
- javascript-console-repo-0.6.amp
- Copy 'javascript-console-repo' amp to "/usr/local/alfresco-community62ga/amps/" directory
- javascript-console-share-0.6.amp
- Copy 'javascript-console-share' amp to "/usr/local/alfresco-community62ga/amps_share/" directory
- Update the file permissions for '/usr/local/alfresco-community62ga/amps' and '/usr/local/alfresco-community62ga/amps_share' directory:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/amps
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/amps_share
$ sudo chmod -R 755 /usr/local/alfresco-community62ga/amps
$ sudo chmod -R 755 /usr/local/alfresco-community62ga/amps_share
- Copy the contents from “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/bin” into “/usr/local/alfresco-community62ga/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.sh -> 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/community/tasks/amp-install.html
- clean_tomcat.sh -> Shell script for cleaning out temporary application server files from previous installations.
$ sudo cp /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/bin/alfresco-mmt.jar /usr/local/alfresco-community62ga/bin/
$ sudo cp /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/bin/apply_amps.sh /usr/local/alfresco-community62ga/bin/
$ sudo cp /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/bin/clean_tomcat.sh /usr/local/alfresco-community62ga/bin/
- Update the file permissions for '/usr/local/alfresco-community62ga/bin' directory:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/bin
$ sudo chmod -R 755 /usr/local/alfresco-community62ga/bin
- Copy the contents from “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/licenses” into “/usr/local/alfresco-community62ga/licenses” directory. It contains files that have information about license terms used by alfresco including all third party licenses.
$ sudo cp -R /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/licenses/* /usr/local/alfresco-community62ga/licenses/
- Update the file permissions for '/usr/local/alfresco-community62ga/licenses' directory:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/licenses
- Extract “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/alfresco-pdf-renderer/alfresco-pdf-renderer-1.1-linux.tgz"
- Copy the file "/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/alfresco-pdf-renderer/alfresco-pdf-renderer" into “/usr/local/alfresco-community62ga/alfresco-pdf-renderer/” directory
$ sudo cp /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/alfresco-pdf-renderer/alfresco-pdf-renderer /usr/local/alfresco-community62ga/alfresco-pdf-renderer/
- You would have following file in “/usr/local/alfresco-community62ga/alfresco-pdf-renderer/” directory:
- alfresco-pdf-renderer [Full path: /usr/local/alfresco-community62ga/alfresco-pdf-renderer/alfresco-pdf-renderer]
- Update the file permissions for '/usr/local/alfresco-community62ga/alfresco-pdf-renderer' directory:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/alfresco-pdf-renderer
$ sudo chmod -R 755 /usr/local/alfresco-community62ga/alfresco-pdf-renderer
- Create link for Imagemagick
- /usr/bin/convert - /usr/lib64/ImageMagick-7.0.10
$ sudo ln -s /usr/bin/convert /usr/local/alfresco-community62ga/imagemagick $ sudo ln -s /usr/lib64/ImageMagick-7.0.10/config-Q16HDRI /usr/local/alfresco-community62ga/imagemagick $ sudo ln -s /usr/lib64/ImageMagick-7.0.10/modules-Q16HDRI /usr/local/alfresco-community62ga/imagemagick
- Imagemagick configuration based on above link locations for alfresco would now be:
img.root=/usr/local/alfresco-community62ga/imagemagick img.exe=${img.root}/convert img.config=${img.root}/config-Q16HDRI img.coders=${img.root}/modules-Q16HDRI/coders img.dyn=/usr/bin img.gslib=/usr/bin
- Create link for Libreoffice
- /opt/libreoffice6.3
$ sudo ln -s /opt/libreoffice6.3/* /usr/local/alfresco-community62ga/libreoffice
- Libreoffice configuration based on above link locations for alfresco would now be:
ooo.exe=/usr/local/alfresco-community62ga/libreoffice/program/soffice.bin ooo.enabled=false ooo.port=8100 jodconverter.enabled=true jodconverter.officeHome=/usr/local/alfresco-community62ga/libreoffice jodconverter.portNumbers=8100
- Copy the contents from “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/web-server/conf” into “/usr/local/alfresco-community62ga/tomcat/conf” folder. conf directory contains Catalina repository and Share xml files.
$ sudo cp -R /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/web-server/conf /usr/local/alfresco-community62ga/tomcat/conf/
- Copy the contents from “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/web-server/lib/” into “/usr/local/alfresco-community62ga/tomcat/lib/” folder. 'lib' directory contains the PostgreSQL JDBC jar file (postgresql-42.2.6.jar).
$ sudo cp /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/web-server/lib/* /usr/local/alfresco-community62ga/tomcat/lib/
- Update the permissions for '/usr/local/alfresco-community62ga/tomcat/lib/' directory:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/tomcat/lib
$ sudo chmod 755 /usr/local/alfresco-community62ga/tomcat/lib/*.jar
- Copy the contents from “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/web-server/shared/classes” into “/usr/local/alfresco-community62ga/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.
$ sudo cp -R /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/web-server/shared/classes /usr/local/alfresco-community62ga/tomcat/shared/classes/
- Update the permissions for '/usr/local/alfresco-community62ga/tomcat/shared/classes/' directory:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/tomcat/shared
$ sudo chmod -R 755 /usr/local/alfresco-community62ga/tomcat/shared
- Delete all files/folders from “/usr/local/alfresco-community62ga/tomcat/webapps”
$ sudo rm -rf /usr/local/alfresco-community62ga/tomcat/webapps/*
- Copy the contents from “/home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/web-server/webapps” into “/usr/local/alfresco-community62ga/tomcat/webapps/” folder.
$ sudo cp /home/centos/Downloads/alfresco-content-services-community-distribution-6.2.0-ga/web-server/webapps/*.war /usr/local/alfresco-community62ga/tomcat/webapps/
- 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.
- Update the permissions for '/usr/local/alfresco-community62ga/tomcat/webapps/' directory:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/tomcat/webapps/
$ sudo chmod -R 775 /usr/local/alfresco-community62ga/tomcat/webapps/*.war
- Delete all files/folders from “/usr/local/alfresco-community62ga/tomcat/work/Catalina/localhost” if there are any
$ sudo rm -rf /usr/local/alfresco-community62ga/tomcat/work/Catalina/localhost/*
- Update the permissions for '/usr/local/alfresco-community62ga/tomcat/work/Catalina/localhost' directory:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/tomcat/work/Catalina/localhost
$ sudo chmod -R 775 /usr/local/alfresco-community62ga/tomcat/work/Catalina/localhost
- Open server.xml file which can be found under: “/usr/local/alfresco-community62ga/tomcat/conf/” directory [Full path: /usr/local/alfresco-community62ga/tomcat/conf/server.xml] and update following:
- 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.
- 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.
<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.
See here for more details:
<Connector port="8009" URIEncoding="UTF-8" protocol="AJP/1.3" redirectPort="8443" xpoweredBy="false"/>
- Open the /usr/local/alfresco-community62ga/tomcat/conf/catalina.properties file and update following:
- Change the value of the shared.loader= property to the following:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
- Rename “/usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco-global.properties.sample” to “alfresco-global.properties”
$ sudo mv /usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco-global.properties.sample /usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco-global.properties
- Update the file permissions for '/usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco-global.properties' file:
$ sudo sudo chgrp Alfresco /usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco-global.properties
$ sudo chmod 775 /usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco-global.properties
- Open and edit “/usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco-global.properties” and add the following configuration properties:
- Add the “dir.root” property as path to alf_data folder.
dir.root=/usr/local/alfresco-community62ga/alf_data
- Add alfresco and share host, port, context and protocol specific properties. For more details see: https://docs.alfresco.com/content-services/6.2/config/#using-alfresco-globalproperties
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
- Add the alfresco-pdf-renderer (used for pdf previews), imagemagick (used for image preview and thumbnail generation), libreoffice and jodconverter properties.
Within Alfresco, you can transform a document from one format to another. This feature requires you to install LibreOffice or OpenOffice.org.
OOoJODconverter
The JODConverter integration, which is a library that improves the stability and performance of OpenOffice.org or LibreOffice within Alfresco. The OOoJODConverter runs on the same machine as the Alfresco server and it supports:
- a pool of separate OpenOffice processes
- automatic restart of crashed OpenOffice processes
- automatic termination of slow OpenOffice operations
- automatic restart of any OpenOffice process after a number of operations (this is a workaround for OpenOffice memory leaks)
OOoDirect
The subsystem for direct OpenOffice integration, in which the Alfresco server manages OpenOffice directly. To enable or disable this subsystem, use the following property:
ooo.enabled=false
Note:
If you install Alfresco manually, by default, the OOoDirect subsystem is enabled, and the OOoJodconverter subsystem is disabled. Although it is possible to run both subsystems, Alfresco recommends that you enable only one at a time. To take advantage of the stability and performance benefits of the OOoJodconverter subsystem, ensure that you disable OOoDirect and enable OOoJodConverter using the following properties in the alfresco-global.properties file:
ooo.enabled=false
jodconverter.enabled=true
#PDF Renderer config, used for previewing pdf docs. alfresco-pdf-renderer.root=/usr/local/alfresco-community62ga/alfresco-pdf-renderer alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer #Imagemagick config with folder links to actual install location img.root=/usr/local/alfresco-community62ga/imagemagick img.exe=${img.root}/convert img.config=${img.root}/config-Q16HDRI img.coders=${img.root}/modules-Q16HDRI/coders img.dyn=/usr/bin img.gslib=/usr/bin #libreoffice config with folder links to actual install location ooo.exe=/usr/local/alfresco-community62ga/libreoffice/program/soffice.bin ooo.enabled=false ooo.port=8100 jodconverter.enabled=true jodconverter.officeHome=/usr/local/alfresco-community62ga/libreoffice jodconverter.portNumbers=8100
- Disable transformation service and enable legacy transformation service:
transform.service.enabled=false local.transform.service.enabled=false legacy.transform.service.enabled=true
- Add the activemq url property and disable messaging subsystem until you want to configure transformation services. It will be used when you setup transformation service. Here we are using legacy transformation service so keeping message broker as disabled.
messaging.broker.url=tcp://localhost:61616
messaging.subsystem.autoStart=false
We are not setting up transformation service currently but keeping activemq setup ready for future in case you would like to start using transformation service. For more details visit:
https://hub.alfresco.com/t5/alfresco-content-services-blog/introducing-alfresco-transform-service-new-with-acs-6-1/ba-p/288174https://hub.alfresco.com/t5/alfresco-content-services-hub/alfresco-community-edition-201910-ea-release-notes/ba-p/292243https://github.com/Alfresco/alfresco-transform-corehttps://github.com/Alfresco/alfresco-transform-core/tree/master/alfresco-transform-core-aio/alfresco-transform-core-aio-boot
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
- 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=/usr/local/alfresco-community62ga
- 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 /usr/local/alfresco-community62ga/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.
- support-tools-repo-1.1.0.0-amp.amp -> A module that provides utilities for developers and administrators via alfresco admin console.
- support-tools-share-1.1.0.0-amp.amp -> A module that provides utilities for developers and administrators via share admin console.
For more details visit:
- javascript-console-repo-0.6.amp -> A module that provides ability for developers and administrators to execute JavaScript code.
- javascript-console-share-0.6.amp -> A module that provides ability for developers and administrators to execute JavaScript code.
For more details visit:
- Execute 'apply_amps.sh' script to apply amps, it will install amps copied under /usr/local/alfresco-community62ga/amps and /usr/local/alfresco-community62ga/amps_share directories to alfresco.war and share.war:
$ sudo $ALF_HOME/bin/apply_amps.sh
OR $ sudo /usr/local/alfresco-community62ga/bin/apply_amps.sh
- You would see following output as result of executing 'apply_amps.sh':
Module 'alfresco-share-services' installed in '/usr/local/alfresco-community62ga/tomcat/webapps/alfresco.war' - Title: Alfresco Share Services AMP - Version: 6.2.0 - Install Date: Thu Jan 28 20:03:49 EST 2021 - Description: Module to be applied to alfresco.war, containing APIs for Alfresco Share Module 'ootbee-support-tools-repo' installed in '/usr/local/alfresco-community62ga/tomcat/webapps/alfresco.war' - Title: OOTBee Support Tools - Repository Module - Version: 1.1.0.0.9999999999 - Install Date: Thu Jan 28 20:03:48 EST 2021 - 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 '/usr/local/alfresco-community62ga/tomcat/webapps/alfresco.war' - Title: fme Javascript Console Repository Extension - Version: 0.6.1604291213 - Install Date: Thu Jan 28 20:03:46 EST 2021 - Description: Adminstration console module to execute arbitrary javascript code. Module 'support-tools-share' installed in '/usr/local/alfresco-community62ga/tomcat/webapps/share.war' - Title: OOTBee Support Tools - Share Module - Version: 1.1.0.0.9999999999 - Install Date: Thu Jan 28 20:03:55 EST 2021 - 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 '/usr/local/alfresco-community62ga/tomcat/webapps/share.war' - Title: fme Javascript Console Share Extension - Version: 0.6.1604291213 - Install Date: Thu Jan 28 20:03:53 EST 2021 - Description: Adminstration console module to execute arbitrary javascript code. About to clean out /usr/local/alfresco-community62ga/tomcat/webapps/alfresco and share directories and temporary files... Press control-c to stop this script . . . Press any other key to continue . . . Cleaning temporary Alfresco files from Tomcat...
- After amps are install, you can choose to remove the backup files created by apply_amps.sh tool. Make sure the file permissions are fixed before restarting the tomcat.
- When amps will be install, it may end up creating files with root user (as we would be using sudo) so make sure permissions are fixed back, Or install the amps using the 'alfresco' user mode (sudo -u alfresco). Update the file permissions for '/usr/local/alfresco-community62ga/tomcat/webapps/*.war' files:
$ sudo chgrp -R Alfresco /usr/local/alfresco-community62ga/tomcat/webapps/*.war $ sudo chmod -R 775 /usr/local/alfresco-community62ga/tomcat/webapps/*.war
- 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>
- There is a known issue with share where user search doesn't work. For more info see these issues:
- Find the <show-authorization-status>true</show-authorization-status> tag and change the value to 'false', in the config having condition as "users".
i.e. <show-authorization-status>false</show-authorization-status>
$ sudo sed -i 's@<show-authorization-status>true</show-authorization-status>@<show-authorization-status>false</show-authorization-status>@' \ /usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml
- 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 /usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml, Add below given config where <show-authorization-status> value should be false.
$ sudo vim /usr/local/alfresco-community62ga/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):
- Unzip the “alfresco-search-services-1.4.0.zip” package.
- Copy the extracted folder “alfresco-search-services” to “/usr/local/alfresco-search-services/”
$ sudo cp -R /home/centos/Downloads/alfresco-search-services/* /usr/local/alfresco-search-services/
- Update the permissions, we will use the user and group that we created initially for search services:
$ sudo chown -R solr:Solr /usr/local/alfresco-search-services
$ sudo chmod -R 755 /usr/local/alfresco-search-services
$ sudo chmod -R 775 /usr/local/alfresco-search-services/logs
$ sudo chmod -R 775 /usr/local/alfresco-search-services/solrhome
- Open “/usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco-global.properties” and add the following configuration properties:
$ sudo vim /usr/local/alfresco-community62ga/tomcat/shared/classes/alfresco-global.properties
solr.host=localhost solr.port=8983 solr.secureComms=none #Possible values are: none, https solr.base.url=/solr index.subsystem.name=solr6
Note: We are setting up solr6 without SSL, hence using non SSL port and setting secureComms property as none.
- We are enabling the multi language search support, Its optional if you wish to enable it. By default it is disabled. Open and edit “/usr/local/alfresco-search-services/solrhome/conf/shared.properties” and update following:
$ sudo vim /usr/local/alfresco-search-services/solrhome/conf/shared.properties
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
- I would recommend enabling these settings, as there seems to an ongoing java heap space issue if these properties are disabled. For more info see below issues:
- 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 and edit “/usr/local/alfresco-search-services/solrhome/conf/shared.properties” and update following:
$ sudo vim /usr/local/alfresco-search-services/solrhome/conf/shared.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
More details on shared.properties can be found here: https://docs.alfresco.com/search-community/concepts/solr-shared-properties.html
- If you would setup search services on a different or remote machine, you would need to set the SOLR_SOLR_HOST, SOLR_SOLR_PORT, SOLR_SOLR_BASEURL, SOLR_ALFRESCO_HOST, SOLR_ALFRESCO_PORT and SOLR_ALFRESCO_BASEURL environment variables. This is optional but we will keep the mapping for future reference.
- We are setting up without SSL, so set this variable SOLR_ALFRESCO_SECURECOMMS to none. It is mandatory as default value is https. Open and edit “/usr/local/alfresco-search-services/solr.in.sh” file and add following at the end of the file:
$ sudo vim /usr/local/alfresco-search-services/solr.in.sh
SOLR_SOLR_HOST=localhost SOLR_SOLR_PORT=8983 SOLR_SOLR_BASEURL=/solr SOLR_ALFRESCO_HOST=localhost SOLR_ALFRESCO_PORT=8080 SOLR_ALFRESCO_BASEURL=/alfresco #Since we are setting up with no SSL, this property need to be set to none. Default is https SOLR_ALFRESCO_SECURECOMMS=none
- You can also set SOLR_HOME variable in solr.in.sh (if you see error like ERROR: Solr home directory /usr/local/alfresco-search-services must contain solr.xml, then this setting is must)
SOLR_HOME=/usr/local/alfresco-search-services/solrhome
- Alternatively you can set the properties in “/usr/local/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.
$ sudo vim /usr/local/alfresco-search-services/solrhome/templates/rerank/conf/solrcore.properties
alfresco.secureComms=none
For all the externalized search service configurations (environment variables), visit: https://docs.alfresco.com/search-community/concepts/external-properties-solr.html
- Starting and stopping solr6 (aka alfresco search service) instructions.
Starting Solr6:
sudo -u solr $SOLR_HOME/solr/bin/solr 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:
sudo -u solr $SOLR_HOME/solr/bin/solr stop -p 8983 Or sudo -u solr $SOLR_HOME/solr/bin/solr stop -all
- Configure solr log, The logs are stored in the /usr/local/alfresco-search-services/logs/solr.log file, by default. This can be configured in solr.in.sh using SOLR_LOGS_DIR. This is optional setup. We are keeping default settings
SOLR_LOGS_DIR=../../logs LOG4J_PROPS=$SOLR_LOGS_DIR/log4j.properties
- We will create a system service for solr
$ sudo vim /etc/systemd/system/solr.service
# Systemd unit file for solr6 [Unit] Description=Alfresco search service After=syslog.target network.target [Service] Type=forking Restart=always Environment=JAVA_HOME=/usr/lib/jvm/jre ExecStart=/usr/local/alfresco-search-services/solr/bin/solr start ExecStop=/usr/local/alfresco-search-services/solr/bin/solr stop -all User=solr Group=Solr [Install] WantedBy=multi-user.target
- Reload demons
$ sudo systemctl daemon-reload
- Start and enable solr to automatically start at boot time
$ sudo systemctl start solr
$ sudo systemctl enable solr
- To check status whether solr service is running or not, use below given command:
$ sudo systemctl status solr
- We will open following ports for alfresco and share access:
- 8983 --> for alfresco and share access.
$ sudo firewall-cmd --zone=public --permanent --add-port=8983/tcp $ sudo firewall-cmd --reload
- Verify the SOLR Admin UI. Use the URL below to launch SOLR Admin UI and validate the status and cores:
http://localhost:8983/solr http://localhost:8983/solr/#/alfresco --> To check alfresco core status
Note: If you are planning to use Alfresco Search Services 2.0, make sure you check the Supported Platforms documentation here and use appropriate version of ACS 6.2. Steps would be same irrespective of the versions
Now we are done with all the setup and config changes. Here are full “alfresco-global.properties”, “custom-log4j.properties”, “shared.properties” and “solr.in.sh” files for reference:
############################### ## Common Alfresco Properties # ############################### dir.root=/usr/local/alfresco-community62ga/alf_data dir.contentstore=${dir.root}/contentstore dir.contentstore.deleted=${dir.root}/contentstore.deleted dir.keystore=${dir.root}/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 ### External executable locations ### #PDF Renderer config, used for previewing pdf docs. alfresco-pdf-renderer.root=/usr/local/alfresco-community62ga/alfresco-pdf-renderer alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer #Imagemagick config without folder links and with actual install location #img.root=/usr/lib64/ImageMagick-7.0.10 #img.dyn=/usr/bin #img.gslib=/usr/bin #img.exe=${img.dyn}/convert #img.config=${img.root}/config-Q16HDRI #img.coders=${img.root}/modules-Q16HDRI/coders #Imagemagick config with folder links to actual install location img.root=/usr/local/alfresco-community62ga/imagemagick img.exe=${img.root}/convert img.config=${img.root}/config-Q16HDRI img.coders=${img.root}/modules-Q16HDRI/coders img.dyn=/usr/bin img.gslib=/usr/bin ####LibreOffice and jodconverter configurations #You can transform a document from one format to another using the OOoJodconverter subsystem. This feature requires you to install LibreOffice. #The Jodconverter integration is a library that improves the stability and performance of LibreOffice in Alfresco Content Services. #The Jodconverter runs on the same machine as the Alfresco Content Services server and it supports: # - a pool of separate LibreOffice processes # - automatic restart of crashed LibreOffice processes # - automatic termination of slow LibreOffice operations # - automatic restart of any LibreOffice process after a number of operations (this is a workaround for LibreOffice memory leaks) #OOoDirect #The subsystem for direct OpenOffice integration, in which the Alfresco server manages OpenOffice directly. To enable or disable this subsystem, use the following property: #ooo.enabled=false #Note: #If you install Alfresco manually, by default, the OOoDirect subsystem is enabled, and the OOoJodconverter subsystem is disabled. #Although it is possible to run both subsystems, Alfresco recommends that you enable only one at a time. #To take advantage of the stability and performance benefits of the OOoJodconverter subsystem, #ensure that you disable OOoDirect and enable OOoJodConverter using the following properties in the alfresco-global.properties file: ooo.enabled=false #jodconverter.enabled=true #libreoffice config without folder links and with actual install location #ooo.exe=/opt/libreoffice6.3/program/soffice.bin #ooo.enabled=false #ooo.port=8100 #jodconverter.enabled=true #jodconverter.officeHome=/opt/libreoffice6.3 #jodconverter.portNumbers=8100 #libreoffice config with folder links to actual install location ooo.exe=/usr/local/alfresco-community62ga/libreoffice/program/soffice.bin ooo.enabled=false ooo.port=8100 jodconverter.enabled=true jodconverter.officeHome=/usr/local/alfresco-community62ga/libreoffice jodconverter.portNumbers=8100 ### E-mail site invitation setting ### notification.email.siteinvite=false ### License location ### dir.license.external=/usr/local/alfresco-community62ga #Confiure ActiveMQ URL. messaging.broker.url=tcp://localhost:61616 messaging.subsystem.autoStart=false #Transform service configurations transform.service.enabled=false local.transform.service.enabled=false legacy.transform.service.enabled=true ### Allow extended ResultSet processing security.anyDenyDenies=false ### Smart Folders Config Properties ### smart.folders.enabled=false ### Remote JMX (Default: disabled) ### alfresco.jmx.connector.enabled=false ################ 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 #none, https solr.secureComms=none solr.base.url=/solr index.subsystem.name=solr6
#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=debug #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=DEBUG log4j.logger.org.alfresco.repo.content.metadata.MetadataExtracterRegistry=DEBUG #Thumbnail logs log4j.logger.org.alfresco.repo.thumbnail=DEBUG # FTP server debugging log4j.logger.org.alfresco.ftp.protocol=debug log4j.logger.org.alfresco.ftp.server=debug
# 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 Propeties 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 * * * * ? *
SOLR_JAVA_MEM="-Xms2g -Xmx2g" SOLR_LOGS_DIR=../../logs LOG4J_PROPS=$SOLR_LOGS_DIR/log4j.properties SOLR_SOLR_HOST=localhost SOLR_SOLR_PORT=8983 SOLR_SOLR_BASEURL=/solr SOLR_ALFRESCO_HOST=localhost SOLR_ALFRESCO_PORT=8080 SOLR_ALFRESCO_BASEURL=/alfresco #Since we are setting up with no SSL, this property need to be set to none. Default is https SOLR_ALFRESCO_SECURECOMMS=none
Start and test:
There are three services that we need to start one by one in order:
- Start DB
- To start DB, you can do either of the following:
$ sudo systemctl start postgresql-11.service
- Start Alfresco
- To start Alfresco, you can do either of the following:
$ sudo systemctl start tomcat
- Start Solr6
- To start SOLR6, use the following command by navigating to “/usr/local/alfresco-search-services/solr/bin” folder via command prompt:
- Initial start only: sudo -u solr $SOLR_HOME/solr/bin/solr start -a "-Dcreate.alfresco.defaults=alfresco,archive"
- Consecutive start command: sudo systemctl start solr
Note: See the search service configuration section for more details.
I have created a convenience script “start.sh”, you can use this to start all services instead of doing one by one.
#!/bin/bash #Order of operation ## - Start DB ## - Start ACS ## - Start SOLR printf "\n------------------------------ Starting services ------------------------- \n" #User can pass ALF_HOME path. Defaults to "/usr/local/alfresco-community62ga". export ALF_HOME=${1:-"/usr/local/alfresco-community62ga"} #User can pass SOLR_HOME path. Defaults to "/usr/local/alfresco-search-services". export SOLR_HOME=${2:-"/usr/local/alfresco-search-services"} export CATALINA_HOME=$ALF_HOME/tomcat export CATALINA_TMPDIR=$CATALINA_HOME/temp export JRE_HOME=$JAVA_HOME # Check if JRE_HOME is set in path variable or not, else set default path. It is mandatory for acs to start if [ -z "$JRE_HOME" ] then echo "JRE_HOME could not be found, setting the default..." export JRE_HOME="/usr/lib/jvm/java-11" fi #Export JRE_HOME to PATH export PATH=$PATH:$JRE_HOME/bin # Check if ALF_HOME is set in path variable or not, we may need it for executing shell scripts as needed. if [[ "$PATH" == *"$ALF_HOME"* ]]; then echo "$ALF_HOME already set in PATH variable." else export PATH=$PATH:$ALF_HOME fi # Check if SOLR_HOME is set in path variable or not, we may need it for executing shell scripts as needed. if [[ "$PATH" == *"$SOLR_HOME"* ]]; then echo "$SOLR_HOME already set in PATH variable." else export PATH=$PATH:$SOLR_HOME fi #User need to pass this param on initial startup in order to create the cores. if core values are not passed then default 'alfresco and archive' will be used. SOLR_CORES=${3:-"alfresco,archive"} JAVA_OPTS="-Xms3G -Xmx4G -Xss1024k" JAVA_OPTS="${JAVA_OPTS} -XX:+UseG1GC -XX:+UseStringDeduplication" JAVA_OPTS="${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom" JAVA_OPTS="${JAVA_OPTS} -Djava.io.tmpdir=${CATALINA_TMPDIR}" JAVA_OPTS="${JAVA_OPTS} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8" JAVA_OPTS="${JAVA_OPTS} -Dalfresco.home=${ALF_HOME} -Dcom.sun.management.jmxremote=true" JAVA_OPTS="${JAVA_OPTS} -server" echo "-------------------------------------------" echo CATALINA_HOME: $CATALINA_HOME echo CATALINA_TMPDIR: $CATALINA_TMPDIR echo JRE_HOME: $JRE_HOME echo JAVA_OPTS: $JAVA_OPTS echo PATH: $PATH echo SOLR_HOME: $SOLR_HOME echo ALF_HOME: $ALF_HOME echo "-------------------------------------------" StartDB() { printf "\nStarting Postgresql... \n" sudo systemctl start postgresql-11.service if [[ $? = 0 ]] then echo "postgresql-11.service started successfully." else echo "Failed to start postgresql-11.service!" exit 1 fi } StartACS() { printf "\nStarting Alfresco Tomcat... \n" sudo systemctl start tomcat if [[ $? = 0 ]] then echo "tomcat service started successfully." else echo "Failed to start tomcat service!" exit 1 fi } StartSOLR() { #flag for creating the cores on first startup INITIAL=false #Setting the context to solrhome cd $SOLR_HOME/solrhome for CORE in ${SOLR_CORES//,/ } do echo "Checking availability of the core: $CORE" if [ -d "$CORE" ]; then echo "'$CORE' found.." INITIAL=false else echo "Warning: '$CORE' NOT found." INITIAL=true fi done #Going back to original context cd $ALF_HOME if [[ $INITIAL == true ]]; then printf "\nStarting solr6 with initial mode, core '$SOLR_CORES' will be created... \n" sudo -u solr $SOLR_HOME/solr/bin/solr start -a "-Dcreate.alfresco.defaults=alfresco,archive" else printf "\nStarting solr6... \n" sudo systemctl start solr if [[ $? = 0 ]] then echo "solr6 service started successfully." else echo "Failed to start solr6 service!" exit 1 fi fi } ################################### StartDB StartACS StartSOLR ###################################
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' (/usr/local/alfresco-community62ga/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" clean the tomcat 'work' (/usr/local/alfresco-community62ga/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 Alfresco
- To stop Alfresco, you can do either of the following:
$ sudo systemctl stop tomcat
- Stop DB
- To stop DB, you can do either of the following:
$ sudo systemctl stop postgresql-11.service
- Stop Solr6
- To stop SOLR6, use the following command by navigating to “/usr/local/alfresco-search-services/solr/bin” folder via command prompt:
- sudo -u solr $SOLR_HOME/solr/bin/solr stop -all
- Or sudo -u solr $SOLR_HOME/solr/bin/solr stop -p 8983
Note: See the search service configuration section for more details.
I have created a convenience script “stop.sh”, you can use this to stop all services instead of doing one by one.
#!/bin/bash #Order of operation ## - Stop ACS ## - Stop DB ## - Stop Solr printf "\n------------------------------ Stopping services ------------------------- \n" #User can pass ALF_HOME path. Defaults to "/usr/local/alfresco-community62ga". export ALF_HOME=${1:-"/usr/local/alfresco-community62ga"} #User can pass SOLR_HOME path. Defaults to "/usr/local/alfresco-search-services". export SOLR_HOME=${2:-"/usr/local/alfresco-search-services"} export CATALINA_HOME=$ALF_HOME/tomcat export CATALINA_TMPDIR=$CATALINA_HOME/temp export JRE_HOME=$JAVA_HOME # Check if JRE_HOME is set in path variable or not, else set default path. It is mandatory for acs to start if [ -z "$JRE_HOME" ] then echo "JRE_HOME could not be found, setting the default..." export JRE_HOME="/usr/lib/jvm/java-11" fi #Export JRE_HOME to PATH export PATH=$PATH:$JRE_HOME/bin # Check if ALF_HOME is set in path variable or not, we may need it for executing shell scripts as needed. if [[ "$PATH" == *"$ALF_HOME"* ]]; then echo "$ALF_HOME already set in PATH variable." else export PATH=$PATH:$ALF_HOME fi # Check if SOLR_HOME is set in path variable or not, we may need it for executing shell scripts as needed. if [[ "$PATH" == *"$SOLR_HOME"* ]]; then echo "$SOLR_HOME already set in PATH variable." else export PATH=$PATH:$SOLR_HOME fi echo "---------------------------------------------" echo CATALINA_HOME: $CATALINA_HOME echo CATALINA_TMPDIR: $CATALINA_TMPDIR echo JRE_HOME: $JRE_HOME echo PATH: $PATH echo SOLR_HOME: $SOLR_HOME echo ALF_HOME: $ALF_HOME echo "---------------------------------------------" StopACS() { printf "\nShutting down Alfresco Tomcat... \n" sudo systemctl stop tomcat if [[ $? = 0 ]] then echo "tomcat service stopped successfully." else echo "Failed to stop tomcat service!" exit 1 fi } StopDB() { printf "\nShutting down Postgresql... \n" sudo systemctl stop postgresql-11.service if [[ $? = 0 ]] then echo "postgresql-11.service stopped successfully." else echo "Failed to stop postgresql-11.service!" exit 1 fi } StopSOLR() { printf "\nShutting down solr6... \n" sudo systemctl stop solr if [[ $? = 0 ]] then echo "solr6 service stopped successfully." else echo "Failed to stop solr6 service!" exit 1 fi } ################################### StopACS StopDB StopSOLR ###################################
Permissions at '/usr/local/alfresco-community62ga' directory level: drwxr-xr-x. 11 root Alfresco 222 Jan 25 19:55 activemq drwxrwxr-x. 5 root Alfresco 88 Jan 28 19:48 alf_data drwxr-xr-x. 2 root Alfresco 53 Jan 26 16:23 alfresco-pdf-renderer drwxr-xr-x. 2 root Alfresco 140 Jan 26 16:48 amps drwxr-xr-x. 2 root Alfresco 107 Jan 21 12:45 amps_share drwxr-xr-x. 2 root Alfresco 92 Jan 28 20:03 bin drwxr-xr-x. 2 root Alfresco 84 Jan 26 18:05 imagemagick drwxr-xr-x. 2 root Alfresco 163 Jan 26 18:11 libreoffice drwxr-xr-x. 3 root Alfresco 78 Jan 26 17:28 licenses drwxr-xr-x. 4 root Alfresco 53 Jan 21 12:45 modules -rwxr-xr-x. 1 root Alfresco 3839 Jan 29 17:27 start.sh -rwxr-xr-x. 1 root Alfresco 2428 Jan 29 17:28 stop.sh drwxr-xr-x. 10 root Alfresco 252 Jan 25 20:12 tomcat Permissions at '/usr/local/alfresco-community62ga/tomcat' directory level: drwxr-xr-x. 2 root Alfresco 4096 Jan 25 20:11 bin -rw-r--r--. 1 root Alfresco 19318 Jan 25 20:11 BUILDING.txt drwxr-xr-x. 3 root Alfresco 254 Jan 29 18:53 conf -rw-r--r--. 1 root Alfresco 5408 Jan 25 20:11 CONTRIBUTING.md drwxr-xr-x. 2 root Alfresco 4096 Jan 25 20:12 lib -rw-r--r--. 1 root Alfresco 57011 Jan 25 20:11 LICENSE drwxrwxr-x. 2 root Alfresco 197 Jan 29 17:06 logs -rw-r--r--. 1 root Alfresco 1726 Jan 25 20:11 NOTICE -rw-r--r--. 1 root Alfresco 3257 Jan 25 20:11 README.md -rw-r--r--. 1 root Alfresco 193 Jan 25 20:12 Readme.txt -rw-r--r--. 1 root Alfresco 7136 Jan 25 20:11 RELEASE-NOTES -rw-r--r--. 1 root Alfresco 16507 Jan 25 20:11 RUNNING.txt drwxr-xr-x. 4 root Alfresco 32 Jan 25 20:12 shared drwxrwxr-x. 5 root Alfresco 165 Jan 29 18:43 temp drwxrwxr-x. 6 root Alfresco 136 Jan 29 16:12 webapps drwxrwxr-x. 3 root Alfresco 22 Jan 25 20:56 work Permissions at '/usr/local/alfresco-community62ga/tomcat/logs' directory level: -rw-r-----. 1 alfresco Alfresco 3476532 Jan 29 18:43 catalina.2021-01-29.log -rw-r-----. 1 alfresco Alfresco 1475688 Jan 29 18:43 catalina.out -rw-r-----. 1 alfresco Alfresco 0 Jan 29 17:06 host-manager.2021-01-29.log -rw-r-----. 1 alfresco Alfresco 7187 Jan 29 18:43 localhost.2021-01-29.log -rw-r-----. 1 alfresco Alfresco 2470863 Jan 29 18:58 localhost_access_log.2021-01-29.txt -rw-r-----. 1 alfresco Alfresco 0 Jan 29 17:06 manager.2021-01-29.log Permissions at '/usr/local/alfresco-community62ga/tomcat/temp' directory level: drwxr-x---. 4 alfresco Alfresco 12288 Jan 29 18:43 Alfresco drwxr-x---. 2 alfresco Alfresco 6 Jan 28 19:48 Alfresco-WebScripts -rwxrwxr-x. 1 alfresco Alfresco 0 Jan 25 20:11 safeToDelete.tmp -rw-r-----. 1 alfresco Alfresco 5 Jan 29 18:42 tomcat.pid Permissions at '/usr/local/alfresco-community62ga/tomcat/webapps' directory level: drwxr-x---. 11 alfresco Alfresco 209 Jan 29 16:11 alfresco -rwxrwxr-x. 1 root Alfresco 191675102 Jan 28 20:03 alfresco.war drwxr-x---. 6 alfresco Alfresco 119 Jan 28 19:49 ROOT -rwxrwxr-x. 1 root Alfresco 275031 Jan 28 14:28 ROOT.war drwxr-x---. 16 alfresco Alfresco 4096 Jan 29 16:12 share -rwxrwxr-x. 1 root Alfresco 76888634 Jan 28 20:03 share.war drwxr-x---. 4 alfresco Alfresco 54 Jan 28 19:49 _vti_bin -rwxrwxr-x. 1 root Alfresco 762845 Jan 28 14:28 _vti_bin.war Permissions at '/usr/local/alfresco-community62ga/tomcat/work' directory level: drwxrwxr-x. 3 root Alfresco 23 Jan 25 20:56 Catalina
Permissions at '/usr/local/alfresco-search-services' directory level: drwxr-xr-x. 3 solr solr 23 Jan 29 17:13 contentstore drwxr-xr-x. 4 solr Solr 72 Jan 29 16:21 licenses drwxrwxr-x. 3 solr Solr 4096 Jan 29 18:42 logs -rwxr-xr-x. 1 solr Solr 1328 Jan 29 16:21 README.MD drwxr-xr-x. 6 solr Solr 159 Jan 29 16:21 solr drwxrwxr-x. 7 solr Solr 104 Jan 29 17:13 solrhome -rwxr-xr-x. 1 solr Solr 6764 Jan 29 16:21 solr.in.cmd -rwxr-xr-x. 1 solr Solr 7520 Jan 29 16:40 solr.in.sh Permissions at '/usr/local/alfresco-search-services/logs' directory level: drwxr-xr-x. 2 solr Solr 54 Jan 29 18:42 archived -rwxr-xr-x. 1 solr Solr 1770 Jan 29 16:21 log4j.properties -rwxr-xr-x. 1 solr Solr 245 Jan 29 16:21 README.txt -rw-r--r--. 1 solr Solr 1359 Jan 29 18:42 solr-8983-console.log -rw-r--r--. 1 solr Solr 4130 Jan 29 18:45 solr_gc.log -rw-r--r--. 1 solr Solr 2882 Jan 29 18:42 solr.log -rw-r--r--. 1 solr Solr 30629 Jan 29 18:42 solr.log.1 -rw-r--r--. 1 solr Solr 4871 Jan 29 18:29 solr.log.2 Permissions at '/usr/local/alfresco-search-services/solrhome' directory level: drwxr-xr-x. 5 solr solr 79 Jan 29 17:13 alfresco drwxrwxr-x. 2 solr Solr 4096 Jan 29 17:13 alfrescoModels drwxr-xr-x. 5 solr solr 79 Jan 29 17:13 archive drwxrwxr-x. 2 solr Solr 93 Jan 29 16:35 conf -rwxrwxr-x. 1 solr Solr 151 Jan 29 16:21 solr.xml drwxrwxr-x. 4 solr Solr 36 Jan 29 16:21 templates
https://github.com/abhinavmishra14/alfresco62ga-solr-dist-setup
Fantastic!
ReplyDeleteAbhinav, this is really thorough.
My sincere congratulations.
Thanks fegor , I hope it is helpful.
Delete@Abhinav Kumar Mishra Thank you. Excellent
ReplyDeleteThanks Med
DeleteI get the following errors when trying to install pgadmin. All of the below python mods ARE on the system:
ReplyDeleteError: Package: pgadmin4-web-4.30-1.rhel7.noarch (pgdg-common)
Requires: python36-bcrypt
Error: Package: pgadmin4-python3-sshtunnel-0.3.1-1.rhel7.noarch (pgdg-common)
Requires: python36-paramiko
Error: Package: pgadmin4-4.30-1.rhel7.x86_64 (pgdg-common)
Requires: python36-ldap3 >= 2.5.1
Error: Package: 1:pgadmin4-python3-flask-1.0.2-2.rhel7.noarch (pgdg-common)
Requires: python36-click
sudo yum install pgadmin4 -y
ReplyDeleteAbove command won't work. pgadmin4 won't install without python3 and yum doesn't work with python3 - how do you resolve this?
Check pgadmin4 dependency in the pgadmin documentation : https://www.pgadmin.org/download/pgadmin-4-python/
DeleteYou must have python 3.x to start pgadmin4. Here is the python version command i executed on my CentOS7 box.
[centos@alfresco —1$ python -V && python3 -V
Python 2.7.5
Python 3.6.8
----------------------------
No, I did not had issue with yum command at all and it works fine. I hope you are using it on CentOS7 and successfully installed postgresql 11 before attempting to install pgadmin4.
If you are attempting to install pgadmin4 without following the postgresql installation steps, you must update the yum repo before attempting to install.
$ sudo rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
$ sudo yum install pgadmin4 -y
Hi Abhinav, excellent work, appreciated. There is a lack of concise Alfresco install instruction out there.
DeleteI have run into a problem. I followed your instruction up to editing config_distro.py but i dont have that path! I ran into a small issue earlier installing pgadmin4, but worked around as per your instruction above. If i run alfresco —1$ python -V && python3 -V i get;
Python 2.7.5
Python 3.6.8
I tried changing to Python 3, but that breaks Yum, so i fixed that and uninstalled and re-installed pgadmin4 but still it doesn't populate /usr/lib/python3.6/site-packages/pgadmin4-web/config_distro.py
Do i simply mkdir pgadmin4-web and create config_distro.py?
If i run locate config_distro.py it is in /usr/pgadmin4/web/
I am sure i am being a muppet, but i dont want to carry on if this is wrong!
See the response below. The path seems incorrect. When you install pgadmin4 and open pgadmin4.conf, you would see the correct python path. e.g: /usr/lib/python3.6/site-packages/pgadmin4-web
DeleteHi, Did you get my query about Python 3.6.8 being installed but not populating the /usr/lib/python3.6/site-packages/pgadmin4-web/ directories? I think it is awaiting moderation.
ReplyDeleteCentOS 7 default has python 2.x, when you install pgadmin4, it installs python3.x automatically. At least that's what i saw. After i run following commands:
Delete$ sudo rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
$ sudo yum install pgadmin4 -y
I get the directories available.
Can you also open the pgadmin4.conf file at "/etc/httpd/conf.d/pgadmin4.conf" path and check what is the path for python there after installing pgadmin4 ?
In my case path says: /usr/lib/python3.6/site-packages/pgadmin4-web
here is a sample file: https://github.com/abhinavmishra14/alfresco62ga-solr-dist-setup/blob/master/linux-platform/PostgreSQL/pgAdmin4/pgadmin4.conf
Based on that path, see if directories are present or not.
Salut Monsieur avant tout d'abord je vous remercie pour cet document. Cependant au démarrage de Solr j'obtiens ceci: Solr home directory /user/local/alfresco-search-services must contain a solr.xml file!
ReplyDeleteThanks, Likely you forgot to copy required files from distribution. solr.xml file can be found here in the package: alfresco-search-services-1.4.0.zip\alfresco-search-services\solrhome\
DeleteJust download the package and extract to appropriate location as stated in the documentation above and only make changes to required files. So solr.xml remains untouched.
out of the box search services package comes with solr.xml and you don't have to create/update it.
Here is the contents of alfresco-search-services-1.4.0.zip\alfresco-search-services\solrhome\:
alfrescoModels
conf
templates
solr.xml
Only few files needs updates under solrhome. Check here for affected files : https://github.com/abhinavmishra14/alfresco62ga-solr-dist-setup/tree/master/linux-platform/alfresco-search-services/solrhome
Deletesalut Monsieur et Merci pour la documentation
ReplyDeleteThanks, I appreciate it. Hope it was helpful.
DeleteSalut monsieur j ai réussie la configuration mais je n arrive pas a me connecter.
ReplyDeleteje reçois ce message en voulant me connecter sur alfresco. alfresco est le nom d'utilisateur et le mot de passe. je reçois ce message d erreur: Vos informations d'authentification n'ont pas été reconnues ou Alfresco Content Services n'est peut-être pas disponible actuellement.
ReplyDeleteUsually this error comes if repository is not up properly or crashed or failed to start for some reason. Can you check the alfresco.log and catalina.log and see if you can spot any errors, if possible share th e error logs.
DeleteFrom where I can download alfresco governance 3.2 AMP file ????
ReplyDeleteAll community versions can be found here: https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/
DeleteIf you have license, Here is link to the 3.2 amp: https://artifacts.alfresco.com/nexus/service/local/repositories/enterprise-releases/content/org/alfresco/alfresco-governance-services-community-repo/3.2.0.7/alfresco-governance-services-community-repo-3.2.0.7.amp
All community versions: https://artifacts.alfresco.com/nexus/service/local/repositories/enterprise-releases/content/org/alfresco/alfresco-governance-services-community-repo/
For enterprise version module, reach out to alfresco/hyland support.
Thanks Abhinav.
DeleteIn the community versions link we have only up to 2.7 Version.
we are using 6.2.0 ACS so we need "alfresco governance 3.2 AMP"
We tried from the enterprise of 3.2 AMP file , but it's not supporting on community edition.
As per the docs https://docs.alfresco.com/content-services/6.2/support/#supported-platforms/6-2-0 here:
DeleteFollowing are supported versions for ACS6.2:
Alfresco Governance Services 3.3.0
Alfresco Governance Services 3.2
But actually the version naming has been changed and not mapped correctly to the docs. Take a look at this doc and should help identify what version you should be using:
https://docs.alfresco.com/governance-services/community/install/zip/
These are amp versions for AGS 3.2:
alfresco-governance-services-community-repo-11.140.amp
https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco-governance-services-community-repo/11.140/alfresco-governance-services-community-repo-11.140.amp
alfresco-governance-services-community-share-11.77.amp
https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco-governance-services-community-share/11.77/alfresco-governance-services-community-share-11.77.amp
Hope this helps.
Hello Abinav, This is great!
ReplyDeleteWill this instructions works for installation of Alfresco on Mac also?
Thanks
Sid
It should work I believe. Certain commands such as repository manager could would required to be according to MacOS. e.g. instead of 'yum' you would be using 'brew'
Delete