Jak zainstalować Alfresco Community Edition na RHEL/CentOS 7/6 i Debianie 8
Alfresco to system ECM typu open source (Enterprise Content Management) napisany w Java, który zapewnia elektroniczne zarządzanie, współpracę i kontrolę biznesową.
W tym przewodniku opisano, jak zainstalować i skonfigurować Alfresco Community Edition na RHEL/CentOS 7/6, Debian 8 i Ubuntu systemy z serwerem Nginx jako frontendowym serwerem WWW dla aplikacji.
Wymagania
Jeśli chodzi o minimalne wymagania systemowe, Alfresco potrzebuje komputera z co najmniej 4 GB RAM i 64-bitowym systemem operacyjnym.
Krok 1: Zainstaluj wersję społecznościową Alfresco
1. Przed kontynuowaniem instalacji Alfresco najpierw upewnij się, że narzędzie wget jest zainstalowane na Twoim komputerze, wydając poniższe polecenie z uprawnieniami roota lub z konta root.
yum install wget
apt-get install wget
2. Następnie skonfiguruj nazwę hosta systemu i upewnij się, że lokalna rozdzielczość wskazuje adres IP Twojego serwera, wydając następujące polecenia:
hostnamectl set-hostname server.alfresco.lan
echo “192.168.0.40 server.alfresco.lan” >> /etc/hosts
3. Usuń wszystkie MTA z komputera (w tym przypadku serwera pocztowego Postfix), wydając poniższe polecenie:
yum remove postfix
apt-get remove postfix
4. Zainstaluj następujące zależności wymagane przez oprogramowanie Alfresco do prawidłowego działania:
yum install fontconfig libSM libICE libXrender libXext cups-libs
apt-get install libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2
5. Następnie przejdź do strony repozytorium Alfresco Community Edition hostowanej w portalu sourceforge.net i pobierz najnowszą wersję binarną (tj. alfresco-community-5.0.d-installer-linux-x64.bin ) dla Linuksa przy użyciu narzędzia wget.
wget http://nchc.dl.sourceforge.net/project/alfresco/Alfresco%205.0.d%20Community/alfresco-community-5.0.d-installer-linux-x64.bin
6. Po zakończeniu pobierania pliku binarnego wydaj poniższe polecenie, aby nadać uprawnienia do wykonywania pliku i uruchomić instalator alfresco.
chmod +x alfresco-community-5.0.d-installer-linux-x64.bin
./alfresco-community-5.0.d-installer-linux-x64.bin
7. Po rozpoczęciu procesu instalacji wybierz język i kontynuuj proces instalacji, korzystając z poniższego kreatora instalacji jako przewodnika konfiguracji 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
Kreator instalacji Alfresco kontynuuje….
----------------------------------------------------------------------------
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
Instalacja na świeżym powietrzu trwa…
----------------------------------------------------------------------------
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]
----------------------------------------------------------------------------
Kontynuacja instalacji na świeżym powietrzu..
----------------------------------------------------------------------------
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. Po zakończeniu procesu instalacji i uruchomieniu usług Alfresco wydaj poniższe polecenia, aby otworzyć następujące porty zapory ogniowej i umożliwić zewnętrznym hostom w Twojej sieci łączenie się z aplikacją internetową.
firewall-cmd --add-port=8080/tcp -permanent
firewall-cmd --add-port=8443/tcp -permanent
firewall-cmd --add-port=7070/tcp -permanent
firewall-cmd --reload
Jeśli musisz dodać inne reguły zapory sieciowej, aby otworzyć porty w celu uzyskania dostępu do niestandardowych usług Alfresco, użyj polecenia ss
, aby uzyskać listę wszystkich usług uruchomionych na twoim komputerze.
ss -tulpn
9. Aby uzyskać dostęp do usług internetowych Alfresco, otwórz przeglądarkę i użyj następujących adresów URL (odpowiednio zamień adres IP lub domenę). Zaloguj się jako użytkownik admin i hasło skonfigurowane dla administratora w procesie instalacji.
http://IP-or-domain.tld:8080/share/
http://IP-or-domain.tld:8080/alfresco/
Dla WebDAV-a.
http://IP-or-domain.tld:8080/alfresco/webdav
W przypadku protokołu HTTPS zaakceptuj wyjątek bezpieczeństwa.
https://IP-or-domain.tld:8443/share/
Moduł Alfresco SharePoint z Microsoft.
http://IP-or-domain.tld:7070/
Krok 2: Skonfiguruj Nginx jako frontendowy serwer WWW dla Alfresco
10. Aby zainstalować serwer Nginx w systemie, najpierw dodaj repozytoria Epel na CentOS/RHEL, wydając poniższe polecenie:
yum install epel-release
11. Po dodaniu repozytoriów Epel do systemu kontynuuj instalację serwera WWW Nginx, wydając następującą komendę:
yum install nginx [On RHEL/CentOS Systems]
apt-get install nginx [On Debian/Ubuntu Systems]
12. W następnym kroku otwórz plik konfiguracyjny Nginx z /etc/nginx/nginx.conf
za pomocą edytora tekstu i wprowadź następujące zmiany:
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;
}
Przejdź poniżej i pamiętaj o skomentowaniu drugiej informacji o lokalizacji, umieszczając # przed następującymi wierszami:
#location / {
}
13. Po zakończeniu zapisz i zamknij plik konfiguracyjny Nginx i zrestartuj demona, aby odzwierciedlić zmiany, wydając następujące polecenie:
systemctl restart nginx.service
14. Aby uzyskać dostęp do interfejsu internetowego Alfresco, dodaj nową regułę zapory sieciowej, aby otworzyć port 80 na swoim komputerze i przejdź do poniższego adresu URL. Upewnij się także, że polityka Selinux jest wyłączona w systemach RHEL/CentOS.
firewall-cmd --add-service=http -permanent
firewall-cmd --reload
setenforce 0
Aby całkowicie wyłączyć politykę Selinux w systemie, otwórz plik /etc/selinux/config
i ustaw linię SELINUX z enforcing
na disabled
.
15. Teraz możesz uzyskać dostęp do Alfresco poprzez Nginx.
http://IP-or-domain.tld/share/
http://IP-or-domain.tld/alfresco/
http://IP-or-domain.tld/alfresco/webdav
15. Jeśli chcesz bezpiecznie odwiedzać interfejs internetowy Alfresco za pośrednictwem proxy Nginx z SSL, utwórz certyfikat z podpisem własnym dla Nginx w katalogu /etc/nginx/ssl/
i wypełnij certyfikat swoimi ustawieniami niestandardowymi, jak pokazano na poniższym zrzucie ekranu:
mkdir /etc/nginx/ssl
cd /etc/nginx/ssl/
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout alfresco.key -out alfresco.crt
Zwróć uwagę na Certificate Common Name
, aby dopasować nazwę hosta Twojej domeny.
17. Następnie otwórz plik konfiguracyjny Nginx do edycji i dodaj następujący blok przed ostatnim zamykającym nawiasem klamrowym (symbol ).
vi /etc/nginx/nginx.conf
Fragment bloku Nginx SSL:
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. Na koniec zrestartuj demona Nginx, aby zastosować zmiany, dodaj nową regułę zapory sieciowej dla portu 443.
systemctl restart nginx
firewall-cmd -add-service=https --permanent
firewall-cmd --reload
i poinstruuj przeglądarkę o adresie URL Twojej domeny przy użyciu protokołu HTTPS.
https://IP_or_domain.tld/share/
https://IP_or_domain.tld/alfresco/
19. Aby włączyć demony Alfresco i Nginx w całym systemie, uruchom poniższe polecenie:
systemctl enable nginx alfresco
To wszystko! Alfresco oferuje integrację z MS Office i LibreOffice poprzez protokół CIFs, zapewniając użytkownikom znajomy przepływ pracy.