RHEL/CentOS 7/6およびDebian 8にAlfresco Community Editionをインストールする方法

Alfrescoは、電子管理、コラボレーション、およびビジネスコントロールを提供する、Enterprise Content Management(ECM)のオープンソースシステムであり、Javaで書かれています。

Install Alfresco Community Edition in Linux

このガイドでは、Alfresco Community EditionRHEL/CentOS 7/6Debian 8、およびUbuntuシステムにNginxサーバーをフロントエンドウェブサーバーとしてインストールおよび構成する方法について説明します。

要件

最低システム要件として、Alfrescoには少なくとも4 GBRAMと64ビットのオペレーティングシステムを搭載したマシンが必要です。

ステップ1:Alfresco Community Editionのインストール

1. Alfrescoのインストールを進める前に、以下のコマンドをルート権限で実行するか、ルートアカウントから実行して、マシンにwgetユーティリティがインストールされていることを確認してください。

# yum install wget
# apt-get install wget
Install Wget in Linux

2. 次に、システムのホスト名を設定し、ローカル解決がサーバーのIPアドレスを指すようにするために、次のコマンドを実行してください:

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

3. マシンからMTA(この場合はPostfixメールサーバー)を削除するには、以下のコマンドを実行してください:

# yum remove postfix
# apt-get remove postfix
Remove Postfix in Linux

4. Alfrescoソフトウェアが正常に実行されるために必要な依存関係をインストールしてください。

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

5.次に、sourceforge.netポータルでホストされているAlfresco Community Editionリポジトリページに移動し、Linux用の最新バイナリバージョン(すなわちalfresco-community-5.0.d-installer-linux-x64.bin)をwgetユーティリティを使用して取得してください。

# 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を構成するためのインストールプロセスを続行してください。

[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
Installation of Alfresco Community Edition

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

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

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

8. インストールプロセスが完了し、Alfrescoサービスが開始されたら、以下のコマンドを発行して、外部ホストがネットワーク内の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

カスタムAlfrescoサービスにアクセスするためにポートを開くための他のファイアウォールルールを追加する必要がある場合は、マシンで実行中のすべてのサービスのリストを取得するためにssコマンドを発行してください。

# ss -tulpn

9. AlfrescoのWebサービスにアクセスするには、ブラウザを開いて次のURLを使用します(IPアドレスまたはドメインを適切に置き換えます)。インストールプロセスでAdminのパスワードを構成したadminユーザーでログインします。

http://IP-or-domain.tld:8080/share/ 
Alfresco Community Login
Alfresco Administrator Dashboard
http://IP-or-domain.tld:8080/alfresco/ 
Alfresco Documentation

WebDAV用。

http://IP-or-domain.tld:8080/alfresco/webdav 
Alfresco WebDav Directory Listing

HTTPSの場合はセキュリティ例外を受け入れます。

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

マイクロソフトのAlfresco SharePointモジュール。

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

ステップ2:AlfrescoのフロントエンドWebサーバーとしてNginxを設定します

10. システムにNginxサーバーをインストールするには、まず以下のコマンドを実行してCentOS/RHELにEpelリポジトリを追加します。

# yum install epel-release

11. Epelリポジトリがシステムに追加されたら、以下のコマンドを使用してNginx Webサーバーのインストールを進めます。

# 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;
    }
Configure Nginx for Alfresco

下に移動し、次の行の前に#を置いて、2番目のロケーションステートメントをコメントアウトしてください。

#location / {
#        }

13. 完了したら、Nginx構成ファイルを保存して閉じ、次のコマンドを使用してデーモンを再起動して変更を反映させます。

# systemctl restart nginx.service

14. AlfrescoのWebインターフェースにアクセスするには、マシン上のポート80を開くための新しいファイアウォールルールを追加し、以下のURLに移動します。また、RHEL/CentOSシステムでSelinuxポリシーが無効になっていることを確認してください。

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

システム上のSelinuxポリシーを完全に無効にするには、/etc/selinux/configファイルを開き、行SELINUXをenforcingからdisabledに設定します。

15.これで、Nginxを介してAlfrescoにアクセスできます。

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

15.Nginxプロキシを介してAlfresco Webインターフェイスに安全にアクセスしたい場合は、/etc/nginx/ssl/ディレクトリにNginx用の自己署名証明書を作成し、以下のスクリーンショットに示すようにカスタム設定で証明書を埋めます:

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

Nginxの自己署名証明書を作成する

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. 
  }
Nginx SSL Configuration for Alfresco

18.最後に、変更を適用するためにNginxデーモンを再起動し、443ポートの新しいファイアウォールルールを追加します。

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

そして、ブラウザにHTTPSプロトコルを使用してドメインURLを指示します。

https://IP_or_domain.tld/share/
https://IP_or_domain.tld/alfresco/
Configure Alfresco as Domain

19.AlfrescoとNginxデーモンをシステム全体で有効にするには、以下のコマンドを実行します:

# systemctl enable nginx alfresco

以上です!Alfrescoは、MS OfficeやLibreOfficeを介したCIFsプロトコルを使用した統合を提供し、ユーザーには馴染みのあるワークフローを提供します。MS OfficeLibreOffice

Source:
https://www.tecmint.com/install-alfresco-community-edition-on-centos-debian-ubuntu/