Installing KalturaCE 5 on Ubuntu 12.04 LTS

Kaltura CE can be installted on Cent-OS and Ubunto, but different distributions cause different issues. IF you ever wanted to install Kaltura on Ubuntu 12.04, some issues might arise.

Luckily for you we have done this several times and mapped the major issues, and how to bypass them.
To install Kaltura, take the next few simple steps and you’re good to go.

  1. Pre-installation
    1. Install packages:
      sudo apt-get install apache2 php5 php5-cli mysql-server mysql-client
      curl libcurl3 libcurl3-dev  memcached php5-curl php5-gd php5-memcache
      php5-mysql php-apc php5-xsl php5-imap libssh2-php imagemagick rsync default-jre
      php5-mcrypt exif ftp php-services-json spl-core php-xml-serializer
      ia32-libs lib32asound2 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32z1 libc6-i386
    2. Modify /etc/php/apache2/php.ini and /etc/php/cli/php.ini:
      set request_order = “CGP”
    3. Enable apache modules
      A2enmod rewrite headers expires filter deflate file_cache env proxy
    4. Edit /etc/mysql/my.cnf:
      Change thread_stack = 262144
      And add the following lines under [mysqld] lower_case_table_names = 1
      open_files_limit = 20000
    5. Restart mySQL:
      /etc/init.d/mysql restart
    6. Restart apache:
      /etc/init.d/apache2 restart
      1. Install Pentaho:
        Create the /usr/local/pentaho/ directory:
        mkdir /usr/local/pentaho/ && cd /usr/local/pentaho/
      2. Download the pentaho data-integration package.
        wget http://sourceforge.net/projects/pentaho/files/Data%20Integration/3.2.0-stable/pdi-ce-3.2.0-stable.tar.gz/download
      3. Extract the pentaho data-integration package.
        tar xvfz pdi-ce-3.2.0-stable.tar.gz -C /usr/local/pentaho
      4. Rename the data-integration root directory into pdi.
        mv data-integration pdi
  • Installation
  1. Check out your copy using
    svn checkout http://www.kaltura.org/kalorg/kalturaCE
  2. Extract the Kaltura CE package to anywhere on your server
    tar -zxvf CE-V5.0.0.-XXX.tgz
  3. Change to root user and type
    php install.php
  • Post – Installation
  1. Open your Apache configuration file for editing add the following line
    Include {YOUR_KALTURA_BASE_ DIR}/app/configurations/apache/my_kaltura.conf
  2. Change /etc/hosts first line to:
    127.0.0.1       kalturadev.example.com      localhost
  3. Restart Apache.

Fell free to leave  a comment below or share any other issues you might encounter during the installation.
Good Luck, you’ll need it!

19 thoughts on “Installing KalturaCE 5 on Ubuntu 12.04 LTS

  1. Hello,
    Wile installing I am facing the issue please help urgent.
    Here is my installation log
    /*********/
    30.12.2013 14:49:08 INFO /opt/kaltura/app/configurations/admin.template.ini token file contains .template
    30.12.2013 14:49:08 INFO Executing cp -r /opt/kaltura/app/configurations/admin.template.ini /opt/kaltura/app/configurations/admin.ini
    30.12.2013 14:49:08 ERROR Executing command failed: cp -r /opt/kaltura/app/configurations/admin.template.ini /opt/kaltura/app/configurations/admin.ini
    30.12.2013 14:49:08 ERROR Output from command is:
    30.12.2013 14:49:08 ERROR End of Output
    30.12.2013 14:49:08 ERROR Cannot replace token in file /opt/kaltura/app/configurations/admin.ini
    30.12.2013 14:49:16 INFO Sending install report
    30.12.2013 14:49:16 USER Installation failed.
    30.12.2013 14:49:16 USER Failed to replace tokens in /opt/kaltura/app/configurations/admin.template.ini
    30.12.2013 14:49:16 USER For assistance, please upload the installation log file to the Kaltura CE forum at kaltura.org
    /*********/
    Eagerly waiting for your response.
    Thanks.

  2. Hi Roni,

    I am installing Kaltura ce 6.5 on ubuntu 12.04 lts on my local machine
    While installing I am getting issue of ” USER Failed to replace tokens in /opt/kaltura/app/configurations/admin.template.ini “. Please help.
    Here is my installation log.
    /********************************/

    30.12.2013 14:43:25 INFO Installation started
    30.12.2013 14:43:25 INFO Installing Kaltura CE v6.0.0 dev
    30.12.2013 14:43:25 USER Thank you for installing Kaltura Video Platform – Community Edition
    30.12.2013 14:43:25 USER In order to improve Kaltura Community Edition, we would like your permission to send system data to Kaltura.
    This information will be used exclusively for improving our software and our service quality. I agree (Y/n)
    30.12.2013 14:43:39 INFO User input is Y
    30.12.2013 14:43:39 USER If you wish, please provide your email address so that we can offer you future assistance (leave empty to pass)
    30.12.2013 14:43:52 INFO User input is
    30.12.2013 14:43:53 INFO Distribution: Description: Ubuntu 12.04.3 LTS
    30.12.2013 14:43:54 INFO Sending install report
    30.12.2013 14:43:54 INFO OS: Linux
    30.12.2013 14:43:54 INFO OS: linux
    30.12.2013 14:43:54 INFO OS: Linux
    30.12.2013 14:43:54 USER Please provide the following information:
    30.12.2013 14:43:54 USER The following apachectl script has been detected: /usr/sbin/apachectl. Do you want to use this script to run your Kaltura application? Leave empty to use or provide a pathname to an alternative apachectl script on your server.
    30.12.2013 14:44:00 INFO User input is
    30.12.2013 14:44:00 INFO Using default value: /usr/sbin/apachectl
    30.12.2013 14:44:00 USER The following PHP binary has been detected: /usr/bin/php. Do you want to use this script to run your Kaltura application? Leave empty to use or provide a pathname to an alternative PHP binary on your server.
    30.12.2013 14:44:04 INFO User input is
    30.12.2013 14:44:04 INFO Using default value: /usr/bin/php
    30.12.2013 14:44:04 USER Default time zone for Kaltura application (leave empty to use system timezone: Asia/Calcutta )
    30.12.2013 14:44:07 INFO User input is
    30.12.2013 14:44:07 INFO Using default value: Asia/Calcutta
    30.12.2013 14:44:07 USER Full target directory path for Kaltura application (leave empty for /opt/kaltura)
    30.12.2013 14:44:15 INFO User input is
    30.12.2013 14:44:15 INFO Using default value: /opt/kaltura
    30.12.2013 14:44:15 USER Please enter the domain name/virtual hostname that will be used for the Kaltura server (without http://)
    30.12.2013 14:44:36 INFO User input is tnex.kaltura.com
    30.12.2013 14:44:36 USER Your primary system administrator email address
    30.12.2013 14:44:44 INFO User input is
    30.12.2013 14:44:44 USER The password you want to set for your primary administrator
    30.12.2013 14:44:47 INFO User input is
    30.12.2013 14:44:47 USER Database host (leave empty for ‘localhost’)
    30.12.2013 14:44:49 INFO User input is
    30.12.2013 14:44:49 INFO Using default value: localhost
    30.12.2013 14:44:49 USER Database port (leave empty for ‘3306’)
    30.12.2013 14:44:51 INFO User input is
    30.12.2013 14:44:51 INFO Using default value: 3306
    30.12.2013 14:44:51 USER Database username (with create & write privileges)
    30.12.2013 14:44:56 INFO User input is root
    30.12.2013 14:44:56 USER Database password (leave empty for no password)
    30.12.2013 14:44:59 INFO User input is
    30.12.2013 14:44:59 USER Would you like to create a new kaltura database or use an exisiting one? (Y/n)
    30.12.2013 14:45:02 INFO User input is Y
    30.12.2013 14:45:02 USER The URL to your xymon/hobbit monitoring location. Xymon is an optional installation. Leave empty to set manually later
    Examples:
    http://www.xymondomain.com/xymon/
    http://www.xymondomain.com/hobbit/
    30.12.2013 14:45:04 INFO User input is
    30.12.2013 14:45:04 USER Would you like to install Red5 on this machine?
    30.12.2013 14:45:07 INFO User input is Y
    30.12.2013 14:45:07 USER Sphinx host (leave empty if Sphinx is running on this machine).
    30.12.2013 14:45:12 INFO User input is
    30.12.2013 14:45:12 INFO Using default value: 127.0.0.1
    30.12.2013 14:45:12 USER Work mode – enter http/https
    30.12.2013 14:45:17 INFO User input is http
    30.12.2013 14:45:17 INFO Writing config to file user_input.ini
    30.12.2013 14:45:17 INFO Defining installation tokens for config
    30.12.2013 14:45:17 INFO Host name: tnex-android-1
    30.12.2013 14:45:17 INFO Generating secret
    30.12.2013 14:45:17 INFO Generating secret
    30.12.2013 14:45:17 INFO Generating secret
    30.12.2013 14:45:17 INFO Generating secret
    30.12.2013 14:45:17 INFO Generating secret
    30.12.2013 14:45:17 INFO Generating secret
    30.12.2013 14:45:17 USER Verifing prerequisites
    30.12.2013 14:45:18 USER Checking for leftovers from a previous installation
    30.12.2013 14:45:19 USER Installation is now ready to begin. Start installation now? (Y/n)
    30.12.2013 14:45:24 INFO User input is Y
    30.12.2013 14:45:24 USER Copying application files to /opt/kaltura
    30.12.2013 14:45:24 USER current working dir is /home/tnex/kaltura-installer
    30.12.2013 14:45:24 INFO Executing rsync -r –exclude web/content package/app/ /opt/kaltura
    30.12.2013 14:48:29 INFO Executing rsync -r package/app/web/content /opt/kaltura/web
    30.12.2013 14:48:57 INFO OS: Linux
    30.12.2013 14:48:57 INFO OS architecture: x86_64
    30.12.2013 14:48:57 USER Copying binaries for linux 64bit
    30.12.2013 14:48:57 INFO Executing cp -r package/bin/linux/64bit /opt/kaltura/bin
    30.12.2013 14:49:07 USER Creating the uninstaller
    30.12.2013 14:49:07 INFO Executing cp -r installer/uninstall.php /opt/kaltura/uninstaller/
    30.12.2013 14:49:08 USER Replacing configuration tokens in files
    30.12.2013 14:49:08 INFO Replaced tokens in file /opt/kaltura/logrotate/kaltura_log_rotate
    30.12.2013 14:49:08 INFO Replaced tokens in file /opt/kaltura/crontab/kaltura_crontab
    30.12.2013 14:49:08 INFO Replaced tokens in file /opt/kaltura/dwh/crontab/dwh_crontab
    30.12.2013 14:49:08 INFO /opt/kaltura/app/configurations/admin.template.ini token file contains .template
    30.12.2013 14:49:08 INFO Executing cp -r /opt/kaltura/app/configurations/admin.template.ini /opt/kaltura/app/configurations/admin.ini
    30.12.2013 14:49:08 ERROR Executing command failed: cp -r /opt/kaltura/app/configurations/admin.template.ini /opt/kaltura/app/configurations/admin.ini
    30.12.2013 14:49:08 ERROR Output from command is:
    30.12.2013 14:49:08 ERROR End of Output
    30.12.2013 14:49:08 ERROR Cannot replace token in file /opt/kaltura/app/configurations/admin.ini
    30.12.2013 14:49:16 INFO Sending install report
    30.12.2013 14:49:16 USER Installation failed.
    30.12.2013 14:49:16 USER Failed to replace tokens in /opt/kaltura/app/configurations/admin.template.ini
    30.12.2013 14:49:16 USER For assistance, please upload the installation log file to the Kaltura CE forum at kaltura.org

    /********************************/

    Eagerly waiting for your response.

  3. Hi Suhas,
    You are trying to install CE6 which is really not recommended.
    I would try and install the latest CE9 from Kaltura github: https://github.com/kaltura.

    Did you run the install using root user?
    You must be root to install this successfully, maybe there is a bug in the CE version you are trying to use.

    1. Hey Roni,
      Thanks for the quick replay. Bus the issue still continues.
      As per your suggestion I tried to install CE9 but same issue occurred. While creating package I have found some PHP warnings

      1. PHP Warning: file_get_contents(/home/tnex/kaltura-installer//package/app/app/configurations/base.ini): failed to open stream: No such file or directory in /home/tnex/ce-packager/packaging/package.php on line 83

      2. PHP Warning: parse_ini_file(/home/tnex/kaltura-installer//package/app/web/flash/kmc//config.ini): failed to open stream: No such file or directory in /home/tnex/ce-packager/packaging/package.php on line 95

      3. PHP Warning: implode(): Invalid arguments passed in /home/tnex/ce-packager/packaging/package.php on line 118

      4. PHP Warning: file_get_contents(package/app/app/configurations/base.ini): failed to open stream: No such file or directory in /home/tnex/kaltura-installer/install.php on line 157

      And one thing installer try to access file admin.template.ini from /opt/kaltura/app/configurations directory which is not present. Please help.
      Thanks.

  4. Do you have the files on your folder?
    Try and move the installer to the root home folder and than run it.

    And I think it wasn’t using a root user, as this is looking for the files on your home dir

  5. Hi Roni. I followed all the steps, without any errors. However, when I execute the install script I get the following error:-

    “You must have PHP mysqli extension loaded to continue with the installation.”

    Kindly advise on how to proceed.
    Thank you.
    –Rehan

    1. Hi Rehan, thanks for taking an interest in our blog.

      If you are running ubuntu, please run “sudo apt-get install php5-mysql”
      You might also need to add “extension=mysqli.so” to your php.ini and restart the apache in case the above command will not do that for you automatically.

  6. Hi – thanks for the instructions! I have got as far as tar -zxvf CE-V5.0.0.-XXX.tgz, but am stumpted (I am not an IT professional). All the packages downloaded and I seem to now have every version of Kaltura residing in /usr/local/pentaho/kalturaCE. I don’t know where to find the package to extract. Can you assist? Phil

  7. Hi Roni, thanks for the installation instructions. I’m using Ubuntu 12.04.4 LTS and have come across a problem. I’m unable to start sphinx:

    /etc/init.d/sphinx_watch.sh start

    /etc/init.d/sphinx_watch.sh: line 9: /etc/rc.d/init.d/functions: No such file or directory
    Starting Sphinx Watch Daemon: /etc/init.d/sphinx_watch.sh: line 20: echo_success: command not found

    Starting Sphinx populateFromLog watch: 6881
    /etc/init.d/sphinx_watch.sh: line 26: echo_failure: command not found

    I had a problem with the SVN so used wget to download the kalturaCE_v5.0.0.tgz directly from the Kaltura site. Any help would be very appreciated.

    Thanks,

    Andrew

    1. Hi Andrew,
      First if you are about to install a new Kaltura installation, I would recommend using Kaltura CE 9(IX) and not CE 5.

      As for the issues you are having, it has to do with missing: /etc/rc.d/init.d/functions on your distribution.
      I would remark those lines along with the echo success and echo failure and than it should work.

      Also you can decide not to use the sphinx_watch and run the sphinx script without the watch.
      It is located under /opt/kaltura/app/plugins/sphinx_search/scripts/
      You will see many scripts there, try to run them and make sure you kill them if they don’t work.
      I’m sure one of the scripts should work for you.

      Let me know how it goes.

      1. Thanks for teh support Riahi. I have tried steps give in that link. While installing “yum install kaltura-server”. I got error
        http://installrepo.kaltura.org/releases/latest/RPMS/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 : http://installrepo.kaltura.org/releases/latest/RPMS/i386/repodata/repomd.xml
        Trying other mirror.
        Error: Cannot retrieve repository metadata (repomd.xml) for repository: Kaltura. Please verify its path and try again

        Can you please help on this.

  8. hello everyone,

    i want to ask something about kaltura, can i use kaltura CE for my ott project. please suggest me. what are the drawbacks to use kaltura CE . Is kaltura enterprise edition is required.

Leave a Reply

Your email address will not be published. Required fields are marked *