Installing ViMP Part 1: Installing the Web Host

These steps are mostly taken from the ViMP FAQ, with modifications from where I stumbled. I had originally tried to make this one long document, but to avoid a wall of text and getting lost in the middle, I've split it out into three parts: Installing the Web Server, Installing the Transcoding Tools, and Installing ViMP.

This how-to assumes that you have already installed Ubuntu Server 12.04 LTS and have SSH enabled in order to remotely manage the server. When setting up the server there is no need to do the LAMP install package, as the steps below will effectively take care of that.

Also note that I prefer to use nano as my text editor, because it's stupid simple. Ctrl+W is for search, Ctrl+X is for close/save.

Installing the Web Server Packages

  1. First we need to install the basic Apache and MySQL packages:

    apt-get update
    apt-get install apache2 php5 php5-gd php5-mysql mysql-server mysql-client php5-cli php5-mcrypt php5-xsl php5-curl php5-gmp php5-json libjpeg62 libjpeg62-dev ruby

  2. Install a MTA (Mail Transfer Agent) for sending emails to users and admins:

    apt-get install sendmail-bin sendmail

  3. We need to modify the default Apache configuration to point to the correct folder for the ViMP install. The web-facing part of the ViMP install is located in the /web subfolder of wherever you install ViMP, so I chose to install ViMP to /var/www/vimp/ and point the Apache config to /var/www/vimp/web/.

    nano /etc/apache2/sites-available/default.conf

    Note: This may be /etc/apache2/sites-available/000-default.conf
    Replace the entire file with the following text:

    <VirtualHost *:80>
    # ServerAdmin webmaster@localhost
    # ServerName mydomain.tld
    # ServerAlias www.mydomain.tld myalternativedomain.tld www.myalternativedomain.tld
    DocumentRoot /var/www/vimp/web/
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/vimp/web/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    </VirtualHost>

  4. There are two php.ini files to modify, one for the Apache module and another for the CLI (Command Line Interface). The Apache php.ini file affects uploads and the front-end website, while the CLI php.ini file affects the transcoding.

    nano /etc/php5/apache2/php.ini

    Modify the following lines (Ctrl+W will let you search for the terms)

    upload_max_filesize = 2G ; the maximum upload size
    post_max_size = 2G
    register_globals = Off
    register_argc_argv = On
    safe_mode = Off
    memory_limit = 512M

    Do the same modifications to the CLI php.ini:

    nano /etc/php5/cli/php.ini

  5. Enable the rewrite module for Apache:

    a2enmod rewrite
    apache2ctl restart

  6. Create the database and user in MySQL:

    mysql -p

    Replace DATABASENAME, DATABASEUSER, and PASSWORD in the following text and paste line by line into the console window.

    mysql> create database DATABASENAME default character set utf8 collate utf8_unicode_ci;
    mysql> grant all privileges on DATABASENAME.* to 'DATABASEUSER'@'localhost' identified by 'PASSWORD';
    mysql> flush privileges;
    mysql> exit;

  7. Install the SourceGuardian PHP extension
    • Create a temporatry folder in /usr/src/:

      mkdir /usr/src/loader
      cd /usr/src/loader

    • Download the SourceGuardian files:

      wget http://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
      tar xzf loaders.linux-x86_64.tar.gz

      Copy the file that matches your PHP version to the "extension_dir" of your PHP configuration:

      cp ixed.5.3.lin /usr/lib/php5/20090626/

    • Create the config file for SourceGuardian:

      cd /etc/php5/conf.d/
      nano sourceguardian.ini

      Enter these lines into the file:

      [sourceguardian]
      zend_extension=/usr/lib/php5/20090626/ixed.5.3.lin

    • Restart Apache

      apache2ctl restart

Now you have a fully functioning web server ready for the transcoding tools and ViMP!

Share this

Tags: 

Comments

I'm using drupal for many years now and I like it when using Ubuntu as my OS. These two works wonders together and I have no problem using them. buy soundcloud plays