RHEL/CentOS 7/6 と Debian 8 に Alfresco Community Edition をインストールする方法
Alfrescoは、電子管理、コラボレーション、ビジネスコントロールを提供するJavaで書かれたオープンソースのECMシステム(エンタープライズコンテンツ管理)です。
このガイドでは、Alfresco Community EditionをRHEL/CentOS 7/6、Debian 8、およびUbuntuシステムにNginxサーバーをフロントエンドWebサーバーとして使用してインストールし、構成する方法について説明します。
要件
最低システム要件として、Alfrescoには少なくとも4 GBのRAMと64ビットのオペレーティングシステムを備えたマシンが必要です。
ステップ1:Alfresco Community Editionをインストールする
1. Alfrescoのインストールを進める前に、以下のコマンドをルート権限またはルートアカウントから実行して、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. 以下のコマンドを実行して、マシンからMTA(この場合はPostfixメールサーバー)を削除します:
# 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リポジトリページにアクセスし、wgetユーティリティを使用してLinux用の最新のバイナリバージョン(すなわちalfresco-community-5.0.d-installer-linux-x64.bin)を取得します。
# wget http://nchc.dl.sourceforge.net/project/alfresco/Alfresco%205.0.d%20Community/alfresco-community-5.0.d-installer-linux-x64.bin
6. バイナリファイルのダウンロードが完了したら、ファイルの実行権限を付与し、アルフレスコインストーラーを実行するために次のコマンドを発行してください。
# 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
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
8. インストールプロセスが完了し、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
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/
マイクロソフトとのAlfresco SharePointモジュール。
http://IP-or-domain.tld:7070/
ステップ2:AlfrescoのフロントエンドWebサーバーとしてNginxを設定する
10. システムにNginxサーバーをインストールするために、まず以下のコマンドを発行してCentOS/RHELにEpelリポジトリを追加します:
# yum install epel-release
11. Epelリポジトリがシステムに追加された後、以下のコマンドを実行してNginxウェブサーバーのインストールを進めてください:
# 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 / {
}
13. 終了したら、Nginxの設定ファイルを保存して閉じ、以下のコマンドを発行して変更を反映するためにデーモンを再起動します:
# systemctl restart nginx.service
14. Alfrescoウェブインターフェースにアクセスするには、新しいファイアウォールルールを追加して、マシンのポート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プロキシを介してSSLでAlfrescoウェブインターフェースに安全にアクセスしたい場合は、/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は、ユーザーにとって親しみやすいワークフローを提供するCIFsプロトコルを介して、MS OfficeとLibreOfficeとの統合を提供します。
















