Alfresco Enterprise Viewer 3.2のインストール
- 1 はじめに
- 2 1. 事前準備
- 2.1 1.1. ソフトウェア
- 2.2 1.2. 実行用ユーザー
- 2.3 1.3. 作業用ディレクトリ
- 3 2. FFMpegのインストール
- 4 3. Alfresco Enterprise Viewerのインストール
- 5 4. 動作確認
はじめに
このページでは、Alfresco Enterprise Viewer 3.2のインストール方法を説明します。
1. 事前準備
1.1. ソフトウェア
次のものがインストールされている環境をご準備ください。
Alfresco Content Services 7.2(WARファイルからインストールされていること)
インストールされていない場合は、次の手順を参考にインストールを進めてください。
Alfresco Content Services 7.x のインストール(WAR ファイル)
なお、Alfresco Content Servicesは、 /opt/alfresco/content-services/ 以下にインストールされていることを前提とします。
(上記リンクの通りAlfresco Content Servicesがインストールされていれば、上記ディレクトリは存在します)
1.2. 実行用ユーザー
実行用ユーザーとして alfresco が予め追加されていることを前提とします。
(上記リンクの通りAlfresco Content Servicesがインストールされていれば、 alfresco ユーザーは追加されます)
alfresco ユーザーが追加されていない場合は、上記リンクを参考に追加してください。
1.3. 作業用ディレクトリ
zipファイル展開用の作業用ディレクトリを作成してください。
(実行用ユーザーの追加手順は、上記リンクに記載されています)
2. FFMpegのインストール
以下のURLより「ffmpeg-release-amd64-static.tar.xz」をダウンロードします。
以下のコマンドを作業用ディレクトリ配下で順に実行します。
※展開後に生成される「ffmpeg-5.0.1-amd64-static」ディレクトリは、インストールを行うバージョンに合わせて適宜読み替えて対応ください。
# tar Jxvf ffmpeg-release-amd64-static.tar.xz
# mv ./ffmpeg-5.0.1-amd64-static /opt/ffmpeg3. Alfresco Enterprise Viewerのインストール
3.1. ファイルの展開と配置
作業用ディレクトリ上にAlfresco Enterprise ViewerのZIPファイル aev-for-alfresco-v7.0.1-and-above-on-linux-3.3.6.zip を配置のうえ、作業用ディレクトリ配下で以下のコマンドを順に実行します。
※ZIPファイル名は、バージョンに応じて適宜読み替えて対応ください。
# mkdir alfresco-enterprise-viewer
# unzip aev-for-alfresco-v7.0.1-and-above-on-linux-3.3.6.zip -d /alfresco-enterprise-viewer/
# chown -R alfresco:alfresco alfresco-enterprise-viewer
# cd alfresco-enterprise-viewer
# mv OpenAnnotate.war /opt/alfresco/content-services/tomcat/webapps/
# mv OpenAnnotateVideo.war /opt/alfresco/content-services/tomcat/webapps/
# mv tsgrp-opencontent.amp /opt/alfresco/content-services/amps/
# mv oa-alfresco.amp /opt/alfresco/content-services/amps/
# mv oa-share-external-launcher.amp /opt/alfresco/content-services/amps_share/
# mv oa-share-webpreview.amp /opt/alfresco/content-services/amps_share/
# tar zxvf pdfium.tar.gz
# mkdir /opt/pdfium
# mv pdfium /opt/pdfium
# chmod +x /opt/pdfium/pdfium3.2. mmtファイル (Alfresco Module Packate) のインストール
以下のコマンドを順に実行します。
# cd /opt/alfresco/content-services
# java -jar bin/alfresco-mmt.jar install amps/tsgrp-opencontent.amp tomcat/webapps/alfresco.war -force
# java -jar bin/alfresco-mmt.jar install amps/oa-alfresco.amp tomcat/webapps/alfresco.war -force
# java -jar bin/alfresco-mmt.jar install amps_share/oa-share-webpreview.amp tomcat/webapps/share.war -force
# java -jar bin/alfresco-mmt.jar install amps_share/oa-share-external-launcher.amp tomcat/webapps/share.war -force3.3. 設定ファイルの追加
opencontent-override-placeholders.propertiesの追加
以下のコマンドを順に実行します。
# mkdir -p /opt/alfresco/content-services/tomcat/shared/classes/alfresco/module/com.tsgrp.opencontent
# cd /opt/alfresco/content-services/tomcat/shared/classes/alfresco/module/com.tsgrp.opencontent
# touch opencontent-override-placeholders.properties
# echo "FFMPEG.path=/opt/ffmpeg" >> opencontent-override-placeholders.properties
# echo "pdfium.path=/opt/pdfium" >> opencontent-override-placeholders.propertiesopenannotate-override-placeholders.propertiesの追加
以下のコマンドを順に実行します。
# mkdir -p /opt/alfresco/content-services/tomcat/shared/classes
# cd /opt/alfresco/content-services/tomcat/shared/classes
# touch openannotate-override-placeholders.properties
# echo "ocRestEndpointAddress=http://<ACSから見たACSのドメインまたはIPアドレス>:<ポート番号>/alfresco/OpenContent" >> openannotate-override-placeholders.properties
# echo "ocRestEndpointAddress=http://<Webブラウザから見たACSのドメインまたはIPアドレス>:<ポート番号>/alfresco/OpenContent" >> openannotate-override-placeholders.propertiesPなお、各設定値のURLに指定するドメインまたはIPアドレスは次の通りとします。
ocRestEndpointAddress
Alfresco Content Servicesが動作するサーバから見た(Alfresco Content Servicesから直接アクセス可能な)OpenContentのURLを設定します。
Alfresco Content Servicesが動作するサーバのホスト名(プライベートDNSやhostsファイルで解決可能なもの)あるいはプライベートIPアドレスを設定します。
リバースプロキシやロードバランサを経由してAlfresco Content Servicesを公開している場合は、公開URLではない(Webブラウザから見たURLではない)ことにご注意ください。
clientRequestUrl
Webブラウザから見たOpenContentのURLを設定します。
リバースプロキシやロードバランサ経由でAlfresco Content Servicesを公開している場合は、リバースプロキシやロードバランサで公開しているURLを設定します。
リバースプロキシやロードバランサを経由せず、直接Alfresco Content Servicesを利用している場合は、Alfresco Content Servicesが動作するサーバのホスト名またはIPアドレスを指定します。
HTTPSでAlfresco Content Servicesを公開している場合は、
http://をhttps://へ変更します。ウェルノウンポート(HTTP・・・80, HTTPS・・・443)でAlfresco Content Servicesを公開している場合、ポート番号は不要です。
3.5. ライセンスファイルの追加
作業用ディレクトリ上にライセンスファイル TextLicense.l4j を配置のうえ、次のコマンドを実行します。
# mkdir -p /opt/alfresco/content-services/tomcat/shared/classes/alfresco/module/com.tsgrp.opencontent/license
# mv TextLicense.l4j /opt/alfresco/content-services/tomcat/shared/classes/alfresco/module/com.tsgrp.opencontent/license/なお、ライセンスファイル名が TextLicense.l4j とは異なる場合は、名称を合わせたうえで上記対応ください。
3.6. server.xml の変更
以下の通り server.xml (/opt/alfresco/content-services/tomcat/conf/server.xml)の該当箇所を変更します。
server.xml: 変更前
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />server.xml: 変更後
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
relaxedQueryChars="{}[]|"
relaxedPathChars="{}[]|" />3.7. WARファイルの展開(Alfresco Content Servicesの起動および停止)
以上の対応が完了したら、Alfresco Content Servicesを起動します。(起動後、3.1 で配置したwarファイルが展開されます)
Alfresco Content Servicesの起動が完了したら、Alfresco Content Servicesを停止します。
3.8. 古いライブラリの削除
Alfresco Enterprise Viewer 3.2には、Alfresco Content Services 7.2と互換性の無い(Alfresco Content Services 7.2 に同梱されているものよりも古い)ライブラリが含まれているため、これらのライブラリを削除します。
# rm /opt/alfresco/content-services/tomcat/webapps/alfresco/WEB-INF/lib/jackson-annotations-2.10.2.jar
# rm /opt/alfresco/content-services/tomcat/webapps/alfresco/WEB-INF/lib/jackson-core-2.10.2.jar
# rm /opt/alfresco/content-services/tomcat/webapps/alfresco/WEB-INF/lib/jackson-databind-2.10.2.jar3.9. Alfresco Content Servicesの起動
以上の対応が完了したら、Alfresco Content Servicesを起動します。
4. 動作確認
4.1. OpenContentの動作確認
Webブラウザからhttp://<Webブラウザから見たACSのドメインまたはIPアドレス>:<ポート番号>/alfresco/OpenContentへアクセスし、以下のような結果が出力されることを確認します。
4.2. OpenAnnotateの動作確認
Alfresco Shareへログインし、サイト上にアップロードされたPDFを開きます。
PDFを開いた後、以下のような結果が出力される(Alfresco Enterprise Viewerのユーザーインターフェースが表示される)ことを確認します。