Ubuntu Server 10.4 Lucid – Installing VIMP (Community Edition)

Some time ago I was looking for an open source YouTube clone when I came across something called osTube. When I recently vistited the osTube site again I found that osTube development had been discontinued. Its successor is ViMP which bills itself as the solution for Social Media, Web TV and Video Communities. It has a host of features and the good news (for me) is that it handles H.264/MP4.

Just to be clear though the ViMP Community edition is not open source – the code is encrypted by a PHP encoder called Source Guardian (which must be installed to use ViMP). Hopefully you are OK with that?

You will need to register at the ViMP site to download it (the current version is 2.0.6). Extract the ViMP tar-ball and you will find an Installation Guide for Debian in the doc folder. Most of this guide is good for an Ubuntu installation but we will make some changes for our Ubuntu install.

My starting point is a virtual machine with a minimal Ubuntu Server installation with the SSH role. So, let’s install ViMP:

Fisrt update repositories:

sudo apt-get update

Install nano (terminal based text editor) and wget (file downloader):

sudo apt-get install nano wget

Install Apache2 web server:

sudo apt-get install apache2

Enable mod_rewrite and then restart Apache2:

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

Install PHP5:

sudo apt-get install libapache2-mod-php5

Install additional PHP packages:

sudo apt-get install php5-cli php5-mysql php5-gd php5-xsl php5-curl

Install the MySQL database server:

sudo apt-get install mysql-server

You will be prompted to provide a root password for MySQL. Make a note of this password for later!

Add the Medibuntu repository to your server:

sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list
http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list
&& sudo apt-get --quiet update && sudo apt-get --yes --quiet
--allow-unauthenticated install medibuntu-keyring && sudo apt-get
--quiet update

Install the transcoding software:

sudo apt-get install mplayer mencoder ffmpeg flvtool2

Install video codecs for popular proprietary formats:

For 32 bit,

sudo apt-get install w32codecs

or for 64 bit,

sudo apt-get install w64codecs

Create directories for ViMP installation:

sudo mkdir -p /var/www/showvid/data
sudo mkdir -p /var/www/showvid/logs
sudo chown -R www-data:www-data /var/www/showvid

Create a configuration file for the Apache virtual host:

cd /etc/apache2/sites-available
sudo nano showvid

Copy and paste the following into the /etc/apache2/sites-available/showvid file you just created:

<VirtualHost *:80>
DocumentRoot "/var/www/showvid/data/web"ServerName showvid.com
ServerAlias www.showvid.com
<Directory "/var/www/showvid/data/web">
AllowOverride All
RewriteEngine On
Options -Indexes FollowSymLinks
ErrorLog /var/www/showvid/logs/error.log
CustomLog /var/www/showvid/logs/access.log combined
LogLevel error

Save the file  and exit nano.

Enable the showvid virtual host and restart Apache:

sudo a2ensite showvid
sudo /etc/init.d/apache2 reload

Disable the default virtual host and restart Apache:

sudo a2dissite default
sudo /etc/init.d/apache2 reload

Next we need to configure some PHP values. Edit both of the files listed below and change the upload_max_filesize, post_max_size and memory_limit values as per the bullet points:

sudo nano /etc/php5/apache2/php.ini
sudo nano /etc/php5/cli/php.ini

• upload_max_filesize = 1024M
• post_max_size = 1024M
• memory_limit = 512M

Restart Apache:

sudo /etc/init.d/apache2 restart

Create a MySQL database called showvid:

sudo mysqladmin -p create showvid

Enter your MySQL password.

Enter the MySQL console as the root user:

mysql -u root -p

Enter your MySQL password again. You should now be at the MySQL prompt:


Create a user called showvid. Change <password> in the first command below to a strong password for the showvid user. Make a note of this password.

CREATE USER showvid@localhost IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON showvid.* TO showvid;

Change directories to your user directory:

cd /home/<username>/

Upload ViMP to your server – I used WinSCP to do this.

Copy the ViMP tar-ball to /var/www/showvid/data/ and then extract it:

sudo cp vimp.framework-<version>.tar.gz  /var/www/showvid/data/
cd /var/www/showvid/data/
sudo tar xvzf vimp.framework-<version>.tar.gz
sudo rm vimp.framework-<version>.tar.gz

Make the symfony file in /var/www/showvid/data/ executable:

sudo chmod +x symfony

At this point we would normally be able to execute the symfony file but because we are using the Community edition of ViMP we must install SourceGuardian. To do this we will need to know the version of PHP that we have installed:

php -v

Now that we know what version of PHP we are using we can copy and extract the Source Guardian loaders that are supplied with ViMP.

First create a temporary directory to work in:

cd /home/<username>/
mkdir temp
cd temp/

Now extract the file /var/www/showvid/data/data/loader.tar.gz to the current directory:

tar xfz /var/www/showvid/data/data/loader.tar.gz

For the next step you will need to look in either the Linux_x86-32 folder (if your installation is 32 bit) or the Linux_x86-64 folder (for 64 bit). Assuming that you are running PHP 5.3.2 like me you will want the Source Guardian ixed.5.3.lin loader file .

Now that we have matched a loader to our version of PHP we need to make a folder in /usr/lib/php5/ that we can copy the Source Guardian loader to.  The format of the folder is year, month, date +lfs. I don’t think that it really matters what date we choose, so I used the one provided in the Debian installation guide:

sudo mkdir /usr/lib/php5/20060613+lfs

Copy the loader file ixed.5.3.lin to the /usr/lib/php5/20060613+lfs/ folder:

sudo cp Linux_x86-32/ixed.5.3.lin /usr/lib/php5/20060613+lfs/

Create a Source Guardian configuration file:

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

Add the following two lines to sourceguardian.ini:

Restart Apache:

sudo /etc/init.d/apache2 restart

Source Guardian installation is now complete.

Change directory back to /www/showvid/data and run symfony – just make sure that you change <password> to the password you defined for the showvid user earlier on:

cd /var/www/showvid/data
sudo ./symfony framework:init mysql://showvid:<password>@localhost

Finally we need to set up a cronjob that runs every minute to convert uploaded videos to the right format. Edit the crontab:

sudo crontab -e

Copy and paste the following line at the bottom:

*/1 * * * * /var/www/showvid/data/scripts/sync_new_uploads.sh > 
/dev/null 2>&1

You can now access ViMP with a web browser. The password for the admin account is ‘admin’ – so you might want to change that after you log in.

That’s it, now sit back and enjoy your own video community!

solution for Social Media, Web TV and Video Communities

20 thoughts on “Ubuntu Server 10.4 Lucid – Installing VIMP (Community Edition)

  1. The instruction seems complex, is is possible to install vimp via http unlike Ostube.
    I wanted to install it on my shared hosting server. The hosting company (Arvixe) told me that the was is enable for PHP extension SourceGuardian.

    I created a ‘loader’folder on the root directory and copy the zip file there, then I created another folder called ‘vimp’ in the /public_html.
    This is where I stucked. Can you help

  2. when I do a command terminal : sudo ./symfony framework:init mysql://showvid:@localhost /showvid

    out an error message at the end :
    SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected

    Can you help solve this problem?

  3. when I do a command terminal : sudo ./symfony framework:init mysql://showvid:@localhost /showvid

    out an error message at the end :
    Fatal error: Call to a member function prepare() on a non-object in /var/www/showvid/data/lib/storage/stDatabaseSessionStorage.class.php on line 381


    1. Did you ever find the cause of the error on line 381? I have tried this about six different ways with both 32 and 64 bit servers and it always fails with the same error.

  4. Hey Mike,

    Now I got the problem, that I can’t upload any videos… the message “Server I/O Error” appears… it seems vimp cant format the videos into the format. Can you please tell all the paths I have to specify in the adminpanel? Thanks already a lot!


      1. I’m assuming that your MySQL and folder permissions are right for ViMP to actually install. It might be worth checking the latter though. Other than that I’m not sure exactly what your issue might be. If none of this helps I would post on the ViMP forum for an answer – their support is usually pretty good.

  5. Can you clarify this command: “sudo ./symfony framework:init mysql://showvid:@localhost

    Is it
    (with space after localhost)
    1. “sudo ./symfony framework:init mysql://showvid:@localhost /showvid”
    (with nospace)
    2. “sudo ./symfony framework:init mysql://showvid:@localhost/showvid”
    (With return after localhost)
    3. “sudo ./symfony framework:init mysql://showvid:@localhost

    Also would this guide work still with 10.04 if you are starting with a new install of 2.5.7?

    1. Hi Tom,

      The command should not have a space – the problem is formatting long lines of code in WordPress is not ideal – this is the command from the install notes:

      run ./symfony framework:init mysql://:@localhost/

      This guide might work for 2.5.7 but I would check the two sets of instructions side by side in case additional commands are required.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s