ألفريسكو هو نظام إدارة محتوى المؤسسة (Enterprise Content Management) مفتوح المصدر مكتوب بلغة جافا الذي يوفر إدارة إلكترونية وتعاون ورقابة على الأعمال.

سيتناول هذا الدليل كيفية تثبيت وتكوين نسخة ألفريسكو المجتمعية على أنظمة RHEL/CentOS 7/6، ديبيان 8 و أوبونتو مع استخدام خادم Nginx كخادم ويب أمامي للتطبيق.
المتطلبات
بالنسبة لمتطلبات النظام الدنيا، يحتاج ألفريسكو إلى جهاز يحتوي على الأقل 4 جيجابايت من الذاكرة العشوائية RAM ونظام تشغيل بنية 64 بت.
الخطوة 1: تثبيت نسخة ألفريسكو المجتمعية
1. قبل الشروع في تثبيت ألفريسكو، تأكد أولاً من تثبيت أداة wget على جهازك عن طريق إصدار الأمر التالي بامتيازات المستخدم الجذر أو من حساب الجذر.
# yum install wget # apt-get install wget

2. بعد ذلك، قم بضبط اسم النظام الرئيسي وتأكد من أن القرار المحلي يشير إلى عنوان IP الخادم الخاص بك عن طريق إصدار الأوامر التالية:
# hostnamectl set-hostname server.alfresco.lan # echo “192.168.0.40 server.alfresco.lan” >> /etc/hosts

3. قم بإزالة أي برنامج نقل البريد من الجهاز (في هذه الحالة خادم البريد Postfix) عن طريق إصدار الأمر التالي:
# yum remove postfix # apt-get remove postfix

4. قم بتثبيت التبعيات التالية المطلوبة من قبل برنامج ألفريسكو ليعمل بشكل صحيح:
# yum install fontconfig libSM libICE libXrender libXext cups-libs # apt-get install libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2

٥. بعد ذلك، انتقل إلى صفحة مستودع Alfresco Community Edition المستضافة على بوابة sourceforge.net واحصل على أحدث إصدار ثنائي (مثل alfresco-community-5.0.d-installer-linux-x64.bin) لنظام Linux باستخدام أداة wget.
# wget http://nchc.dl.sourceforge.net/project/alfresco/Alfresco%205.0.d%20Community/alfresco-community-5.0.d-installer-linux-x64.bin
٦. بعد اكتمال تنزيل الملف الثنائي، قم بإصدار الأمر التالي لمنح أذونات التنفيذ للملف وتشغيل مثبت alfresco.
# chmod +x alfresco-community-5.0.d-installer-linux-x64.bin # ./alfresco-community-5.0.d-installer-linux-x64.bin
٧. بعد بدء عملية التثبيت، حدد اللغة وواصل عملية التثبيت باستخدام معالم المعالج التثبيت التالية كدليل لتكوين 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

استمرار معالم معالج التثبيت Alfresco…
---------------------------------------------------------------------------- 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

استمرار تثبيت Alfresco…
---------------------------------------------------------------------------- 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]
----------------------------------------------------------------------------

استمرار إعداد تثبيت Alfresco..
---------------------------------------------------------------------------- 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

٨. بعد اكتمال عملية التثبيت وبدء خدمات Alfresco، قم بإصدار الأوامر التالية لفتح منافذ جدار الحماية التالية للسماح للمضيفين الخارجيين في شبكتك بالاتصال بتطبيق الويب.
# firewall-cmd --add-port=8080/tcp -permanent # firewall-cmd --add-port=8443/tcp -permanent # firewall-cmd --add-port=7070/tcp -permanent # firewall-cmd --reload
في حالة الحاجة إلى إضافة قواعد جدار الحماية الأخرى لفتح المنافذ للوصول إلى خدمات Alfresco المخصصة، قم بإصدار الأمر ss
للحصول على قائمة بجميع الخدمات التي تعمل على جهازك.
# ss -tulpn
٩. للوصول إلى خدمات Alfresco عبر الويب، افتح متصفحًا واستخدم عناوين الويب التالية (استبدل عنوان IP أو النطاق وفقًا لذلك). قم بتسجيل الدخول باستخدام مستخدم المسؤول وكلمة المرور المكونة للمسؤول خلال عملية التثبيت.
http://IP-or-domain.tld:8080/share/


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

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

لـ HTTPS، قم بقبول استثناء الأمان.
https://IP-or-domain.tld:8443/share/
وحدة Alfresco SharePoint مع Microsoft.
http://IP-or-domain.tld:7070/
الخطوة ٢: قم بتكوين Nginx كخادم ويب أمامي لـ Alfresco
١٠. من أجل تثبيت خادم Nginx على النظام، أضف أولاً مستودعات Epel على CentOS/RHEL عن طريق إصدار الأمر التالي:
# yum install epel-release
١١. بعد أن يتم إضافة مستودعات Epel إلى النظام، قم بتثبيت خادم Nginx عن طريق إصدار الأمر التالي:
# yum install nginx [On RHEL/CentOS Systems] # apt-get install nginx [On Debian/Ubuntu Systems]
١٢. في الخطوة التالية، افتح ملف تكوين Nginx من /etc/nginx/nginx.conf
باستخدام محرر نصوص وقم بعمل التغييرات التالية:
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; }

انتقل إلى الأسفل وتأكد من تعليق البيان الثاني للموقع عن طريق وضع # أمام الأسطر التالية:
#location / { # }
١٣. بعد الانتهاء، احفظ وأغلق ملف تكوين Nginx وأعد تشغيل الخدمة لعرض التغيير عن طريق إصدار الأمر التالي:
# systemctl restart nginx.service
١٤. من أجل الوصول إلى واجهة Alfresco عبر الويب، أضف قاعدة جدار نارية جديدة لفتح منفذ ٨٠ على جهازك وانتقل إلى العنوان التالي. كما تأكد من تعطيل سياسة Selinux على أنظمة RHEL/CentOS.
# firewall-cmd --add-service=http -permanent # firewall-cmd --reload # setenforce 0
لتعطيل سياسة Selinux بالكامل على النظام، افتح ملف /etc/selinux/config
وقم بتعيين السطر SELINUX من enforcing
إلى disabled
.
15. الآن يمكنك الوصول إلى Alfresco من خلال Nginx.
http://IP-or-domain.tld/share/ http://IP-or-domain.tld/alfresco/ http://IP-or-domain.tld/alfresco/webdav
15. في حال رغبت في زيارة واجهة Alfresco عبر Nginx بشكل آمن باستخدام بروكسي SSL، أنشئ شهادة ذاتية التوقيع لـ Nginx على المسار /etc/nginx/ssl/
واملأ الشهادة بالإعدادات المخصصة الخاصة بك كما هو موضح في الصورة أدناه:
# mkdir /etc/nginx/ssl # cd /etc/nginx/ssl/ # openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout alfresco.key -out alfresco.crt

انتبه إلى Certificate Common Name
ليتطابق مع اسم النطاق الخاص بك.
17. بعد ذلك، افتح ملف تكوين Nginx للتحرير وأضف الكتلة التالية قبل السوار العلوي الأخير (الرمز }
).
# vi /etc/nginx/nginx.conf
مقتطف كتلة 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. في النهاية، أعد تشغيل خدمة Nginx لتطبيق التغييرات، وأضف قاعدة جدار حماية جديدة لمنفذ 443.
# systemctl restart nginx # firewall-cmd -add-service=https --permanent # firewall-cmd --reload
وأوجه المتصفح إلى عنوان URL الخاص بنطاقك باستخدام بروتوكول HTTPS.
https://IP_or_domain.tld/share/ https://IP_or_domain.tld/alfresco/

19. من أجل تمكين خدمات Alfresco و Nginx على مستوى النظام، قم بتشغيل الأمر التالي:
# systemctl enable nginx alfresco
هذا كل شيء! تقدم Alfresco تكاملًا مع MS Office و LibreOffice عبر بروتوكول CIFs مما يوفر سير عمل مألوف للمستخدمين.
Source:
https://www.tecmint.com/install-alfresco-community-edition-on-centos-debian-ubuntu/