ວິທີການຕິດຕັ້ງສະບັບຊຸມຊົນ Alfresco ໃນ RHEL/CentOS 7/6 ແລະ Debian 8
Alfresco ແມ່ນລະບົບ ECM ແຫຼ່ງເປີດ (ການຄຸ້ມຄອງເນື້ອຫາວິສາຫະກິດ) ຂຽນໃນ Java ເຊິ່ງສະ ໜອງ ການບໍລິຫານເອເລັກໂຕຣນິກ, ການຮ່ວມມືແລະການຄວບຄຸມທຸລະກິດ.
ຄູ່ມືນີ້ຈະເວົ້າເຖິງວິທີການຕິດຕັ້ງແລະ ກຳ ຫນົດ Alfresco Community Edition ໃນລະບົບ RHEL/CentOS 7/6, ລະບົບ Debian 8 ແລະ Ubuntu ກັບ Nginx server ເປັນເຄື່ອງແມ່ຂ່າຍເວັບໄຊຕ໌ frontend ສຳ ລັບການສະ ໝັກ.
ສຳ ລັບຂໍ້ ກຳ ນົດຂອງລະບົບ ຕຳ ່ສຸດ, Alfresco ຕ້ອງການເຄື່ອງທີ່ມີ RAM ຢ່າງ ໜ້ອຍ 4 GB ແລະລະບົບປະຕິບັດການ 64 ບິດ.
ຂັ້ນຕອນທີ 1: ຕິດຕັ້ງ Alfresco Community Edition
1. ກ່ອນ ດຳ ເນີນການຕິດຕັ້ງ Alfresco ທຳ ອິດຮັບປະກັນວ່າ wget utility ຖືກຕິດຕັ້ງໄວ້ໃນເຄື່ອງຂອງທ່ານໂດຍການອອກ ຄຳ ສັ່ງຂ້າງລຸ່ມນີ້ໂດຍມີສິດທິພິເສດຮາກຫຼືຈາກບັນຊີຮາກ.
# yum install wget # apt-get install wget
2. ຕໍ່ໄປ, ຕັ້ງລະບົບ hostname ຂອງລະບົບຂອງທ່ານແລະຮັບປະກັນວ່າຈຸດທີ່ແກ້ໄຂບັນຫາໃນທ້ອງຖິ່ນຊີ້ໃຫ້ IP Address ຂອງເຄື່ອງແມ່ຂ່າຍຂອງທ່ານໂດຍການອອກ ຄຳ ສັ່ງຕໍ່ໄປນີ້:
# hostnamectl set-hostname server.alfresco.lan # echo “192.168.0.40 server.alfresco.lan” >> /etc/hosts
3. ຖອດ MTA ໃດໆອອກຈາກເຄື່ອງ (ໃນກໍລະນີນີ້ server Postfix Mail) ໂດຍອອກ ຄຳ ສັ່ງຂ້າງລຸ່ມນີ້:
# yum remove postfix # apt-get remove postfix
4. ຕິດຕັ້ງຄວາມເພິ່ງພາອາໄສຕໍ່ໄປນີ້ທີ່ຊອບແວ Alfresco ຕ້ອງການເພື່ອເຮັດວຽກຢ່າງຖືກຕ້ອງ:
# yum install fontconfig libSM libICE libXrender libXext cups-libs # apt-get install libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2
5. ຕໍ່ໄປ, ໄປທີ່ 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. ຫຼັງຈາກການດາວໂຫຼດໄຟລ໌ໄບນາລີຈົບລົງ, ອອກ ຄຳ ສັ່ງດັ່ງຕໍ່ໄປນີ້ເພື່ອໃຫ້ການອະນຸຍາດການປະຕິບັດ ສຳ ລັບເອກະສານແລະ ດຳ ເນີນການຕິດຕັ້ງ alfresco.
# chmod +x alfresco-community-5.0.d-installer-linux-x64.bin # ./alfresco-community-5.0.d-installer-linux-x64.bin
7. ຫຼັງຈາກຂັ້ນຕອນການຕິດຕັ້ງເລີ່ມຕົ້ນ, ເລືອກພາສາແລະສືບຕໍ່ຂັ້ນຕອນການຕິດຕັ້ງໂດຍໃຊ້ຕົວຊ່ວຍສ້າງການຕິດຕັ້ງດ້ານລຸ່ມເພື່ອເປັນຄູ່ມືໃນການຕັ້ງຄ່າ 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
ຂອງຄວາມຍາວປາການຕິດຕັ້ງ 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.... 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. ຫຼັງຈາກຂັ້ນຕອນການຕິດຕັ້ງສິ້ນສຸດລົງແລະການບໍລິການ Alfresco ຖືກເລີ່ມຕົ້ນອອກ ຄຳ ສັ່ງດ້ານລຸ່ມເພື່ອເປີດພອດ firewall ຕໍ່ໄປນີ້ເພື່ອໃຫ້ຜູ້ໃຫ້ບໍລິການພາຍນອກໃນເຄືອຂ່າຍຂອງທ່ານເຊື່ອມຕໍ່ກັບ web application.
# firewall-cmd --add-port=8080/tcp -permanent # firewall-cmd --add-port=8443/tcp -permanent # firewall-cmd --add-port=7070/tcp -permanent # firewall-cmd --reload
ໃນກໍລະນີທີ່ທ່ານຕ້ອງການເພີ່ມກົດລະບຽບຂອງ firewall ອື່ນໆເພື່ອເປີດພອດເພື່ອເຂົ້າໃຊ້ບໍລິການຂອງ Alfresco ທີ່ອອກແບບໂດຍ ກຳ ນົດ ຄຳ ສັ່ງ ss
ເພື່ອໃຫ້ໄດ້ບັນຊີລາຍຊື່ຂອງການບໍລິການທັງ ໝົດ ທີ່ແລ່ນຢູ່ໃນເຄື່ອງຂອງທ່ານ.
# ss -tulpn
9. ເພື່ອເຂົ້າເຖິງການບໍລິການເວັບໄຊຕ໌ Alfresco, ເປີດ browser ແລະໃຊ້ທີ່ຢູ່ URL ຕໍ່ໄປນີ້ (ແທນທີ່ຢູ່ IP ຫຼືໂດເມນຕາມຄວາມ ເໝາະ ສົມ). ເຂົ້າສູ່ລະບົບກັບຜູ້ໃຊ້ admin ແລະລະຫັດຜ່ານທີ່ຕັ້ງໄວ້ ສຳ ລັບ Admin ຜ່ານຂັ້ນຕອນການຕິດຕັ້ງ.
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/
ຂັ້ນຕອນທີ 2: ຕັ້ງຄ່າ Nginx ເປັນ Frontend Web Server ສຳ ລັບ Alfresco
10. ໃນການຕິດຕັ້ງເຊີບເວີ Nginx ໃນລະບົບ, ທຳ ອິດເພີ່ມ Epel Repositories ໃນ CentOS/RHEL ໂດຍອອກ ຄຳ ສັ່ງຂ້າງລຸ່ມນີ້:
# yum install epel-release
11. ຫຼັງຈາກ Epel repos ຖືກເພີ່ມເຂົ້າໃນລະບົບການ ດຳ ເນີນການກັບການຕິດຕັ້ງເຊີຟເວີເວັບໄຊຕ໌ Nginx ໂດຍການອອກ ຄຳ ສັ່ງຕໍ່ໄປນີ້:
# yum install nginx [On RHEL/CentOS Systems] # apt-get install nginx [On Debian/Ubuntu Systems]
12. ໃນບາດກ້າວຕໍ່ໄປເປີດແຟ້ມການຕັ້ງຄ່າ 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 / { # }
13. ຫຼັງຈາກທີ່ທ່ານເຮັດ ສຳ ເລັດແລ້ວ, ບັນທຶກແລະປິດແຟ້ມການຕັ້ງຄ່າ Nginx ແລະເລີ່ມ daemon ເພື່ອສະທ້ອນການປ່ຽນແປງໂດຍການອອກ ຄຳ ສັ່ງດັ່ງຕໍ່ໄປນີ້:
# systemctl restart nginx.service
14. ໃນການເຂົ້າເຖິງອິນເຕີເຟດ Alfresco ເພີ່ມກົດລະບຽບຂອງ firewall ໃໝ່ ເພື່ອເປີດ port 80 ໃນເຄື່ອງຂອງທ່ານແລະ ນຳ ໄປທີ່ URL ຂ້າງລຸ່ມ. ນອກຈາກນີ້, ໃຫ້ແນ່ໃຈວ່ານະໂຍບາຍ Selinux ຖືກປິດໃຊ້ງານໃນລະບົບ RHEL/CentOS.
# firewall-cmd --add-service=http -permanent # firewall-cmd --reload # setenforce 0
ເພື່ອປິດນະໂຍບາຍ Selinux ຢ່າງສົມບູນໃນລະບົບ, ເປີດເອກະສານ /etc/selinux/config
ແລະຕັ້ງເສັ້ນ SELINUX ຈາກ ບັງຄັບໃຊ້
ໄປ ຄົນພິການ
.
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 proxy ດ້ວຍ 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
ເອົາໃຈໃສ່ກັບ ຊື່ສາມັນຂອງໃບຢັ້ງຢືນ
ເພື່ອກົງກັບຊື່ໂຮດຂອງໂດເມນຂອງທ່ານ.
17. ຕໍ່ໄປ, ເປີດເອກະສານການຕັ້ງຄ່າ Nginx ເພື່ອດັດແກ້ແລະເພີ່ມທ່ອນໄມ້ຕໍ່ໄປນີ້ກ່ອນວົງເລັບທີ່ປິດສຸດທ້າຍ (ສັນຍາລັກ }
).
# vi /etc/nginx/nginx.conf
ບົດຄັດຫຍໍ້ຂອງ 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. ສຸດທ້າຍ, ເລີ່ມໃຊ້ Nginx daemon ເພື່ອ ນຳ ໃຊ້ການປ່ຽນແປງ, ເພີ່ມກົດລະບຽບຂອງ firewall ໃໝ່ ສຳ ລັບ 443 port.
# systemctl restart nginx # firewall-cmd -add-service=https --permanent # firewall-cmd --reload
ແລະແນະ ນຳ ຕົວທ່ອງເວັບໄປທີ່ URL ຂອງໂດເມນຂອງທ່ານໂດຍໃຊ້ HTTPS protocol.
https://IP_or_domain.tld/share/ https://IP_or_domain.tld/alfresco/
19. ເພື່ອໃຫ້ Alfresco ແລະ Nginx daemons ສາມາດເຮັດວຽກໄດ້ທົ່ວລະບົບຕາມ ຄຳ ສັ່ງລຸ່ມນີ້:
# systemctl enable nginx alfresco
ຫມົດເທົ່ານີ້! Alfresco ສະ ເໜີ ການເຊື່ອມໂຍງກັບ MS Office ແລະ LibreOffice ຜ່ານໂປໂຕຄອນ CIFs ເຊິ່ງສະ ໜອງ ການເຮັດວຽກທີ່ຄຸ້ນເຄີຍ ສຳ ລັບຜູ້ໃຊ້.