Otu esi etinye Alfresco Community Edition na RHEL/CentOS 7/6 na Debian 8


Alfresco bụ usoro ECM mepere emepe (Enterprise Content Management) nke edere na Java nke na-enye njikwa eletrọnịkị, mmekorita na njikwa azụmaahịa.

Ntuziaka a ga-ekpuchi otu esi etinye ma hazie Alfresco Community Edition na RHEL/CentOS 7/6, Debian 8 na Ubuntu na ihe nkesa Nginx dị ka sava weebụ n'ihu maka ngwa ahụ.

Maka usoro kacha nta chọrọ, Alfresco chọrọ igwe nwere opekata mpe 4 GB nke RAM yana sistemụ arụmọrụ 64-bit.

Kwụpụ 1: Wụnye Alfresco Community Edition

1. Tupu ịga n'ihu na nrụnye Alfresco buru ụzọ kwenye na arụnyere akụrụngwa wget na akụrụngwa gị site na ịnye iwu dị n'okpuru na ikike mgbọrọgwụ ma ọ bụ site na akaụntụ mgbọrọgwụ.

# yum install wget
# apt-get install wget

2. Ọzọ, hazie aha nnabata sistemụ gị wee kwenye na mkpebi mpaghara na-ezo aka na adreesị IP nke ihe nkesa gị site n'inye iwu ndị a:

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

3. Wepu MTA ọ bụla na igwe (na nke a Postfix Mail server) site n'inye iwu dị n'okpuru:

# yum remove postfix
# apt-get remove postfix

4. Wụnye ndabere ndị a nke Alfresco software chọrọ ka ọ rụọ ọrụ nke ọma:

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

5. Ọzọ, gaa na wget utility.

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

6. Mgbe nbudata faịlụ ọnụọgụ abụọ gwụchara, nye iwu na-esonụ iji nye ikike igbu maka faịlụ ahụ wee mee ihe nrụnye alfresco.

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

7. Mgbe usoro nrụnye malitere, họrọ asụsụ wee gaa n'ihu usoro nrụnye site na iji ọkachamara nrụnye dị n'okpuru dị ka ntụziaka iji hazie Alfresco:

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

Ọkachamara nwụnye Alfresco na-aga n'ihu….

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

Nwụnye Alfresco na-aga n'ihu…

----------------------------------------------------------------------------
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]

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

Ntọala nwụnye Alfresco na-aga n'ihu..

----------------------------------------------------------------------------
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....  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. Mgbe echichi usoro okokụre na Alfresco ọrụ na-malitere inye n'okpuru iwu ka imeghe ndị na-esonụ firewall ọdụ ụgbọ mmiri na-ekwe ka mpụga ụsụụ ndị na netwọk gị jikọọ na web ngwa.

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

Ọ bụrụ na ịchọrọ ịgbakwunye iwu firewall ndị ọzọ iji mepee ọdụ ụgbọ mmiri iji nweta ọrụ Alfresco omenala na-enye iwu ss iji nweta ndepụta nke ọrụ niile na-arụ na igwe gị.

# ss -tulpn

9. Iji nweta ọrụ webụ Alfresco, mepee ihe nchọgharị wee jiri URL ndị a (dochie adreesị IP ma ọ bụ ngalaba ya). Jiri onye ọrụ nchịkwa banye na paswọọdụ ahaziri maka Admin site na usoro nrụnye.

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

Maka WebDAV.

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

Maka HTTPS nabata ewepu nchekwa.

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

Alfresco SharePoint Module na Microsoft.

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

Kwụpụ 2: Hazie Nginx ka ọ bụrụ sava webụ Frontend maka Alfresco

10. Iji tinye ihe nkesa Nginx na sistemụ, buru ụzọ tinye Epel Repositories na CentOS/RHEL site n'inye iwu dị n'okpuru:

# yum install epel-release

11. Mgbe Epel repos agbakwunyere n'ime usoro ahụ gaa n'ihu na ntinye sava weebụ Nginx site n'inye iwu ndị a:

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

12. Na nzọụkwụ ọzọ, mepee faịlụ nhazi Nginx site na /etc/nginx/nginx.conf na nchịkọta ederede wee mee mgbanwe ndị a:

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

Gaa n'okpuru ma jide n'aka na ị zaa nkwupụta ọnọdụ nke abụọ site n'itinye # n'ihu ahịrị ndị a:

#location / {
#        }

13. Mgbe ịmechara, chekwaa ma mechie faịlụ nhazi Nginx ma malitegharịa daemon iji gosipụta mgbanwe site n'inye iwu na-esonụ:

# systemctl restart nginx.service

14. Iji nweta Alfresco web interface tinye ọhụrụ firewall iwu imeghe ọdụ ụgbọ mmiri 80 na igwe gị na ịnyagharịa na URL n'okpuru. Ọzọkwa, gbaa mbọ hụ na enweghị nkwarụ amụma Selinux na sistemụ RHEL/CentOS.

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

Iji gbanyụọ iwu Selinux kpamkpam na sistemụ, mepee /etc/selinux/config faịlụ wee tọọ ahịrị SELINUX site na mmanye ka ọ bụrụ nwere nkwarụ.

15. Ugbu a ị nwere ike ịnweta Alfresco site na Nginx.

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

15. Ọ bụrụ na ị chọrọ ileta Alfresco webụsaịtị n'enweghị nsogbu site na Nginx proxy na SSL, mepụta Asambodo Aka Aka maka Nginx na /etc/nginx/ssl/ ndekọ wee jupụta akwụkwọ ahụ na ntọala omenala gị. dị ka e gosiri na nseta ihuenyo n'okpuru:

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

Lezienụ anya na Aha Asambodo ka ọ dabara na aha nnabata ngalaba gị.

17. Na-esote, mepee faịlụ nhazi Nginx maka edezi ma gbakwunye ngọngọ na-esote tupu ngwụcha ngwụcha ngwụcha (akara }).

# vi /etc/nginx/nginx.conf

Nginx SSL ihe ndekọ:

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. N'ikpeazụ, malitegharịa Nginx daemon iji tinye mgbanwe, tinye iwu firewall ọhụrụ maka ọdụ ụgbọ mmiri 443.

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

wee kụziere ihe nchọgharị ahụ na ngalaba URL gị site na iji protocol HTTPS.

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

19. Iji mee ka Alfresco na Nginx daemons usoro-gbaa iwu dị n'okpuru:

# systemctl enable nginx alfresco

Ọ gwụla! Alfresco na-enye ntinye aka na MS Office na LibreOffice site na usoro CIFs na-enye usoro ọrụ ama ama maka ndị ọrụ.