ウェブサイト検索

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


Alfresco は、Java で書かれたオープンソース ECM システム (エンタープライズ コンテンツ管理) で、電子管理、コラボレーション、ビジネス制御を提供します。

このガイドでは、RHEL/CentOS 7/6Debian 8、およびUbuntuAlfresco Community Editionをインストールして設定する方法について説明します。アプリケーションのフロントエンド Web サーバーとしてNginx サーバーを備えたstrong> システム。

要件

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

ステップ 1: Alfresco Community Edition をインストールする

1. Alfresco のインストールを続行する前に、root 権限または root アカウントで以下のコマンドを発行して、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 メール サーバー) から MTA を削除します。

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. 次に、sourceforge.net ポータルでホストされている Alfresco Community Edition リポジトリ ページに移動し、最新のバイナリ バージョン (つまり、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

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

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

屋外でのインストールは続行されます…

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

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 アドレスまたはドメインは適宜置き換えてください)。管理者ユーザーと、インストールプロセスを通じて管理者用に設定されたパスワードを使用してログインします。

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/ 

Microsoft による 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. 次のステップでは、テキスト エディタで /etc/nginx/nginx.conf にある Nginx 構成ファイルを開き、次の変更を加えます。

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

以下に進み、次の行の前に # を入れて 2 番目の location ステートメントをコメント化してください。

#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. SSL を使用した 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

証明書の共通名 がドメインのホスト名と一致するように注意してください。

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 デーモンを再起動して変更を適用し、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/

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

systemctl enable nginx alfresco

それだけです! Alfresco は、CIF プロトコルを介してMS Office およびLibreOffice との統合を提供し、ユーザーに使い慣れたワークフローを提供します。