Ricerca nel sito web

Come installare Alfresco Community Edition su RHEL/CentOS 7/6 e Debian 8


Alfresco è un sistema ECM (Enterprise Content Management) open source scritto in Java che fornisce gestione elettronica, collaborazione e controllo aziendale.

Questa guida spiegherà come installare e configurare Alfresco Community Edition su RHEL/CentOS 7/6, Debian 8 e Ubuntu sistemi con server Nginx come server web frontend per l'applicazione.

Requisiti

Per quanto riguarda i requisiti minimi di sistema, Alfresco necessita di una macchina con almeno 4 GB di RAM e un sistema operativo a 64 bit.

Passaggio 1: installare Alfresco Community Edition

1. Prima di procedere con l'installazione di Alfresco, assicurati innanzitutto che l'utilità wget sia installata sul tuo computer immettendo il comando seguente con privilegi di root o dall'account root.

yum install wget
apt-get install wget

2. Successivamente, imposta il nome host del tuo sistema e assicurati che la risoluzione locale punti all'indirizzo IP del tuo server immettendo i seguenti comandi:

hostnamectl set-hostname server.alfresco.lan
echo “192.168.0.40 server.alfresco.lan” >> /etc/hosts

3. Rimuovi qualsiasi MTA dalla macchina (in questo caso il server Postfix Mail) emettendo il comando seguente:

yum remove postfix
apt-get remove postfix

4. Installa le seguenti dipendenze richieste dal software Alfresco per funzionare correttamente:

yum install fontconfig libSM libICE libXrender libXext cups-libs
apt-get install libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2

5. Successivamente, vai alla pagina del repository Alfresco Community Edition ospitata sul portale sourceforge.net e prendi l'ultima versione binaria (ad esempio alfresco-community-5.0.d-installer-linux-x64.bin ) per Linux utilizzando l'utilità wget.

wget http://nchc.dl.sourceforge.net/project/alfresco/Alfresco%205.0.d%20Community/alfresco-community-5.0.d-installer-linux-x64.bin

6. Al termine del download del file binario, emettere il comando seguente per concedere le autorizzazioni di esecuzione per il file ed eseguire il programma di installazione di alfresco.

chmod +x alfresco-community-5.0.d-installer-linux-x64.bin
./alfresco-community-5.0.d-installer-linux-x64.bin

7. Dopo l'avvio del processo di installazione, seleziona la lingua e continua il processo di installazione utilizzando la procedura guidata di installazione seguente come guida per configurare Alfresco:

[root@server ~]# ./alfresco-community-5.0.d-installer-linux-x64.bin 
Language Selection

Please select the installation language
[1] English - English
[2] French - Français
[3] Spanish - Español
[4] Italian - Italiano
[5] German - Deutsch
[6] Japanese - 日本語
[7] Dutch - Nederlands
[8] Russian - Русский
[9] Simplified Chinese - 简体中文
[10] Norwegian - Norsk bokmål
[11] Brazilian Portuguese - Português Brasileiro
Please choose an option [1] : 1
----------------------------------------------------------------------------
Welcome to the Alfresco Community Setup Wizard.

----------------------------------------------------------------------------
Installation Type

[1] Easy - Installs servers with the default configuration
[2] Advanced - Configures server ports and service properties.: Also choose optional components to install.
Please choose an option [1] : 2

----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want 
to install. Click Next when you are ready to continue.

Java [Y/n] :y

PostgreSQL [Y/n] :y

Alfresco : Y (Cannot be edited)

Solr1 [y/N] : n

Solr4 [Y/n] :y

SharePoint [Y/n] :y

Web Quick Start [y/N] : y

Google Docs Integration [Y/n] :y

LibreOffice [Y/n] :y

Is the selection above correct? [Y/n]: y

L'installazione guidata di Alfresco continua….

----------------------------------------------------------------------------
Installation Folder

Please choose a folder to install Alfresco Community

Select a folder [/opt/alfresco-5.0.d]: [Press Enter key]

----------------------------------------------------------------------------
Database Server Parameters

Please enter the port of your database.

Database Server port [5432]: [Press Enter key]

----------------------------------------------------------------------------
Tomcat Port Configuration

Please enter the Tomcat configuration parameters you wish to use.

Web Server domain: [127.0.0.1]: 192.168.0.15 

Tomcat Server Port: [8080]: [Press Enter key

Tomcat Shutdown Port: [8005]: [Press Enter key

Tomcat SSL Port [8443]: [Press Enter key

Tomcat AJP Port: [8009]: [Press Enter key

----------------------------------------------------------------------------
Alfresco FTP Port

Please choose a port number to use for the integrated Alfresco FTP server.

Port: [21]: [Press Enter key

L'installazione all'aperto continua...

----------------------------------------------------------------------------
Admin Password

Please give a password to use for the Alfresco administrator account.

Admin Password: :[Enter a strong password for Admin user]
Repeat Password: :[Repeat the password for Admin User]
----------------------------------------------------------------------------
Alfresco SharePoint Port

Please choose a port number for the SharePoint protocol.

Port: [7070]: [Press Enter key]

----------------------------------------------------------------------------
Install as a service

You can optionally register Alfresco Community as a service. This way it will 
automatically be started every time the machine is started.

Install Alfresco Community as a service? [Y/n]: y


----------------------------------------------------------------------------
LibreOffice Server Port

Please enter the port that the Libreoffice Server will listen to by default.

LibreOffice Server Port [8100]: [Press Enter key]

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

La configurazione dell'installazione di Alfresco continua..

----------------------------------------------------------------------------
Setup is now ready to begin installing Alfresco Community on your computer.

Do you want to continue? [Y/n]: y

----------------------------------------------------------------------------
Please wait while Setup installs Alfresco Community on your computer.

 Installing
 0% ______________ 50% ______________ 100%
 #########################################

----------------------------------------------------------------------------
Setup has finished installing Alfresco Community on your computer.

View Readme File [Y/n]: n

Launch Alfresco Community Share [Y/n]: y

waiting for server to start....[root@server ~]#  done
server started
/opt/alfresco-5.0.d/postgresql/scripts/ctl.sh : postgresql  started at port 5432
Using CATALINA_BASE:   /opt/alfresco-5.0.d/tomcat
Using CATALINA_HOME:   /opt/alfresco-5.0.d/tomcat
Using CATALINA_TMPDIR: /opt/alfresco-5.0.d/tomcat/temp
Using JRE_HOME:        /opt/alfresco-5.0.d/java
Using CLASSPATH:       /opt/alfresco-5.0.d/tomcat/bin/bootstrap.jar:/opt/alfresco-5.0.d/tomcat/bin/tomcat-juli.jar
Using CATALINA_PID:    /opt/alfresco-5.0.d/tomcat/temp/catalina.pid
Tomcat started.
/opt/alfresco-5.0.d/tomcat/scripts/ctl.sh : tomcat started

8. Al termine del processo di installazione e all'avvio dei servizi Alfresco, eseguire i comandi seguenti per aprire le seguenti porte del firewall per consentire agli host esterni nella rete di connettersi all'applicazione Web.


firewall-cmd --add-port=8080/tcp -permanent
firewall-cmd --add-port=8443/tcp -permanent
firewall-cmd --add-port=7070/tcp -permanent
firewall-cmd --reload

Nel caso in cui sia necessario aggiungere altre regole firewall per aprire le porte per accedere ai servizi Alfresco personalizzati, eseguire il comando ss per ottenere un elenco di tutti i servizi in esecuzione sulla macchina.

ss -tulpn

9. Per accedere ai servizi Web di Alfresco, aprire un browser e utilizzare i seguenti URL (sostituire l'indirizzo IP o il dominio di conseguenza). Accedi con l'utente amministratore e la password configurata per l'amministratore durante il processo di installazione.

http://IP-or-domain.tld:8080/share/ 

http://IP-or-domain.tld:8080/alfresco/ 

Per WebDAV.

http://IP-or-domain.tld:8080/alfresco/webdav 

Per HTTPS accetta l'eccezione di sicurezza.

https://IP-or-domain.tld:8443/share/ 

Modulo Alfresco SharePoint con Microsoft.

http://IP-or-domain.tld:7070/

Passaggio 2: configurare Nginx come server Web frontend per Alfresco

10. Per installare il server Nginx sul sistema, aggiungi prima i repository Epel su CentOS/RHEL emettendo il comando seguente:

yum install epel-release

11. Dopo aver aggiunto i repository Epel al sistema, procedere con l'installazione del server Web Nginx immettendo il seguente comando:

yum install nginx       [On RHEL/CentOS Systems]
apt-get install nginx   [On Debian/Ubuntu Systems]  

12. Nel passaggio successivo apri il file di configurazione Nginx da /etc/nginx/nginx.conf con un editor di testo e apporta le seguenti modifiche:

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;
    }

Vai sotto e assicurati di commentare la seconda dichiarazione di posizione inserendo un # davanti alle seguenti righe:

#location / {
       }

13. Al termine, salva e chiudi il file di configurazione Nginx e riavvia il demone per riflettere la modifica emettendo il seguente comando:

systemctl restart nginx.service

14. Per accedere all'interfaccia web di Alfresco aggiungi una nuova regola firewall per aprire la porta 80 sul tuo computer e vai all'URL seguente. Inoltre, assicurati che la policy Selinux sia disabilitata sui sistemi RHEL/CentOS.

firewall-cmd --add-service=http -permanent
firewall-cmd --reload
setenforce 0

Per disabilitare completamente la policy di Selinux sul sistema, aprire il file /etc/selinux/config e impostare la riga SELINUX da enforcing a disabled.

15. Ora puoi accedere ad Alfresco tramite Nginx.

 http://IP-or-domain.tld/share/ 
 http://IP-or-domain.tld/alfresco/
 http://IP-or-domain.tld/alfresco/webdav 

15. Nel caso in cui desideri visitare in modo sicuro l'interfaccia web di Alfresco tramite proxy Nginx con SSL, crea un certificato autofirmato per Nginx nella directory /etc/nginx/ssl/ e compila il certificato con le tue impostazioni personalizzate come illustrato nello screenshot seguente:

mkdir /etc/nginx/ssl
cd /etc/nginx/ssl/
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout alfresco.key -out alfresco.crt

Presta attenzione al Nome comune del certificato affinché corrisponda al nome host del tuo dominio.

17. Successivamente, apri il file di configurazione Nginx per la modifica e aggiungi il blocco seguente prima dell'ultima parentesi graffa di chiusura (il simbolo }).

vi /etc/nginx/nginx.conf

Estratto del blocco SSL Nginx:

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. 
  }

18. Infine, riavvia il demone Nginx per applicare le modifiche, aggiungi una nuova regola firewall per la porta 443.

systemctl restart nginx
firewall-cmd -add-service=https --permanent
firewall-cmd --reload

e indica al browser l'URL del tuo dominio utilizzando il protocollo HTTPS.

https://IP_or_domain.tld/share/
https://IP_or_domain.tld/alfresco/

19. Per abilitare i demoni Alfresco e Nginx a livello di sistema, esegui il comando seguente:

systemctl enable nginx alfresco

È tutto! Alfresco offre l'integrazione con MS Office e LibreOffice tramite il protocollo CIF fornendo un flusso di lavoro familiare per gli utenti.