1
目次
1. はじめに
5
1-1. システム必要条件 6 サーバ 6 問題作成パソコン 7 利用者パソコン 7 授業支援オプションを利用するタブレット端末 8 モバイル端末 9 1-2. システム概要 11 システムの構成例 112. インストール
13
2-1. 事前準備 14 OS インストール 14 環境変数の変更 15 SELinux の設定 16 Firewall の設定 16 ゲストアカウントの作成 17 wget のセットアップ 17 samba のセットアップ 17 expect のセットアップ 17 NTP のセットアップ 17 rsync のセットアップ 18 Java のセットアップ 18 データベースのセットアップ(OS バージョン 6.x の場合) 18 データベースのセットアップ(OS バージョン 7.x の場合) 20 Tomcat のセットアップ(OS バージョン 6.x の場合) 22 Tomcat のセットアップ(OS バージョン 7.x の場合) 24 Apache インストール(OS バージョン 6.x の場合) 26 Apache のインストール(OS バージョン 7.x の場合) 28 自動起動の設定(OS バージョン 6.x の場合) 29 自動起動の設定(OS バージョン 7.x の場合) 30 GNUStep のインストール 30 PHP インストール(OS バージョン 6.x の場合) 32 PHP のインストール(OS バージョン 7.x の場合) 34 MediaInfo のインストール(OS バージョン 6.x の場合) 362 MediaInfo のインストール(OS バージョン 7.x の場合) 36 ffmpeg のインストール(Cent OS の場合) 37 ffmpeg のインストール(RedHat OS の場合) 42 samba の設定 48 fuser のセットアップ 49 Perl のセットアップ 49 その他ライブラリのセットアップ 49 2-2. インストール 50 CaLabo Bridge インストール 50 インストール後の設定について 56 Shibboleth 認証をご利用になる場合 58 OpenAM(OpenSSO)認証をご利用になる場合 61
3. アンインストール
68
3-1. アンインストール 69 CaLabo Bridge アンインストール 694. CaLabo Bridge e-Learning 管理ツール
72
4-1. インストール 73
CaLabo Bridge e-Learning 管理ツールのインストール 73
4-2. アンインストール 76
CaLabo Bridge e-Learning 管理ツールのアンインストール 76
5. ストリーミングサービス
78
5-1. 初期設定 79 メディアサーバの登録 79 カテゴリの登録 80 5-2. インストール 83 VOD Player のインストール 83 VOD Uploader のインストール 84 5-3. アンインストール 85 VOD Player のアンインストール 85 VOD Uploader のアンインストール 866. モニタリング
88
6-1. インストール 89 クライアントアプリのインストール 89 ショートカットの作成 913 6-2. 初期設定 92 接続先サーバの設定 92 6-3. アンインストール 93 クライアントアプリのアンインストール 93
CHIeru サポートについて
0
5
1.はじめに
6
1-1.システム必要条件
サーバ
OS Cent OS 6.9(64bit) / 7.4(64bit)
Red Hat Enterprise Linux 6.9(64bit) / 7.4(64bit)
CPU Intel Xeon E3 3.20GHz 以上
メモリ 8GB 以上(16GB 以上推奨) HDD 4GB 以上の空き領域(必須アプリケーション領域除く) ※ファイルサーバ、教材サーバとして利用する場合等は、別途必 要。 ネットワーク Gigabit Ethernet 推奨 アプリケーション PostgreSQL 8.4 以上 Apache 2.4 以上 mod_ssl 2.4 以上 (SSL 通信を行う場合) Tomcat 8.0 以上 JRE 1.8 以上 Perl 5.10 以上 Bash 4.1 以上 Samba 3.6 以上 PHP 5.6.x NTP 4.2 以上 NFS Server /NFS Client (複数台構成時) GCC 4.4 以上 Gcc-objc 4.4 以上 GNUStep 0.32.0 (GNUSTEP_START_VERSION) firewalld 0.39 以上 (OS のバージョンが 7.x の場合) expect 5.44 以上 wget 1.14 以上 rsync 3.0 以上 FFmpeg 2.5 MediaInfo 0.7.71 psmisc 22.20 以上 shibboleth 2.4.2 (※1)
OpenSSO Policy Agent 3.0-01 for Apache Tomcat 6.0 (※2) ※1 Shibboleth を利用した SSO 環境を構築するために必要。 ※2 OpenSSO を利用した SSO 環境を構築するために必要。
7
問題作成パソコン
OS Windows 10 Pro / Windows 8.1 Pro / Windows 7 Professional SP1
CPU Intel Core 2 Duo 2.1GHz 以上
メモリ 2GB 以上 HDD 100MB 以上の空き領域(必須アプリケーション領域除く) ブラウザ Internet Explorer 11 Firefox v47 (*) Google Chrome v51 (*) ※ Cookie、JavaScript が利用可能であること。 ※ 32 ビット版ブラウザをご利用ください。 ※ Microsoft Edge には対応していません。 (*) VOD、および e-Learning 教材は利用できません。 その他
Windows Media Player 12 DirextX 9.0c End-User Runtime Divx 5.20
PostgreSQL ODBC ドライバ 8.04
利用者パソコン
OS Windows 10 / Windows 8.1 / Windows 7 SP1
CPU Intel Core 2 Duo 2.1GHz 以上
メモリ 2GB 以上 HDD 50MB 以上の空き領域(必須アプリケーション領域除く) ブラウザ Internet Explorer 11 Firefox v47 (*) Google Chrome v51 (*) ※ Cookie、JavaScript が利用可能であること。 ※ 32 ビット版ブラウザをご利用ください。 ※ Microsoft Edge には対応していません。 (*) VOD、および e-Learning 教材は利用できません。 (*)モニタリング機能は Google Chrome でのみ利用できます。 その他
Windows Media Player 12 DirextX 9.0c End-User Runtime Divx 5.20
8
授業支援オプションを利用するタブレット端末
Windows
OS Windows 10 / Windows 8.1 (Windows RT は除く)
CPU Intel(R)Atom(TM)CPU Z2760 1.80GHz 以上 (Intel Core 2 Duo 2.1GHz 以上 推奨)
メモリ 2GB 以上 ブラウザ Internet Explorer 11 Firefox v47 (*) Google Chrome v51 (*) ※ Cookie、JavaScript が利用可能であること。 ※ 32 ビット版ブラウザをご利用ください。 ※ Microsoft Edge には対応していません。 (*) VOD、および e-Learning 教材は利用できません。 (*)モニタリング機能は Google Chrome でのみ利用できます。 メモリ 2GB 以上
iPad Air / iPad 3
OS iOS 9.0 以上 メモリ 2GB 以上 ブラウザ Mobile Safari その他 Wi-Fi 機能を有すること Android 端末 OS Android 5.0 以上 メモリ 2GB 以上 ブラウザ Google Chrome 54 ※画面解像度は1280 x 800 以上推奨 その他 Wi-Fi 機能を有すること ※タブレット端末をご利用の場合は、教室内にWi-Fi 環境をご用意いただく必要がありま す。設置・インストール手順等は授業支援オプション 操作マニュアルを参照してくだ さい。
9
モバイル端末
iPad OS iOS 9.0 以上 メモリ 2GB 以上 ブラウザ Mobile Safari その他 Wi-Fi 機能を有すること Android タブレット OS Android 4.4 以上 メモリ 2GB 以上 ブラウザ Google Chrome 54 その他 Wi-Fi 機能を有すること ※画面解像度は1280 x 800 以上推奨 iOS スマートフォン OS iOS 9.0 以上 ブラウザ Mobile Safari その他 Wi-Fi 機能を有すること Android スマートフォン OS Android 4.4 以上 ブラウザ Google Chrome 54 その他 Wi-Fi 機能を有すること11
1-2.システム概要
システムの構成例
【CaLabo Bridge 構成例】 ■サーバエリア サーバエリアには、校内で利用するサーバが配置されます。CaLabo Bridge サーバは通常ここ に配置します。ディレクトリサーバをご利用の場合、CaLabo Bridge サーバと連携して、認証 ログインが可能になります。メールサーバをご利用の場合、メールサーバを利用したCaLabo Bridge のサービスをご利用いただけます。 ■Web サービスGlexa・CHIeru.net・ABLish をご利用の場合、CaLabo Bridge にアクティビティとして登録し、 再度ログインすることなくシームレスにご利用いただけます。
■教室
教員PC と学習者 PC で CaLabo EX / LX をご利用の場合、CaLabo Bridge で登録したコース、ア
12 ■利用者
CaLaboBridge を校内外からアクセス可能な状態に設定することで、校内外から学習・閲覧や教 材作成・登録等を行うことが可能です。
13
2.インストール
ここでは、CaLabo Bridge のインストールについ
て記載します。
14
2-1.事前準備
CaLabo Bridge をインストールする前の事前準備を行います。注意
事前準備にてインストールする各 RPM パッケージのバージョンがシステム必要条件のも のと異なっていた場合、CaLabo Bridge のインストールやインストール後の動作が正常に 行われない可能性があります。OS インストール
サーバにOS をインストールします。(ここではCentOS6.5 のインストール例を説明します。) 1) インストール DVD を挿入し、PC を起動します。 2) 日本語を選択します。 3) 日本語のキーボードを選択します。 4) パーティションの設定を行います。ポイント
Swap 領域は物理メモリの 2 倍以上確保してください。 パーティションの切り方に特に制限はありませんが、データ格納に利用する/home と/var はそれぞれ別で切ることを推奨します。(デフォルトでは/home にデータベース、/var に 教材が展開されます。) 5) ネットワークの設定を行います。ポイント
ネットワーク設定はインストール完了後に行っても問題ありません。 サーバのセットアップにはインターネットに接続できる必要があります。 6) OS と共にインストールを行うソフトウェアを選択します。 ・「デスクトップ」より「汎用デスクトップ(Gnome デスクトップ)」のチェックを外し ます。(デスクトップ環境を利用する場合はチェックを入れておいても問題ありませ ん) ・「サーバー」より「CIFS ファイルサーバ」のチェックを入れます。 ・その他はデフォルトのままで問題ありません。ポイント
Postgresql は選択せず、後ほど yum を利用してインストールを行います。 Java は選択せず、後ほどインストールを行います。 Apache は後ほど必要に応じてインストールを行います。 Tomcat はインストールされませんので後ほどインストールを行います。 Samba、perl、bash はそのままのバージョンで利用可能です。 yum を利用する場合、インターネットに接続可能である必要があります。 7) インストールを完了します。15
環境変数の変更
必要に応じて環境変数の変更を行います。 1) プロセスがオープン可能なファイル数の調整を行います。 下記コマンドでシステムの設定値の確認を行います。 # cat /proc/sys/fs/file-max 102359 必要に応じて変更を行います。 # vi /etc/sysctl.conf fs.file-max = xxxxxx # sysctl -p <- 反映させます。ポイント
上記はシステム全体のファイルディスクリプタの上限値になります。基本的にはデフォルト値で問題ありませんが、「too many file open」のエラーが発生す
る場合、本値を調整する必要があります。 2) 共有メモリの値を調整する場合は、以下の記述を追加します。 # vi /etc/sysctl.conf kernel.shmmax = xxxxxx kernel.shmall = xxxxxx
ポイント
「kernel.shmmax」は 1 プロセスごとの共有メモリの大きさ、「kernel.shmall」はシス テム全体の共有メモリの大きさになります。 基本的には変更は不要ですが、PostgreSQL や Tomcat のメモリをチューニングする場 合に、合わせて変更が必要な場合があります。 3) ユーザごとのファイルディスクリプタの上限値を変更します。 # vi /etc/security/limits.conf 下記設定値を追記します。 ※tomcat に関してはユーザを追加した後に下記設定値を追記してください。 [root]root soft nofile 5120 root hard nofile 5120
[apache]
apache soft nofile 5120 apache hard nofile 5120
[tomcat]
tomcat soft nofile 5120 tomcat hard nofile 5120
ポイント
「soft nofile」は一般ユーザが読み込める最大ファイル数、「hard nofile」は root ユーザ が読み込める最大ファイル数となっています。
4) 設定変更後はリブートを行い、open file の値が設定した値になっていることを確認し
ます。
16
SELinux の設定
SELinux を無効化します。 下記コマンドでSELinux の設定を確認します。 # getenforce Enforcing 確認した値がDisabled となっていない場合は、変更を行います。 # vi /etc/selinux/config SELINUX=disabled 上記設定変更後、リブートを行います。Firewall の設定
CaLabo Bridge で利用するポートの設定を行います。 ネットワーク上にFirewall を設定する場合、以下のポートにアクセスが出来るように設定を 行ってください。 ssh : 22(リモートメンテナンス用) http : 80 https : 443(SSL 通信を行う場合) netbios : 137、139(Samba: 問題作成パソコンとの通信) nfs : xxx(複数台構成で利用する場合の NFS 共有用ポート) postgres : 5432(ODBC 接続、JDBC 接続:問題作成パソコンとの通信) vod : 2323、2326 web-monitor : 9000(PeerJS)、9070(WebSocket)、9080(HTTP) [OS バージョンが 6.x の場合] Firewall の設定は、/etc/sysconfig/iptables を編集します。 [OS バージョンが 7.x の場合] Firewall の設定は、Firewalld を利用して行います。 Firewalld がインストールされていない場合は、インストール後に行ってください。# yum install firewalld
firewalld が無効となっている場合には、下記のコマンドで有効化する必要があります。
# systemctl enable firewalld # systemctl start firewalld
Firewall の設定状況の確認を行う場合には、下記のコマンドを実行します。 # firewall-cmd --list-all # firewall-cmd --list-all-zones
ポイント
Web-monitor のポート解放 [OS バージョンが 6.x の場合]# iptables -A INPUT -p tcp -m tcp --dport 9000 -j ACCEPT # iptables -A INPUT -p tcp -m tcp --dport 9070 -j ACCEPT # iptables -A INPUT -p tcp -m tcp --dport 9080 -j ACCEPT
17 [OS バージョンが 7.x の場合]
# firewall-cmd --add-port=9000/tcp --zone=public –permanent # firewall-cmd --add-port=9070/tcp --zone=public –permanent # firewall-cmd --add-port=9080/tcp --zone=public –permanent # firewall-cmd --reload
ゲストアカウントの作成
SSH でアクセスするためのユーザを追加します。
# groupadd -g 500 guest
# useradd -m -d /home/guest -u 500 -g guest -s /bin/bash guest # passwd guest
Changing password for user guest.
New password: <--新しいパスワードを入力 Retype new password: <--再入力
passwd: all authentication tokens updated successfully.
ポイント
ユーザアカウントを追加する場合、ユーザID、グループ ID を指定してください。複数 台構成の場合、別サーバにおいても同じID を使用してください。 セキュリティ向上のためSSH の root ログインを禁止することを推奨いたします。 # vi /etc/ssh/sshd_config PermitRootLogin yes -> no に変更 # /etc/rc.d/init.d/sshd restart <- OS のバージョン 6.x の場合# systemctl restart sshd.service<- OS のバージョン 7.x の場合
ポイント
PermitRootLogin の先頭に#がある場合は、#を取り除いてコメントアウトを解除しま す。
wget のセットアップ
wget のセットアップを行い、サーバーのセットアップがスムーズに行えるようにします。
# yum install wget
samba のセットアップ
samba のセットアップを行います。
# yum install samba
expect のセットアップ
expect のセットアップを行います。
# yum install expect
NTP のセットアップ
NTP のセットアップを行い、サーバの時間を定期的に合わせるようにします。
18
ポイント
NTP コマンド発行は、CaLaboBridge をインストールすれば定期的に自動実行されます。 デフォルトのタイムサーバはntp1.jst.mfeed.ad.jp となっています。必要に応じて CaLaboBridge の管理画面から変更してください。rsync のセットアップ
バックアップを実施するためにrsync をセットアップする必要があります。# yum install rsync
Java のセットアップ
JRE(Java Runtime Environment)のセットアップを行います。
Java のサイト(https://java.com/ja/download/manual.jsp)より JRE1.8 のアーカイブ・バイ ナリ・ファイルの最新版をダウンロードします。(例:jre-8u91-linux-x64.tar.gz) ダウンロードしたファイルをサーバー上に展開し、以下の手順でセットアップを行います。 1) 以下のコマンドを root 権限で実行します。 # gunzip jre-8u91-linux-x64.tar.gz # tar xf jre-8u91-linux-x64.tar # mkdir /usr/java # cp -r jre1.8.0_91 /usr/java/. # cd /usr/java # ln -s jre1.8.0_91 latest # ln -s jre1.8.0_91 default
データベースのセットアップ(
OS バージョン 6.x の場合)
Postgresql のインストールを行い、データベースをセットアップします。 1) yum コマンドで PostgreSQL をインストールします。# yum install postgresql-server # yum install postgresql-devel
2) データベース格納用のディレクトリを作成します。
# mkdir /home/postgres
# chown postgres:postgres /home/postgres
3) Postgres ユーザでログインし、環境変数を設定します。
# su postgres $ vi ~/.bashrc
下記内容を追記します。
# User specific aliases and functions # Source global definitions
if [ -f /etc/bashrc ]; then . /etc/bashrc fi
19 export PGDATABASE=chierudb export PGDATA=/home/postgres/chieru/data
ポイント
.bashrc ファイルがない場合は新規作成し、上記内容を入力・保存してください。 続けて下記のファイルを編集します。 $ vi ~/.bash_profile 下記内容を入力し、保存します。[ -f /etc/profile ] && source /etc/profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then . ~/.bashrc fi #PGDATA=/var/lib/pgsql/data <-- コメントアウト #export PGDATA <-- コメントアウト 4) ログオフ後、再度 postgres でログインを行い、環境変数の設定を反映させます。 $ exit # su postgres 5) データベースを構築します。(postgres ユーザで行います。) $ initdb --encoding=UTF-8 先ほどの環境変数「PGDATA」にデータベースが構築されます。 6) 設定ファイルでクライアント認証の設定を行います。 $ cd /home/postgres/chieru/data $ vi pg_hba.conf 下記のように1 行追記します。
# "local" is for Unix domain socket connections only
local all all trust # IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 0.0.0.0/0 trust <-- 追記 # IPv6 local connections:
host all all ::1/128 trust
続けてpostgresql.conf を編集します。下記設定内容と同じになるように編集します。
$ vi postgresql.conf
listen_addresses = 'localhost' → '*' に変更 Port = 5432
max_connections = 100 ※この値は CaLaboBridge からの接続数(connectionpool)に 応じて調整が必要です。
shared_buffers = 32M ※デフォルト値は小さいため RAM サイズに応じて調整します。 backslash_quote = safe_encoding → off に変更
escape_string_warning = on
standard_conforming_strings = off → on に変更
20 7) 起動シェルを変更します。(ルートユーザで行います。) $ exit # vi /etc/init.d/postgresql PGDATA=/var/lib/pgsql/data -> /home/postgres/chieru/data に変更します。 8) 自動起動の設定をします。 # chkconfig postgresql on 9) Postgresql を起動します。 # /etc/init.d/postgresql start
データベースのセットアップ(
OS バージョン 7.x の場合)
Postgresql のインストールを行い、データベースをセットアップします。 1) yum を利用し Postgresql のセットアップを行います。# yum install postgresql-server # yum install postgresql-devel
2) postgresql.service を編集します。 # vi /usr/lib/systemd/system/postgresql.service Environment=PGDATA=/var/lib/pgsql/data → Environment=PGDATA=/home/postgres/chieru/data に変更します。 3) postgresql.service を/etc/systemd/system にコピーします。 # cp /usr/lib/systemd/system/postgresql.service /etc/systemd/system 4) データベース格納用のディレクトリを作成します。 # mkdir /home/postgres
# chown postgres:postgres /home/postgres
5) Postgres ユーザでログインし、環境変数を設定します。
# su postgres $ vi ~/.bashrc
下記内容を追記します。
# User specific aliases and functions # Source global definitions
if [ -f /etc/bashrc ]; then . /etc/bashrc fi export JAVA_HOME=/usr/java/latest export PGDATABASE=chierudb export PGDATA=/home/postgres/chieru/data
21
ポイント
.bashrc ファイルがない場合は新規作成し、上記内容を入力・保存してください。 続けて下記のファイルを編集します。 $ vi ~/.bash_profile 下記内容を入力し、保存します。[ -f /etc/profile ] && source /etc/profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then . ~/.bashrc fi #PGDATA=/var/lib/pgsql/data <-- コメントアウト #export PGDATA <-- コメントアウト 6) ログオフ後、再度 postgres でログインを行い、環境変数の設定を反映させます。 $ exit # su postgres 7) データベースを構築します。(postgres ユーザで行います。) $ initdb --encoding=UTF-8 先ほどの環境変数「PGDATA」にデータベースが構築されます。 8) 設定ファイルでクライアント認証の設定を行います。 $ cd /home/postgres/chieru/data $ vi pg_hba.conf 下記のように1 行追記します。
# "local" is for Unix domain socket connections only
local all all trust # IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 0.0.0.0/0 trust <-- 追記 # IPv6 local connections:
host all all ::1/128 trust
続けてpostgresql.conf を編集します。下記設定内容と同じになるように編集します。
$ vi postgresql.conf
listen_addresses = 'localhost' → '*' に変更 Port = 5432
max_connections = 100 ※この値は CaLaboBridge からの接続数(connectionpool)に 応じて調整が必要です。
shared_buffers = 32M ※デフォルト値は小さいため RAM サイズに応じて調整します。 backslash_quote = safe_encoding → off に変更
escape_string_warning = on
standard_conforming_strings = off → on に変更
22
9) postgres ユーザをログオフ後、Firewall の設定をします。
$ exit
# firewall-cmd --permanent --zone=public --add-service=postgresql
# firewall-cmd --reload
10) 自動起動の設定をします。
# systemctl enable postgresql.service
11) PostgreSQL を起動します。
# systemctl start postgresql
Tomcat のセットアップ(OS バージョン 6.x の場合)
Tomcat のセットアップを行います。
Apache Tomcat のサイト(http://ftp.jaist.ac.jp/pub/apache/tomcat/tomcat-8/)より v8.0.x
からbin を選択後、アーカイブ・バイナリ・ファイルの最新版をダウンロードします。 (例:apache-tomcat-8.0.36.tar.gz) 1) ダウンロードしたファイルをサーバー上に展開・移動します。 # tar xvzf apache-tomcat-8.0.36.tar.gz # mv apache-tomcat-8.0.36 /usr/local # cd /usr/local 2) シンボリックリンクを作成します。(以後のバージョンアップを考慮しています。) # ln -s apache-tomcat-8.0.36 tomcat 3) リンクを確認します。 # ls -la /usr/local/tomcat 4) Tomcat ユーザを追加します。 # groupadd -g 1001 tomcat
# useradd -m -d /home/tomcat -u 1001 -g tomcat -s /bin/bash tomcat
5) Tomcat ユーザのパスワードを設定します。
※パスワードは2 回入力します。
# passwd tomcat tomcat
6) Tomcat ディレクトリの所有者を変更します。
# chown -R tomcat:tomcat /usr/local/tomcat
# chown -R tomcat:tomcat /usr/local/apache-tomcat-8.0.36
7) ルートディレクトリを変更します。
# vi /etc/passwd
23
ポイント
Tomcat ユーザの soft nofile と hard nofile を limits.conf に追記します。(P.9 参照)
8) Tomcat の起動シェルを作成します。
# vi /etc/init.d/tomcat
以下の内容を記述(コピー)して保存します。
#!/bin/sh #
# Startup script for Apache Tomcat 8.0 #
# chkconfig: 345 80 01
# description: Apache Tomcat Java Servlets and JSP server # processname: tomcat
# pidfile: /var/run/tomcat.pid
# config: /usr/local/tomcat/conf/server.xml # Source function library.
. /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network
CATALINA_HOME=/usr/local/tomcat
TOMCAT_SCRIPT=$CATALINA_HOME/bin/catalina.sh
TOMCAT_USER=tomcat [ -f $TOMCAT_SCRIPT ] || exit 0
# See how we were called. case "$1" in
start)
# Start daemons.
if [ -f /var/lock/subsys/tomcat ] ; then echo "Tomcat already started!" exit 1
fi
echo -n "Starting Tomcat: "
su -s /bin/bash - $TOMCAT_USER -c "$TOMCAT_SCRIPT start" RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/tomcat ;;
stop)
# Stop daemons.
if [ ! -f /var/lock/subsys/tomcat ] ; then echo "Tomcat already stopped!"
exit 1 fi
echo -n "Shutting down Tomcat: " $TOMCAT_SCRIPT stop
RETVAL=$? echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/tomcat ;;
status)
24 exit $? ;; restart) $0 stop $0 start ;; *)
echo "Usage: $TOMCAT_PROG {start|stop|status|restart}" exit 1 esac exit 0 9) シェルの実行権限を変更します。 # chmod 755 /etc/init.d/tomcat 10) 自動起動に追加します。
# chkconfig --add tomcat # chkconfig --list tomcat
tomcat 0:off 1:off 2:off 3:on 4:on 5:on 6:off
ポイント
■Tomcat 8.5 以上の場合 (例:tomcat8.5.16) # vi /usr/local/apache-tomcat-8.5.16/bin/catalina.sh で UMASK=”0027” を UMASK=”0022” に変更してください。Tomcat のセットアップ(OS バージョン 7.x の場合)
Tomcat のセットアップを行います。Apache Tomcat のサイト(http://ftp.jaist.ac.jp/pub/apache/tomcat/tomcat-8/)より v8.0.x
からbin を選択後、アーカイブ・バイナリ・ファイルの最新版をダウンロードします。 (例:apache-tomcat-8.0.36.tar.gz) 1) ダウンロードしたファイルをサーバー上に展開・移動します。 # tar xvzf apache-tomcat-8.0.36.tar.gz # mv apache-tomcat-8.0.36 /usr/local # cd /usr/local 2) シンボリックリンクを作成します。(以後のバージョンアップを考慮しています。) # ln -s apache-tomcat-8.0.36 tomcat 3) リンクを確認します。 # ls -la /usr/local/tomcat
25
4) Tomcat ユーザを追加します。
# groupadd -g 1001 tomcat
# useradd -m -d /home/tomcat -u 1001 -g tomcat -s /bin/bash tomcat
5) Tomcat ユーザのパスワードを設定します。
※パスワードは2 回入力します。
# passwd tomcat tomcat
6) Tomcat ディレクトリの所有者を変更します。
# chown -R tomcat:tomcat /usr/local/tomcat
# chown -R tomcat:tomcat /usr/local/apache-tomcat-8.0.36
7) ルートディレクトリを変更します。
# vi /etc/passwd
Tomcat:x:1001:1001::/home/tomcat:/bin/bash -> /usr/local/tomcat:/bin/bash
ポイント
Tomcat ユーザの soft nofile と hard nofile を limits.conf に追記します。(P.9 参照)
8) tomcat.service を新規作成します。 # touch /etc/systemd/system/tomcat.service # chmod 755 /etc/systemd/system/tomcat.service 9) tomcat.service を編集します。 # vi /etc/systemd/system/tomcat.service 以下の内容を記述(コピー)して保存します。 [PostgreSQL が起動するサーバー上の場合] [Unit] Description=Apache Tomcat 8
After=network.target postgresql.service # <- PostgreSQL の起動を優先します。
[Service] User=tomcat Group=tomcat Type=forking EnvironmentFile=/etc/sysconfig/tomcat PIDFile=/var/run/tomcat/tomcat.pid RemainAfterExit=yes ExecStart=/usr/local/tomcat/bin/startup.sh ExecStop=/usr/local/tomcat/bin/shutdown.sh [Install] WantedBy=multi-user.target [PostgreSQL が起動しないサーバー上の場合] [Unit] Description=Apache Tomcat 8
26 After=network.target [Service] User=tomcat Group=tomcat Type=forking EnvironmentFile=/etc/sysconfig/tomcat PIDFile=/var/run/tomcat/tomcat.pid RemainAfterExit=yes ExecStart=/usr/local/tomcat/bin/startup.sh ExecStop=/usr/local/tomcat/bin/shutdown.sh [Install] WantedBy=multi-user.target 10) /etc/sysconfig/tomcat を作成します。 # touch /etc/sysconfig/tomcat # chmod 644 /etc/sysconfig/tomcat 11) 自動起動の設定をします。
# systemctl enable tomcat.service
ポイント
■Tomcat 8.5 以上の場合 (例:tomcat8.5.16) # vi /usr/local/apache-tomcat-8.5.16/bin/catalina.sh で UMASK=”0027” を UMASK=”0022” に変更してください。Apache インストール(OS バージョン 6.x の場合)
Apache のインストールを行います。 1) 「EPEL」リポジトリが使用可能にします。 # rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8 .noarch.rpm 2) 「rpmbuild」コマンドを使用可能にします。# yum install rpm-build
# yum install autoconf libtool doxygen
3) APR1.5.1 をインストールします。
# cd /tmp
# wget http://archive.apache.org/dist/apr/apr-1.5.1.tar.bz2 # rpmbuild -tb --clean apr-1.5.1.tar.bz2
# cd /root/rpmbuild/RPMS/x86_64/
27
4) reetds-devel をインストールします。
# yum --enablerepo=epel install freetds-devel
5) APR-util1.5.4 をインストールします。
# yum install expat-devel libuuid-devel db4-devel postgresql-devel mysql-devel sqlite-devel unixODBC-devel openldap-devel nss-devel
# wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.bz2 # rpmbuild -tb --clean apr-util-1.5.4.tar.bz2
# rpm -ihv /root/rpmbuild/RPMS/x86_64/apr-util-*.rpm
6) distcache-devel をインストールします。
# wget
https://archive.fedoraproject.org/pub/archive/fedora/linux/releases/18/Fedora /source/SRPMS/d/distcache-1.4.5-23.src.rpm
# rpmbuild --rebuild --clean distcache-1.4.5-23.src.rpm # rpm -ihv /root/rpmbuild/RPMS/x86_64/distcache-*.rpm
7) mailcap をインストールします。
# yum install mailcap
8) Apache2.4.10 をインストールします。
# yum install pcre-devel libxml2-devel # rpm -ivh
https://rpmfind.net//linux/centos/6.9/os/x86_64/Packages/lua-devel-5.1.4-4 .1.el6.x86_64.rpm
# wget http://archive.apache.org/dist/httpd/httpd-2.4.10.tar.bz2 # rpmbuild -tb --clean httpd-2.4.10.tar.bz2
# rpm -ihv /root/rpmbuild/RPMS/x86_64/httpd-*.rpm /root/rpmbuild/RPMS/x86_64/mod_*.rpm
9) /etc/httpd/conf/httpd.conf を編集します。
# vi /etc/httpd/conf/httpd.conf
以下の記述を変更して保存します。
#LoadModule mpm_event_module lib64/httpd/modules/mod_mpm_event.so
↑コメントアウト
LoadModule mpm_prefork_module lib64/httpd/modules/mod_mpm_prefork.so
↑追加
10) SSL を有効にします。
# rpm -ihv /root/rpmbuild/RPMS/x86_64/mod_ssl-2.4.10-1.x86_64.rpm # vi /etc/httpd/conf/httpd.conf
以下記述のコメントアウトを解除します
LoadModule ssl_module lib64/httpd/modules/mod_ssl.so Include /etc/httpd/conf/extra/httpd-ssl.conf
28
Apache のインストール(OS バージョン 7.x の場合)
Apache のインストールを行います。 1) yum を利用しを apache のセットアップを行います。SSL 通信を利用する場合は、あわ せてmod_ssl をセットアップします。 # yum install httpd # yum install mod_ssl2) /usr/lib/systemd/system/httpd.service の編集を行います。
# vi /usr/lib/systemd/system/httpd.service [Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target Documentation=man:httpd(8)
Documentation=man:apachectl(8) [Service]
Type=notify
EnvironmentFile=/etc/sysconfig/httpd
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND ExecReload=/usr/sbin/httpd $OPTIONS -k graceful ExecStop=/bin/kill -WINCH ${MAINPID}
KillSignal=SIGCONT PrivateTmp=true [Install] WantedBy=multi-user.target httpd.service をコピーします。 # cp /usr/lib/systemd/system/httpd.service /etc/systemd/system 3) httpd.conf を編集します。下記設定内容と同じになるように編集します # vi /etc/httpd/conf/httpd.conf
User daemon -> User apache に変更。 Group daemon ->Group apache に変更。 ServerName localhost:80->環境に合わせ設定。
4) 自動起動設定を行います。
# systemctl enable httpd.service
5) Firewall の設定を行います。
# firewall-cmd --permanent --zone=public --add-service=http # firewall-cmd --reload
29
6) 下記のファイルを編集します。
# vi /etc/httpd/conf.modules.d/00-mpm.conf
下記の行頭#がある場合は、削除し有効化します。
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so 下記の行頭に#が無い場合は、付与し無効化します。
LoadModule mpm_worker_module modules/mod_mpm_worker.so LoadModule mpm_event_module modules/mod_mpm_event.so
7) 下記のファイルを編集します。
# vi /etc/httpd/conf.modules.d/00-proxy.conf
下記の行頭#がある場合は、削除し有効化します。 LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so LoadModule proxy_connect_module modules/mod_proxy_connect.so
8) 下記のファイルを編集します。
# vi /etc/httpd/conf.modules.d/00-base.conf
下記の行頭#がある場合は、削除し有効化します。 LoadModule cache_module modules/mod_cache.so
LoadModule cache_disk_module modules/mod_cache_disk.so LoadModule suexec_module modules/mod_suexec.so
LoadModule rewrite_module modules/mod_rewrite.so LoadModule include_module modules/mod_include.so LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so
9) SSL を利用する場合、下記のファイルを編集します。
# vi /etc/httpd/conf.modules.d/00-ssl.conf
下記の行頭#がある場合は、削除し有効化します。 LoadModule ssl_module modules/mod_ssl.so
自動起動の設定(
OS バージョン 6.x の場合)
必要なサービスの自動起動設定を行います。確認
# chkconfig --list smb
smb 0:off 1:off 2:on 3:on 4:on 5:on 6:off
設定
30 確認
# chkconfig --list postgresql
postgresql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
設定
# chkconfig postgresql on
確認
# chkconfig --list tomcat
tomcat 0:off 1:off 2:on 3:on 4:on 5:on 6:off
設定 # chkconfig tomcat on
自動起動の設定(
OS バージョン 7.x の場合)
必要なサービスの自動起動設定を行います。 確認 # systemctl is-enabled smb disabled 設定# systemctl enable smb.service
確認
# systemctl is-enabled postgresql enabled
設定
# systemctl enable postgresql.service
確認
# systemctl is-enabled tomcat enabled
設定
# systemctl enable tomcat.service
確認
# systemctl is-enabled httpd enabled
設定
# systemctl enable httpd.service
GNUStep のインストール
VOD の動作に必要な GNUStep のインストールを行います。
1) GNUStep のインストールに必要なパッケージを yum でインストールします。
# yum install make \ gcc-objc \
31 libtiff-devel \ libjpeg \ libjpeg-devel \ libpng \ libpng-devel \ libXt \ libXt-devel \ libX11 \ libX11-devel \ libxml2 \ libxml2-devel \ libxslt \ libxslt-devel \ gnutls \ gnutls-devel \ cairo \ cairo-devel \ libobjc \ xorg-x11-proto-devel \ xorg-x11-drv-ati-firmware \ libXext-devel \ libicu \ libicu-devel
ポイント
CentOS 7.x ではさらに以下の 2 つのパッケージが必要になります。# yum install libffi # yum install libffi-devel
2) GNUStep Project のサイトより GNUStep Startup Package(gnustep-startup-0.32.0.tar.gz)
を入手します。 # wget http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-startup-0. 32.0.tar.gz 3) 展開・インストールを行います。 # tar zxvf gnustep-startup-0.32.0.tar.gz # cd gnustep-startup-0.32.0 # ./InstallGNUstep
ポイント
Error が発生しインストールが中断された場合は、error 内容より必要なパッケージを確 認・インストールを行ってください。 4) 環境変数の設定を行います。(ルートユーザで行います。) # vi ~/.bashrc 下記内容を追記し、保存します。 # VOD source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh 5) 再度 root でログインを行い、環境変数の設定を反映させます。32 6) リンクを確認します。 #ls –la /usr/lib64/libobjc.so.2
PHP インストール(OS バージョン 6.x の場合)
VOD の動作に必要な PHP のインストールを行います。 1) PHP のインストールに必要なパッケージをインストールします。# yum install libcurl-devel # yum install postfix # yum install libacl-devel
# yum install libjpeg-turbo-devel
# yum --enablerepo=epel install firebird-devel # yum --enablerepo=epel install libmcrypt-devel
# yum install bzip2-devel pam-devel libstdc++-devel gcc-c++ libtool-ltdl-devel systemtap-sdt-devel net-snmp-devel
libxslt-devel libpng-devel freetype-devel libXpm-devel gmp-devel # # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/ncurses-devel-5.7-4.2 0090207.el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/libedit-devel-2.11-4. 20080712cvs.1.el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/libc-client-2007e-11. el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/libc-client-devel-200 7e-11.el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/t1lib-5.1.2-6.el6_2.1 .x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/t1lib-devel-5.1.2-6.e l6_2.1.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/libvpx-1.3.0-5.el6_5. x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/libvpx-devel-1.3.0-5. el6_5.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/tokyocabinet-1.4.33-6 .el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/tokyocabinet-devel-1. 4.33-6.el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/libtidy-0.99.0-19.200 70615.1.el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/libtidy-devel-0.99.0-19.20070615.1.el6.x86_64.rpm
33 # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/aspell-0.60.6-12.el6. x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/aspell-devel-0.60.6-1 2.el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/recode-3.6-28.1.el6.x 86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/recode-devel-3.6-28.1 .el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/libicu-devel-4.2.1-14 .el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/hunspell-1.2.8-16.el6 .x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/enchant-1.5.0-5.el6.x 86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/glib2-devel-2.28.8-9. el6.x86_64.rpm # rpm -ivh https://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/enchant-devel-1.5.0-5 .el6.x86_64.rpm 2) PHP5.6.4 の RPM 作成します。 # wget https://dl.iuscommunity.org/pub/ius/archive/CentOS/6/SRPMS/php56u-5.6.4-1.ius .centos6.src.rpm
# rpmbuild --rebuild --clean php56u-5.6.4-1.ius.centos6.src.rpm # cd /root/rpmbuild/SPECS/
ポイント
ビルドした際に以下の記述が表示されますが、ここでは無視してインストールを進め ます。 ユーザ mockbuild は存在しません - root を使用します グループ mockbuild は存在しません - root を使用します /var/tmp/rpm-tmp.4YSDXV の不正な終了ステータス (%build)# 3) vi php56u.spec のファイル内容を編集します。 # vi php56u.spec 以下内容を変更して、保存します。#/usr/sbin/apsx with httpd < 2.4 and defined as /usr/bin/apxs with httpd >= 2.4 %{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
↓
34
4) 設定内容をビルドします。
# rpmbuild -bb --clean php56u.spec # cd /root/rpmbuild/RPMS/x86_64
# rpm -ivh --nodeps php56u-cli-5.6.4-1.ius.el6.x86_64.rpm php56u-xml-5.6.4-1.ius.el6.x86_64.rpm php56u-common-5.6.4-1.ius.el6.x86_64.rpm php56u-process-5.6.4-1.ius.el6.x86_64.rpm php56u-devel-5.6.4-1.ius.el6.x86_64.rpm 5) PHP5.6.4 をインストールします。 # rpm -ihv php56u-5.6.4-1.ius.el6.x86_64.rpm 6) その他利用するパッケージの導入します。 # rpm -Uvh php56u-mbstring-5.6.4-1.ius.el6.x86_64.rpm php56u-pgsql-5.6.4-1.ius.el6.x86_64.rpm php56u-pdo-5.6.4-1.ius.el6.x86_64.rpm 7) Apache の設定ファイルを編集します。 # vi /etc/httpd/conf.d/10-php.conf
#LoadModule php5_module modules/libphp5.so <- コメントアウト
LoadModule php5_module lib64/httpd/modules/libphp5.so <- 追記
#LoadModule php5_module modules/libphp5-zts.so <- コメントアウト
LoadModule php5_module lib64/httpd/modules/libphp5-zts.so <- 追記
8) /etc/httpd/conf/httpd.conf を編集します。
# vi /etc/httpd/conf/httpd.conf
下記内容を追記し、保存します。
User daemon -> User apache Group daemon -> Group apache
ServerName www.example.com:80 <- 環境に合わせて設定 Include /etc/httpd/conf.d/*.conf <- 一番下に記述追加 9) 以下サービスの自動起動を設定します。 # /sbin/chkconfig httpd on 10) 以下サービスを起動します。 # /etc/init.d/httpd start
PHP のインストール(OS バージョン 7.x の場合)
VOD の動作に必要な PHP のインストールを行います。 1) Webtatic EL にリポジトリ情報を追加します。 # rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.no arch.rpm # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm35
2) PHP 5.6 の mod_phpSAPI をインストールします。
# yum install php56w php56w-opcache
3) PHP のインストールに必要なパッケージを yum でインストールします。 # yum install \ php56w \ php56w-cli \ php56w-common \ php56w-devel \ php56w-enchant \ php56w-fpm \ php56w-gd \ php56w-intl \ php56w-ldap \ php56w-mbstring \ php56w-mcrypt \ php56w-mysqlnd \ php56w-opcache \ php56w-pdo \ php56w-pear \ php56w-pecl-xdebug \ php56w-pgsql \ php56w-phpdbg \ php56w-process \ php56w-soap \ php56w-tidy \ php56w-xml \ php56w-xmlrpc \ httpd-devel 4) 下記のファイルを確認します。 # vi /etc/httpd/conf.d/php.conf 以下の設定が記載されていない場合は末尾に記入します。 <IfModule prefork.c>
LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so </IfModule>
<FilesMatch ¥.php$>
SetHandler application/x-httpd-php </FilesMatch>
36
MediaInfo のインストール(OS バージョン 6.x の場合)
HTML5 の動作に必要な MediaInfo のインストールを行います。 1) 下記 URL から OS に合わせて 3 つライブラリをダウンロードします。(※本マニュアル ではCentOS6.5 を例に記載いたします。) http://mediainfo.sourceforge.net/ja/Download/CentOS 2) ダウンロードした rpm ファイルをサーバ内に格納後、インストールを行います。 ※下記rpm ファイル名はダウンロードするモジュールにより異なります。 ※インストール時にWarning が表示される事がありますが動作には支障ありません。 # rpm -i libzen-0.4.33.x86_64.CentOS_6.rpm # rpm -i libmediainfo-0.7.87.x86_64.CentOS_6.rpm # rpm -i mediainfo-0.7.87.x86_64.CentOS_6.rpm 3) インストール後、バージョンの確認をします。# mediainfo /et --version MediaInfo Commnd line MediaInfoLib - v0.7.87
MediaInfo のインストール(OS バージョン 7.x の場合)
HTML5 の動作に必要な MediaInfo のインストールを行います。 1) rpm ファイルのインストールを行います。 ※下記rpm ファイル名はダウンロードするモジュールにより異なります。 ※インストール時にWarning が表示される事がありますが動作には支障ありません。37 #rpm -Uvh https://mediaarea.net/download/binary/libzen0/0.4.37/libzen-0. 4.37.x86_64.CentOS_7.rpm # rpm -Uvh https://mediaarea.net/download/binary/libmediainfo0/0.7.98/lib mediainfo-0.7.98.x86_64.CentOS_7.rpm # rpm -Uvh https://mediaarea.net/download/binary/mediainfo/0.7.98/mediain fo-0.7.98.x86_64.CentOS_7.rpm 2) インストール後、バージョンの確認をします。 # mediainfo --version MediaInfo Command line, MediaInfoLib - v0.7.98
ffmpeg のインストール(Cent OS の場合)
HTML5 の動作に必要な ffmpeg のインストールを行います。 インストールを行う作業ディレクトリを /tmp で行うことを前提にして記載します。 1) ffmpeg のインストールに必要なパッケージを yum でインストールします。 # cd /tmp# yum -y install automake gcc-c++ git libtool nasm pkgconfig zlib-devel glibc-static 2) ライブラリのリンクパス設定します。 # vi /etc/ld.so.conf 以下を追記します。 /usr/local/lib 追記後、以下のコマンドを実行して設定を反映します。 # ldconfig 3) ffmpeg の起動に必要な Yasm をコンパイルし、インストールします。
# git clone --depth 1 git://github.com/yasm/yasm.git # cd yasm # autoreconf -fiv # ./configure --prefix="/usr/local" # make # make install # cd /tmp 4) ffmpeg の起動に必要な libspeex をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/speex/speex-1.2rc2.tar.gz # tar zxf speex-1.2rc2.tar.gz # cd speex-1.2rc2
# ./configure --prefix="/usr/local" --enable-static --disable-shared
38 # make # make install # cd /tmp 5) ffmpeg の起動に必要な lame をコンパイルし、インストールします。 # wget http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99 .5.tar.gz # tar zxf lame-3.99.5.tar.gz # cd lame-3.99.5
# ./configure --prefix="/usr/local" --enable-static --disable-shared
# make
# make install # cd /tmp
6) ffmpeg の起動に必要な x264 をコンパイルし、インストールします。
# yum install git
# git clone git://git.videolan.org/x264 # cd x264
# git checkout 09705c0
# ./configure --prefix="/usr/local" --enable-static --disable-asm
# make
# make install # cd /tmp
7) ffmpeg の起動に必要な fdk-aac をコンパイルし、インストールします。
# git clone --depth 1
git://git.code.sf.net/p/opencore-amr/fdk-aac # cd fdk-aac
# autoreconf -fiv
# ./configure --prefix="/usr/local" --enable-static --disable-shared
# make
# make install # cd /tmp
8) ffmpeg の起動に必要な amrnb をコンパイルし、インストールします。
# yum install bzip2 # yum install unzip # yum install patch # wget
http://www.penguin.cz/~utx/ftp/amr/amrnb-11.0.0.0.tar.bz2 # tar jxf amrnb-11.0.0.0.tar.bz2
# cd amrnb-11.0.0.0
# ./configure --prefix="/usr/local" --enable-static --disable-shared # make # make install # cd /usr/local/include # ln -s amrnb opencore-amrnb # cd /usr/local/lib # ln -s libamrnb.a libopencore-amrnb.a
39 # ln -s libamrnb.la libopencore-amrnb.la # cd /tmp 9) ffmpeg の起動に必要な amrwb をコンパイルし、インストールします。 # wget http://www.penguin.cz/~utx/ftp/amr/amrwb-11.0.0.0.tar.bz2 # tar jxf amrwb-11.0.0.0.tar.bz2 # cd amrwb-11.0.0.0
# ./configure --prefix="/usr/local" --enable-static --disable-shared # make # make install # cd /usr/local/include # ln -s amrwb opencore-amrwb # cd /usr/local/lib # ln -s libamrwb.a libopencore-amrwb.a # ln -s libamrwb.la libopencore-amrwb.la # cd /tmp 10) ffmpeg の起動に必要な opus をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz # tar zxf opus-1.1.tar.gz # cd opus-1.1
# ./configure --prefix="/usr/local" --enable-static --disable-shared # make # make install # cd /tmp 11) ffmpeg の起動に必要な libogg をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz # tar xvfz libogg-1.3.2.tar.gz # cd libogg-1.3.2
# ./configure --prefix="/usr/local" --enable-static # make # make install # ldconfig # cd /tmp 12) ffmpeg の起動に必要な libtheora をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar. bz2 # tar jxf libtheora-1.1.1.tar.bz2 # cd libtheora-1.1.1
# ./configure --prefix="/usr/local" --enable-static --disable-shared
# make
# make install # cd /tmp
40 13) ffmpeg の起動に必要な vo-aacenc をコンパイルし、インストールします。 # wget -O vo-aacenc-0.1.3.tar.gz http://downloads.sourceforge.net/project/opencore-amr/vo-aacen c/vo-aacenc-0.1.3.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fproj ects%2Fopencore-amr%2Ffiles%2Fvo-aacenc%2F&ts=1427971386&use_m irror=heanet # tar zxf vo-aacenc-0.1.3.tar.gz # cd vo-aacenc-0.1.3
# ./configure --prefix="/usr/local" --enable-static --disable-shared # make # make install # ldconfig # cd /tmp 14) ffmpeg の起動に必要な vo-amrwbenc をコンパイルし、インストールします。 # wget http://downloads.sourceforge.net/project/opencore-amr/vo-amrwb enc/vo-amrwbenc-0.1.3.tar.gz # tar zxf vo-amrwbenc-0.1.3.tar.gz # cd vo-amrwbenc-0.1.3
# ./configure --prefix="/usr/local" --enable-static --disable-shared # make # make install # ldconfig # cd /tmp 15) ffmpeg の起動に必要な libvorbis をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar. gz # tar xvfz libvorbis-1.3.5.tar.gz # cd libvorbis-1.3.5
# ./configure --prefix="/usr/local" --enable-static --disable-shared # make # make install # cd /tmp 16) ffmpeg の起動に必要な libvpx をコンパイルし、インストールします。 【OS バージョン 6.x の場合】
# yum -y install doxygen # wget
https://github.com/webmproject/libvpx/archive/v1.4.0.tar.gz # tar zxf v1.4.0.tar.gz
# cd libvpx-1.4.0/
#./configure --prefix="/usr/local" --disable-shared --enable-static
# make
# make install # cd /tmp #
41 【OS バージョン 7.x の場合】
# git clone --branch=v1.4.0 --depth 1
https://chromium.googlesource.com/webm/libvpx.git # cd libvpx
# ./configure --prefix="/usr/local" --enable-static --disable-shared # make # make install # cd /tmp 17) ffmpeg をインストールします。 # ldconfig # wget http://ffmpeg.org/releases/ffmpeg-2.6.1.tar.bz2 # tar jxf ffmpeg-2.6.1.tar.bz2 # cd ffmpeg-2.6.1 # export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" # ./configure \ --prefix="/usr/local" \
--extra-cflags="-I/usr/include -I/usr/local/include --static" \
--extra-ldflags="-L/usr/local/lib" \
--extra-libs="-static -L/usr/lib -L/lib -L/lib64 -L/usr/lib64 -L/usr/local/lib -L/usr/local/lib64" \ --enable-static \ --enable-gpl \ --enable-version3 \ --enable-runtime-cpudetect \ --enable-libmp3lame \ --enable-libx264 \ --enable-libspeex \ --enable-libvorbis \ --enable-libvpx \ --enable-libopencore-amrnb \ --enable-libopencore-amrwb \ --enable-libvo-aacenc \ --enable-libvo-amrwbenc \ --enable-libtheora \ --enable-libopus \ --enable-zlib \ --disable-shared \ --disable-debug \ --disable-doc \ --disable-network \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserver # make # make install
42
18) ffmpeg の動作を確認します。
# ffmpeg
ffmpeg version 2.6.1 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4) configuration: --prefix=/usr/local
--extra-cflags='-I/usr/include -I/usr/local/include --static' --extra-ldflags=-L/usr/local/lib --extra-libs='-static
-L/usr/lib -L/lib -L/lib64 -L/usr/lib64 -L/usr/local/lib -L/usr/local/lib64' --enable-static --enable-gpl
--enable-version3 --enable-runtime-cpudetect
--enable-libmp3lame --enable-libx264 --enable-libspeex
--enable-libvorbis --enable-libvpx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libtheora --enable-libopus --enable-zlib --disable-shared --disable-debug --disable-doc --disable-network --disable-ffplay --disable-ffprobe
--disable-ffserver libavutil 54. 20.100 / 54. 20.100 libavcodec 56. 26.100 / 56. 26.100 libavformat 56. 25.101 / 56. 25.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 11.102 / 5. 11.102 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
ffmpeg のインストール(RedHat OS の場合)
HTML5 の動作に必要な ffmpeg のインストールを行います。
インストールを行う作業ディレクトリを /tmp で行うことを前提にして記載します。
1) ffmpeg のインストールに必要なパッケージを yum でインストールします。
# cd /tmp
# yum install -y automake gcc-c++ git libtool nasm pkgconfig zlib-devel 2) ライブラリのリンクパス設定します。 # vi /etc/ld.so.conf 以下を追記します。 /usr/local/lib 追記後、以下のコマンドを実行して設定を反映します。 # ldconfig
43
3) ffmpeg の起動に必要な Yasm をコンパイルし、インストールします。
# git clone https://github.com/yasm/yasm.git # cd yasm # ./autogen.sh # ./configure # make # make install # cd /tmp 4) ffmpeg の起動に必要な libspeex をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/speex/speex-1.2.0.tar.gz # tar axvf speex-1.2.0.tar.gz
# cd speex-1.2.0 # ./configure \ --enable-static \ --disable-shared # make # make install # cd /tmp 5) ffmpeg の起動に必要な lame をコンパイルし、インストールします。 # curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3 .99.5.tar.gz
# tar axvf lame-3.99.5.tar.gz # cd lame-3.99.5 # ./configure \ --enable-static \ --disable-shared # make # make install # cd /tmp 6) ffmpeg の起動に必要な x264 をコンパイルし、インストールします。
# yum install git
# git clone git://git.videolan.org/x264 # cd x264 # git checkout 09705c0 # ./configure \ --disable-asm \ --enable-static \ --disable-opencl # make # make install # cd /tmp 7) autoconf をインストールします。 # wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz # tar xvfz autoconf-2.69.tar.gz # cd autoconf-2.69 # ./configure --prefix=/usr # make
44 # make install # cd /tmp 8) ffmpeg の起動に必要な autmake をコンパイルし、インストールします。 # wget http://archive.ubuntu.com/ubuntu/pool/main/a/automake-1.14/aut omake-1.14_1.14.1.orig.tar.xz
# tar axvf automake-1.14_1.14.1.orig.tar.xz # cd automake-1.14.1 # ./configure # make # make install # cd /tmp 9) ffmpeg の起動に必要な fdk-aac をコンパイルし、インストールします。
# git clone https://github.com/Distrotech/fdk-aac.git # cd fdk-aac # ./configure \ --enable-static \ --disable-shared # make # make install # cd /tmp 10) ffmpeg の起動に必要な amrnb をコンパイルし、インストールします。
# yum install bzip2 # yum install unzip # yum install patch # wget
http://ftp.penguin.cz/pub/users/utx/amr/amrnb-11.0.0.0.tar.bz2 # tar axvf amrnb-11.0.0.0.tar.bz2
# cd amrnb-11.0.0.0 # ./configure \ --enable-static \ --disable-shared # make # make install # cd /usr/local/include # ln -s amrnb opencore-amrnb # cd /usr/local/lib # ln -s libamrnb.a libopencore-amrnb.a # ln -s libamrnb.la libopencore-amrnb.la # cd /tmp 11) ffmpeg の起動に必要な amrwb をコンパイルし、インストールします。 # wget http://ftp.penguin.cz/pub/users/utx/amr/amrwb-11.0.0.0.tar.bz2 # tar axvf amrwb-11.0.0.0.tar.bz2
# cd amrwb-11.0.0.0 # ./configure \ --enable-static \ --disable-shared # make # make install
45 # cd /usr/local/include # ln -s amrwb opencore-amrwb # cd /usr/local/lib # ln -s libamrwb.a libopencore-amrwb.a # ln -s libamrwb.la libopencore-amrwb.la # cd /tmp 12) ffmpeg の起動に必要な opus をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/opus/opus-1.1.4.tar.gz # tar axvf opus-1.1.4.tar.gz
# cd opus-1.1.4 # ./configure \ --enable-static \ --disable-shared # make # make install # cd /tmp 13) ffmpeg の起動に必要な libogg をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz # tar axvf libogg-1.3.2.tar.gz
# cd libogg-1.3.2 # ./configure \ --enable-static # make # make install # ldconfig # cd /tmp 14) ffmpeg の起動に必要な libtheora をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar. bz2
# tar axvf libtheora-1.1.1.tar.bz2 # cd libtheora-1.1.1 # PKG_CONFIG_PATH=/usr/local/lib/pkgconfig # ./configure \ --enable-static \ --disable-shared \ -with-ogg=/usr/local # make # make install # cd /tmp 15) ffmpeg の起動に必要な vo-amrwbenc をコンパイルし、インストールします。 # wget https://downloads.sourceforge.net/project/opencore-amr/opencor e-amr/opencore-amr-0.1.4.tar.gz
# tar axvf opencore-amr-0.1.4.tar.gz # cd opencore-amr-0.1.4
# ./configure \ --enable-static \
46 --disable-shared # make # make install # ldconfig # cd /tmp
ポイント
・wget にてファイルを取得できない場合、ファイル名やバージョンの変更により、 ファイルを取得できないことがございます。ファイルを取得できない場合はサイト (https://sourceforge.net/projects/opencore-amr/)より、最新版をダウンロードいた だき、サーバー上に展開してください。 ※ファイル名 (例)vo-amrwbenc-0.1.x.tar.gz opencore-amr-0.1.x.tar.gz ・ffmpeg インストール時に「ERROR: libvo_amrwbenc not found」と表示される場合は以下の方法でvo-amrwbenc をコンパイルしてください。
# cd /tmp # wget
https://downloads.sourceforge.net/project/opencore-amr/vo-amrwbenc/vo-amrwbenc-0.1.3.tar.gz
# tar axvf vo-amrwbenc-0.1.3.tar.gz # cd vo-amrwbenc-0.1.3 # ./configure ¥ --enable-static ¥ --disable-shared # make # make install # ldconfig # cd /tmp 16) ffmpeg の起動に必要な libvorbis をコンパイルし、インストールします。 # wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar. gz
# tar axvf libvorbis-1.3.5.tar.gz # cd libvorbis-1.3.5 # ./configure --prefix="/usr/local" \ --enable-static \ --disable-shared # make # make install # cd /tmp 17) ffmpeg の起動に必要な libvpx をコンパイルし、インストールします。 【OS バージョン 6.x の場合】 # wget https://github.com/webmproject/libvpx/archive/v1.4.0.tar.gz # tar zxf v1.4.0.tar.gz # cd libvpx-1.4.0/
47
#./configure --prefix="/usr/local" --disable-shared --enable-static # make # make install # cd /tmp # 【OS バージョン 7.x の場合】
# git clone https://github.com/webmproject/libvpx.git # cd libvpx # ./configure --prefix="/usr/local" \ --enable-static \ --disable-shared # export PATH=/usr/local/bin:$PATH # make # make install # cd /tmp 18) ffmpeg をインストールします。 # ldconfig # wget http://ffmpeg.org/releases/ffmpeg-3.2.2.tar.bz2 # tar axvf ffmpeg-3.2.2.tar.bz2
# cd ffmpeg-3.2.2
# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig # ./configure --prefix="/usr/local" \
--extra-cflags="-I/usr/include -I/usr/local/include --static" \ --extra-ldflags="-L/usr/local/lib" \ --enable-static \ --enable-gpl \ --enable-version3 \ --enable-runtime-cpudetect \ --enable-libmp3lame \ --enable-libx264 \ --enable-libspeex \ --enable-libvorbis \ --enable-libvpx \ --enable-libopencore-amrnb \ --enable-libopencore-amrwb \ --enable-libvo-amrwbenc \ --enable-libtheora \ --enable-libopus \ --enable-zlib \ --disable-shared \ --disable-debug \ --disable-doc \ --disable-network \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserver # make # make install
48
19) ffmpeg の動作を確認します。
# ffmpeg
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16) configuration: --prefix=/usr/local
--extra-cflags='-I/usr/include -I/usr/local/include --static' --extra-ldflags=-L/usr/local/lib --enable-static --enable-gpl --enable-version3 --enable-runtime-cpudetect
--enable-libmp3lame --enable-libx264 --enable-libspeex
--enable-libvorbis --enable-libvpx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc
--enable-libtheora --enable-libopus --enable-zlib --disable-shared --disable-debug --disable-doc --disable-network --disable-ffplay --disable-ffprobe --disable-ffserver libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
samba の設定
CaLabo Bridge サーバにある CaLabo Bridge e-Learning 管理ツールのインストーラへのアク セスや、CaLabo Bridge e-Learnig 管理ツールで「オプション教材移行」を利用するために、 共有フォルダへのアクセス設定を行います。 1) Samba の設定ファイルを編集します。 # vi /etc/samba/smb.conf 2) [global]セクション内を以下の内容に修正します。 [OS のバージョンが 6.x の場合] security = user
guest account = nobody map to guest = Bad User
※記載がない場合、追記します。 [OS のバージョンが 7.x の場合]
workgroup = WORKGROUP security = user
49
map to guest = Bad User passdb backend = tdbsam unix charset = UTF-8 dos charset = CP932 ※記載がない場合、追記します。
ポイント
[global]セクションの設定はアクセス権や認証方法も含め、お客様の環境に合わせて設 定してください。(上記はあくまで一例です) 3) Samba 起動と自動起動設定を行います。 [OS のバージョンが 6.x の場合] # /etc/rc.d/init.d/smb start # /etc/rc.d/init.d/nmb start # chkconfig smb on # chkconfig nmb on [OS のバージョンが 7.x の場合] # systemctl start smb nmb # systemctl enable smb nmbLinux 側で samba の通信が行えるよう、firewall の設定を変更します。
# firewall-cmd --permanent --zone=public --add-service=samba # firewall-cmd --reload
fuser のセットアップ
1) fuser は最小構成では入らないので、その場合 yum を利用しセットアップします。
# yum install psmisc
Perl のセットアップ
1) perl は最小構成では入らないので、その場合 yum を利用しセットアップします。
# yum install perl
その他ライブラリのセットアップ
1) CaLabo Bridge の動作に必要なライブラリを yum を利用しセットアップします。
# yum install glibc.i686 nspr gtk2 gtk2.i686 alsa-lib alsa-lib.i686