How to install Alfresco Community Edition in Linux
To Install Alfresco Community Edition in Linux
Alfresco is a free source Enterprise Content Management system which gives collaboration, business control and electronic management. It is Written in Java. Installation process of Alfresco Community Edition is discussed in this article.
Requirement
It requires a system with at least 4 GB of RAM and a 64-bit OS.
Installation of Alfresco Community Edition
Assure that the local resolution points to your server IP by executing the below command.
[root@server ~]# hostname -f
server.linuxhelp1.com
Use the following command, to remove any MTA from the system.
For Debian
# apt-get remove postfix
For RHEL/CentOS
[root@server ~]# yum remove postfix -y
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased
.
.
.
Removed:
postfix.x86_64 2:2.10.1-6.el7
Complete!
Download the Alfresco latest version from official site using wget command.
[root@server ~]# wget http://dl.alfresco.com/release/community/201605-build-00010/alfresco-community-installer-201605-linux-x64.bin
--2016-05-24 18:43:22-- http://dl.alfresco.com/release/community/201605-build-00010/alfresco-community-installer-201605-linux-x64.bin
Resolving dl.alfresco.com (dl.alfresco.com)... 54.230.191.188, 54.230.191.162, 54.230.191.239, ...
Connecting to dl.alfresco.com (dl.alfresco.com)|54.230.191.188|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 808291492 (771M) [application/octet-stream]
Saving to: ‘ alfresco-community-installer-201605-linux-x64.bin’
100%[=======================================================================================> ] 808,291,492 706KB/s in 22m 8s
2016-05-24 19:05:30 (594 KB/s) - ‘ alfresco-community-installer-201605-linux-x64.bin’ saved [808291492/808291492]
After downloaded the binary file, execute the below command to grant permissions for executing the file and also execute alfresco installer.
[root@server ~]# chmod +x alfresco-community-installer-201605-linux-x64.bin
Now start the installation process by executing the following command.
[root@server ~]# ./alfresco-community-installer-201605-linux-x64.bin
After installation is completed, select the language and then continue the installing process.
Select the installation type as per your requirement. Here we have selected advanced option.
Select the components you need to install and clear the components which is not needed. Click next to continue.
Now choose a folder to install the Alfresco community
In the setup page, Enter the port of your database server.
Now enter your Tomcat Port Configuration
Then enter the port that the LibreOffice server will listen to.
In the Alfresco FTP port, choose a port number for the integrated Alfresco FTP server.
Now enter the Alfresco administrator credentials.
Now it asks for the confirmation to install Alfresco community as a service, click yes
Now the setup is installing. Please wait while the setup installs Alfresco community on your system.
Now click Finish to complete the Alfresco Community setup wizard.
waiting for server to start.... done server started /opt/alfresco-community/postgresql/scripts/ctl.sh : postgresql started at port 5432 Using CATALINA_BASE: /opt/alfresco-community/tomcat Using CATALINA_HOME: /opt/alfresco-community/tomcat Using CATALINA_TMPDIR: /opt/alfresco-community/tomcat/temp Using JRE_HOME: /opt/alfresco-community/java Using CLASSPATH: /opt/alfresco-community/tomcat/bin/bootstrap.jar:/opt/alfresco-community/tomcat/bin/tomcat-juli.jar Using CATALINA_PID: /opt/alfresco-community/tomcat/temp/catalina.pid Tomcat started. /opt/alfresco-community/tomcat/scripts/ctl.sh : tomcat started
After installation, run the following command to open the firewall ports to allow the external hosts to connect to the web application.
[root@server ~]# firewall-cmd --permanent --add-port=8080/tcp success [root@server ~]# firewall-cmd --permanent --add-port=8443/tcp success [root@server ~]# firewall-cmd --reload success
Execute the " ss" script to receive a list of all the services that are running in your system. Also add other firewall rules to open the ports for accessing the custom Alfresco services.
[root@server ~]# ss -tuipn
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp ESTAB 0 0 ::1:33119 ::1:33119 users:((" postgres.bin" ,pid=5064,fd=10),(" postgres.bin" ,pid=5063,fd=10),(" postgres.bin" ,pid=4679,fd=10),(" postgres.bin" ,pid=4655,fd=10),(" postgres.bin" ,pid=4654,fd=10),(" postgres.bin" ,pid=4653,fd=10),(" postgres.bin" ,pid=4652,fd=10),(" postgres.bin" ,pid=4651,fd=10),(" postgres.bin" ,pid=4650,fd=10),(" postgres.bin" ,pid=4648,fd=10),(" postgres.bin" ,pid=4647,fd=10),(" postgres.bin" ,pid=4603,fd=10),(" postgres.bin" ,pid=4602,fd=10),(" postgres.bin" ,pid=4601,fd=10),(" postgres.bin" ,pid=4600,fd=10),(" postgres.bin" ,pid=4599,fd=10),(" postgres.bin" ,pid=4597,fd=10))
.
.
.
cubic wscale:7,7 rto:206 rtt:5.711/10.827 ato:43 mss:26112 cwnd:7 ssthresh:7 send 256.0Mbps lastsnd:33988 lastrcv:33890 lastack:33948 pacing_rate 512.0Mbps retrans:0/1 rcv_rtt:60.875 rcv_space:99671
tcp CLOSE-WAIT 1 0 ::ffff:127.0.0.1:42191 ::ffff:127.0.0.1:8080 users:((" java" ,pid=4622,fd=655))
cubic wscale:7,7 rto:201 rtt:0.091/0.037 ato:40 mss:22400 cwnd:10 send 19692.3Mbps lastsnd:74695 lastrcv:63866 lastack:38245 rcv_space:43690
For accessing web services, just open the browser and use the below urls and login with your admin user name and the password which was configured for Admin at the time of installation.
http://IP-or-domain.tld:8080/share/
http://IP-or-domain.tld:8080/alfresco/
On WebDAV
Navigate to http://IP-or-domain.tld:8080/alfresco/webdav and type the login credentials.
In HTTPS accepts the security exception.
https://IP-or-domain.tld:8443/share/
To Configure Nginx as Frontend Web Server
To install Nginx server on the machine, just insert Epel Repositories in CentOS/RHEL by executing the below command.
[root@server ~]# yum install epel-release -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-6 will be installed
.
.
.
epel-release.noarch 0:7-6
Complete!
Use the below command, to install the Nginx web server.
On Debian
# apt-get install nginx
On RHEL/CentOS
[root@server ~]# yum install nginx -y
Loaded plugins: fastestmirror, langpacks
epel/x86_64/metalink | 4.7 kB 00:00:00
epel | 4.3 kB 00:00:00
(1/3): epel/x86_64/group_gz | 170 kB 00:00:00
(2/3): epel/x86_64/primary_db | 4.1 MB 00:00:07
(3/3): epel/x86_64/updateinfo | 557 kB 00:00:09
Loading mirror speeds from cached hostfile
* base: centos.webwerks.com
* epel: ftp.cuhk.edu.hk
* extras: ftp.iitm.ac.in
* updates: centos.webwerks.com
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.6.3-8.el7 will be installed
--> Processing Dependency: nginx-filesystem = 1:1.6.3-8.el7 for package: 1:nginx-1.6.3-8.el7.x86_64
--> Processing Dependency: nginx-filesystem for package: 1:nginx-1.6.3-8.el7.x86_64
--> Processing Dependency: GeoIP for package: 1:nginx-1.6.3-8.el7.x86_64
--> Processing Dependency: libGeoIP.so.1()(64bit) for package: 1:nginx-1.6.3-8.el7.x86_64
--> Running transaction check
---> Package GeoIP.x86_64 0:1.5.0-9.el7 will be installed
---> Package nginx-filesystem.noarch 1:1.6.3-8.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================
Installing:
nginx x86_64 1:1.6.3-8.el7 epel 508 k
Installing for dependencies:
GeoIP x86_64 1.5.0-9.el7 base 709 k
nginx-filesystem noarch 1:1.6.3-8.el7 epel 15 k
.
.
.
Dependency Installed:
GeoIP.x86_64 0:1.5.0-9.el7 nginx-filesystem.noarch 1:1.6.3-8.el7
Complete!
To open Nginx configuration file /etc/nginx/nginx.conf using a text editor and do the below given changes.
location / { proxy_pass http://127.0.0.1:8080 proxy_redirect off proxy_set_header Host $host 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 }
Placing a # in front of the below lines.
#location / { # }
To save and exit Nginx configuration file and reboot daemon to reflect modification by executing the below command.
[root@server ~]# systemctl restart nginx.service
To access web interface insert a new firewall rule open port 80 on your system and go to the following url. Disable the RHEL/CentOS systems.
[root@server ~]# firewall-cmd --permanent --add-service=http success [root@server ~]# firewall-cmd --reload success [root@server ~]# setenforce 0 setenforce: SELinux is disabled
To disable Selinux policy on the machine, just open the file /etc/selinux/config file, and then set the line SELINUX from enforcing to disable.
To access via Nginx
Navigate to http://IP-or-domain.tld/share/
http://IP-or-domain.tld/alfresco/
To fill the certificate with the custom settings what you need.
[root@server ~]# mkdir /etc/nginx/ssl
[root@server ~]# cd /etc/nginx/ssl
[root@server ssl]# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout alfresco.key -out alfresco.crt
Generating a 2048 bit RSA private key
...................................................................................+++
.................................+++
writing new private key to ' alfresco.key'
-----
.
.
.
Common Name (eg, your name or your server' s hostname) []:server.linuxhelp1.com
Email Address []:
Give importance to " Certificate Common Name" to match the domain hostname.
[root@server ssl]# ls
alfresco.crt alfresco.key
Open Nginx configuration file and insert the below block before the last closing curly bracket.
[root@server ssl]# vim /etc/nginx/nginx.conf
The Nginx SSL block excerpt.
server {
listen 443
server_name _
ssl_certificate /etc/nginx/ssl/alfresco.crt
ssl_certificate_key /etc/nginx/ssl/alfresco.key
ssl on
ssl_session_cache builtin:1000 shared:SSL:10m
ssl_protocols TLSv1 TLSv1.1 TLSv1.2
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4
ssl_prefer_server_ciphers on
access_log /var/log/nginx/ssl.access.log
location / {
proxy_pass http://127.0.0.1:8080
proxy_redirect off
proxy_set_header Host $host
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
}
## This is the last curly bracket before editing the file.
}
To apply the changes, reboot Nginx daemon and insert a new firewall rule for the port 443.
[root@server ~]# systemctl restart nginx.service [root@server ~]# firewall-cmd --permanent --add-service=https success [root@server ~]# firewall-cmd --reload success
Navigate to the browser using the protocol HTTPS.
https://IP_or_domain.tld/share/
To enable Nginx daemons execute the following command.
[root@server ~]# systemctl enable nginx alfresco
alfresco.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig alfresco on
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.
It requires a system with at least 4 GB of RAM and a 64-bit OS.
https://www.alfresco.com/platform/pricing
https://www.alfresco.com/try-alfresco
# apt-get remove postfix