Install Youtube Clones on Ubuntu
|
|
Software installation commands and file configurations to get youtube video clones like Vshare, PHP Motion and OStube installed and running on Ubuntu web servers.
After many hours and days of trial and error and endless googling, I have compiled and used the following list of software packages and file configurations to successfully install Vshare, PHP Motion and Ostube on several instances of ubuntu servers. Your mileage may vary.
There are several common audio-video-graphic conversion and playback software packages that need to be installed to support youtube type clone scripts. Additionally, there are a few files that need to be configured on the Ubuntu web server to enable the scripts to run properly. To install software simply start up a command line terminal and type the commands listed in red.
SOFTWARE INSTALLATIONS
If you are just starting fresh, install a copy of ubuntu server on your computer. During the install choose the option to install the webserver. This will automatically setup a basic working web server with apache, php and mysql. I will not cover setting up an Ubuntu server as there are already numerous tutorials that cover that on the internet. Software installs are quick and easy with the command line terminal. Configuring the files may be easier for you using a graphical user interface. I have included the command to install the standard ubuntu desktop.
First, update the software repositories sudo apt-get update
Install the ubuntu desktop sudo apt-get install ubuntu-desktop
Install the mysql server sudo apt-get install mysql-server
Install the phpmyadmin panel sudo apt-get install phpmyadmin
Install PHP5 Comand Line Interface sudo apt-get install php5-cli
Install mplayer sudo apt-get install mplayer
Install mencoder sudo apt-get install mencoder
Install flvtool2 sudo apt-get install flvtool2
Install codecs sudo apt-get install ubuntu-restricted-extras
Install Ruby sudo apt-get install build-essential
Install ffmpeg sudo apt-get install ffmpeg
Install GD library apt-get install apache2 php5 php5-gd
Install curl sudo apt-get install php5-curl
Enable mod-rewrite a2enmod rewrite
Now reload apache2 /etc/init.d/apache2 force-reload
Restart apache2 /etc/init.d/apache2 restart
Important File Configurations
Once all the necessary software is installed, there are a few files that need to be configured in order for the vshare youtube clone script to work.
The first file is the Apache webserver config file at /etc/apache2/sites-enabled/000-default
The Vshare youtube clone script comes with a .htaccess file that has many settings and configurations.
You will need to set the following lines highlighted in yellow in the 000-default file to AllowOverride All in order for the .htaccess file to work.
The ScriptAlias line sets the path to the cgi-bin directory location under the vshare directory. The AddHandler cgi-script cgi pl line gets the cgi-bin to execute cgi and pl scripts.
Configurations for vshare youtube clone uploader files:
Find the ubr_ini.php file at:
www/vshare/ubr/ubr_ini.php
set the correct path to /templates_c/
set the correct path to /cgi-bin/ubr_upload.pl
Find the ubr_upload.pl file at:
/var/www/vshare/cgi-bin/ubr_upload.pl
Set the correct path for the $TEMP_DIR
Find the upload.php file at:
/var/www/vshare/include/settings/upload.php
change the upload progress bar setting from “0″ to “1″
Find the php.ini file at
/etc/php5/apache2/php.ini
Make the following changes:
safe_mode = off
register_globals = off
open_basedir = (no value)
output_buffering = on
upload_max_filesize = 200M (or more)
post_max_size = 200M (or more)
max_execution_time = 6000 (or more)
max_input_time = 6000 (or more)
memory_limit = 128M (or more)
display_errors = On
file_uploads = On
session.gc_maxlifetime = 14000 (or more)