動画配信プラットフォームKalturaを使ってみる2
实际上,Kaltura也以开源软件的形式提供。您可以在https://github.com/kaltura找到相关信息。
Non-SSL Step-by-step Installation の手順に従ってインストールです
こちらの方のブログがの方が参考になるのでリンクもはっておきます
1.仮想環境にCentOS準備
今次我们将使用vegrant
从官方网站上下载
将IP地址设置为【192.168.3.3】
vagrant box add centos64 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20131103.box
mkdir -p ~/Vagrant/CentOS64
cd ~/Vagrant/CentOS64
vagrant init centos64
vi Vagrantfile
config.vm.network "private_network", ip: "192.168.3.3"
vagrant reload
2.准备在操作系统下工作
将IPTables和SELinux的配置设置为关闭。
halt -p now
iptables -F
service iptables stop
chkconfig iptables off
vi /etc/selinux/config
设定Kaltura存储库。
rpm -ihv
http://installrepo.kaltura.org/releases/kaltura-release.noarch.rpm
4. 启动MySQL、Postfix、Memcache和NTP
yum clean all
yum install mysql mysql-server
service postfix restart
service memcached restart
service ntpd restart
chkconfig memcached on
chkconfig ntpd on
5.MySQLにrootのユーザーパスワードを設定
CREATE USER 'root'@'%' IDENTIFIED BY 'root';
6.Kaltura-Serverを入れる
yum install kaltura-server
/opt/kaltura/bin/kaltura-mysql-settings.sh
进行Kaltura的设置。
将以下内容以中文进行简述:/opt/kaltura/bin/kaltura-config-all.sh
[Email\NO]:muromari0807@gmail.com
Registering for the newsletter... this will take a few seconds.
In order to finalize the system configuration, please input the following:
CDN hostname [localhost.localdomain]:
192.168.3.3
Apache virtual hostname [localhost.localdomain]
(Must be accessible from both inside the machine and from any clients / browsers that will use Kaltura):
192.168.3.3
Vhost port to listen on [80]: 80
range of ip addresses belonging to internal kaltura servers [0.0.0.0-255.255.255.255]:
The range is used when checking service actions permissions and allowing to access certain services without KS from the internal servers.
The default is only good for testing, on a production ENV you should adjust according to your network.
DB port [3306]: 3306
MySQL super user [only for install, default root]: root
Analytics DB hostname [127.0.0.1]:127.0.0.1
Analytics DB port [3306]:3306
Sphinx hostname [127.0.0.1]: 127.0.0.1
Secondary Sphinx hostname [leave empty if none]:
VOD packager hostname [localhost.localdomain]: localhost
VOD packager port to listen on [88]: 88
Admin user login password (must be minimum 8 chars and include at least one of each: upper-case, lower-case, number and a special character):
Confirm passwd:
Your time zone [see http://php.net/date.timezone], or press enter for [UTC]: UTC
Your Kaltura install name (this name will show as the From field in emails sent by the system) [Kaltura Video Platform]:
Your website Contact Us URL [http://corp.kaltura.com/company/contact-us]:
Your 'Contact us' phone number [+1 800 871 5224]:
========================================================================================================================
Kaltura install answer file written to /tmp/kaltura_11_10_04_14.ans - Please save it!
This answers file can be used to silently-install re-install this machine or deploy other hosts in your cluster.
========================================================================================================================
Configuration of 10.19.0 finished successfully!
Running FrontEnd config...
base-config completed successfully, if you ever want to re-configure your system (e.g. change DB hostname) run the following script:
# rm /opt/kaltura/app/base-config.lock
# /opt/kaltura/bin/kaltura-base-config.sh
kaltura-front-10.19.0-1.noarch
It is recommended that you do work using HTTPs. Would you like to continue anyway?[N/y]
Exiting.
Archving logs to /opt/kaltura/log/log_11_10_15_04_14.tar.gz...
[
进行数据库的设置
因为我的情况下,数据库的根密码设置不正确,导致安装在中途停止了。所以,我手动进行了数据库安装。
スクリプト変更
show tablesだと止まるのでとりあえずshow databasesに変更。(DB名を指定するように変更なのかな?)
./kaltura-functions.rc
echo "show databases;" | mysql -h$SPHINX_SERVER -u$DB_USER -p$DB_PASSWD -P3306
cd /opt/kaltura/bin
sh kaltura-db-config.sh localhost root root 3306 upgrade
calling upgrade script instead.
Checking MySQL version..
Ver 5.1.73 found compatible
The kaltura DB seems to already be installed.
if you meant to perform an upgrade? run with:
# kaltura-db-config.sh localhost root root 3306 upgrade
Otherwise, do you wish to remove the existing DB [n/Y]?
Y
This will drop the following DBs:
kaltura kaltura_sphinx_log kalturadw kalturadw_ds kalturadw_bisources kalturalog
and remove users:
kaltura etl
on 127.0.0.1
NOTE: this is not reversible.
It is recommended you also back up the current data using mysqldump before continuing.
You can use /opt/kaltura/bin/kaltura-export-db.sh to export the data.
Are you absolutely certain you want this? [n/Y]
Y
root DB passwd:
Removing kaltura
Removing kaltura_sphinx_log
Removing kalturadw
Removing kalturadw_ds
Removing kalturadw_bisources
Removing kalturalog
kaltura
CREATE DATABASE kaltura;
kaltura_sphinx_log
CREATE DATABASE kaltura_sphinx_log;
kalturadw
CREATE DATABASE kalturadw;
kalturadw_ds
CREATE DATABASE kalturadw_ds;
kalturadw_bisources
CREATE DATABASE kalturadw_bisources;
kalturalog
CREATE DATABASE kalturalog;
Checking connectivity to needed daemons...
sphinxxxx 127.0.0.1 http://192.168.3.3
show tables;
mysql -h127.0.0.1 -ukaltura -pko00MuhHeYhD9RO -P3306
Connectivity test passed:)
Cleaning cache..
Populating DB with data.. please wait..
Output for /opt/kaltura/app/deployment/base/scripts/installPlugins.php being logged into /opt/kaltura/log/installPlugins.log
Output for /opt/kaltura/app/deployment/base/scripts/insertDefaults.php being logged into /opt/kaltura/log/insertDefaults.log
Output for /opt/kaltura/app/deployment/base/scripts/insertPermissions.php being logged into /opt/kaltura/log/insertPermissions.log
Output for /opt/kaltura/app/deployment/base/scripts/insertContent.php being logged into /opt/kaltura/log/insertContent.log
确认安装后
mysql> show databases;
+---------------------+
| Database |
+---------------------+
| information_schema |
| kaltura |
| kaltura_sphinx_log |
| kalturadw |
| kalturadw_bisources |
| kalturadw_ds |
| kalturalog |
| mysql |
| test |
+---------------------+
+-----------+---------+-------------------------------------------+
| Host | User | Password |
+-----------+---------+-------------------------------------------+
| localhost | kaltura | *21879B830757626983D467BC809D7D78971EB08B |
| localhost | etl | *21879B830757626983D467BC809D7D78971EB08B |
+-----------+---------+-------------------------------------------+
4 rows in set (0.00 sec)
10. 将Kaltura的演示应用程序Red5安装进去。
yum install kaltura-red5
点击【安装已准备好的应用程序】进入应用程序安装页面。
由於示範已在以下目錄下進行下載:
/usr/lib/red5/webapps/oflaDemo/index.html
將主機名從【本機】更改為【192.168.3.3】。
http://192.168.3.3:5080/oflaDemo/
にアクセスしてデモが閲覧できる事を確認
执行配置
/opt/kaltura/bin/kaltura-red5-config.sh
11. 重新启动 Red5
cd /usr/lib/red5/
sh red5-shutdown.sh && sh red5.sh&
观察Spring启动时的日志,可以发现下面的URL,但除了oflaDemo和chat之外,其他URL无法访问。
http://192.168.3.3:5080/oflaDemo -> OK
http://192.168.3.3:5080/chat -> OK
http://192.168.3.3:5080/vod -> OK
http://192.168.3.3:5080/SOSample -> NG
http://192.168.3.3:5080/ -> OK
http://192.168.3.3:5080/installer -> OK
http://192.168.3.3:5080/SystemUtils -> NG
http://192.168.3.3:5080/admin -> NG
12.管理画面起動
到这个地步,慢慢变得麻烦,所以结束了。