Installing Alfresco Community Edition on CentOS

Prerequisites:

  1. You must have Alibaba Cloud Elastic Compute Service (ECS) activated and verified your valid payment method. If you are a new user, you can get a free account in your Alibaba Cloud account. If you don’t know about how to setup your ECS instance, you can refer to this tutorial or quick-start guide. Your ECS instance must have at least 4GB RAM and 2 Core processor.
  2. A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
  3. Domain name must be pointed to your Alibaba Cloud ECS’s IP address
  4. Access to VNC console in your Alibaba Cloud or SSH client installed in your PC
  5. Set up your server’s hostname and create user with root privileges.

Install Required Dependencies

The installer package for Alfresco is easily available on their official website. This installer package by Alfresco contains all the programs required to execute Alfresco Community Edition on your Operating System. The LibreOffice plugin require some dependencies that needs to be installed.

# sudo yum -y install fontconfig
# sudo yum -y install libSM
# sudo yum -y install libICE
# sudo yum -y install cups-libs
# sudo yum -y install libGLU cairo mesa-libGL-devel
# sudo yum -y remove postfix
# sudo yum install nano

Install Alfresco Community Edition

The next step is to download the latest Alfresco installer via its official page. It is recommended to use the installer that is provided by the official Alfresco website, as it will not get you in trouble due to bugs or other errors during or after installation of Alfresco.

# wget https://download.alfresco.com/release/community/201707-build-00028/alfresco-community-installer-201707-linux-x64.bin
# sudo chmod +x alfresco-community-installer-201707-linux-x64.bin
# sudo ./alfresco-community-installer-201707-linux-x64.bin
# sudo systemctl start alfresco
# sudo systemctl enable alfresco

Configure Reverse Proxy

By default, Tomcat server runs on port 8080. Here we are going to use Nginx as a reverse proxy for the application to be easily accessible through the standard HTTP and HTTPS ports. We will also be configuring Nginx for using an SSL generated with Let’s Encrypt free SSL.

# sudo yum -y install nginx
# sudo systemctl start nginx
# sudo systemctl enable nginx
# sudo nano /etc/nginx/conf.d/softpedia.xyz.conf
server {
listen 80;
server_name softpedia.xyz;
location / { root /opt/alfresco-community/tomcat/webapps/ROOT;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_pass http://localhost:8080;
proxy_redirect default;
}
location /share/ {
root /opt/alfresco-community/tomcat/webapps/share/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_pass http://localhost:8080/share/;
} location /alfresco/ {
root /opt/alfresco-community/tomcat/webapps/alfresco/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_pass http://localhost:8080/alfresco/;

}
}
# sudo systemctl restart nginx alfresco

Setup Firewalls for HTTP and HTTPS

If you have activated firewalls, you will have to define a rule in Alibaba Cloud security group for your cloud server to add exception for port 80/TCP and 443/TCP. You can enable these ports while creating ECS instance, but in case if you have forgotten to unblock these ports, you can follow the procedure below.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com