Software installation on Ubuntu 12.04

 


      …Please note:

·         The following is a command line approach to setting up Ubuntu 12.04 with the necessary dependencies required for this software to run.

·         A set of tutorial videos supplements these instructions. The videos are located on my Vimeo channel: https://vimeo.com/YouTubeToMp3PhpScript.

·         These instructions are provided as a convenience and courtesy to you. Generally, it is not my responsibility to teach you how to install and configure packages on a Linux system.

·         If you need any further help, you may contact me directly for paid support (charged at my hourly rate).

 

1. Always check for OS updates first before doing anything else

# sudo apt-get update
# sudo apt-get upgrade

2. Install Apache and PHP

# sudo apt-get install apache2
# sudo apt-get install php5 libapache2-mod-php5
# sudo /etc/init.d/apache2 restart

3. Create 'public_html' directory

# sudo mkdir /home/user/public_html
# sudo chmod 0777 /home/user/public_html

4. Move web root from '/var/www' to '/home/user/public_html'

Open '/etc/apache2/sites-enabled/000-default' in text editor.
Via command line, you do it like this:

# sudo gksu gedit /etc/apache2/sites-enabled/000-default

Change  DocumentRoot /var/www to  DocumentRoot /home/user/public_html
Change  <Directory /var/www/> to  <Directory /home/user/public_html/>

Save and close file in text editor

# sudo /etc/init.d/apache2 restart

5. Create a phpinfo.php file and put it into /home/user/public_html

File contains only this code:   <?php phpinfo(); ?>

Open phpinfo.php in browser (http://localhost/phpinfo.php) to verify Apache/PHP are working.

6. Install cURL and PHP cURL extension

# sudo apt-get install curl libcurl3 php5-curl

7. Install FFmpeg and codecs

# sudo apt-get install ubuntu-restricted-extras

You may have to press Tab and Enter a couple of times during the above command's execution to accept the End User License Agreement (EULA) for ttf-mscorefonts-installer.

Follow the general instructions in this video to download and install a current, static build of FFmpeg: https://vimeo.com/141445741.

8. Install ffmpeg-php PHP extension

# sudo apt-get install php5-ffmpeg

9. Edit php.ini

Open the server php.ini file at '/etc/php5/apache2/php.ini' in a text editor.
Add the following lines to the file:

extension=curl.so
extension=ffmpeg.so

Save your php.ini file.

# sudo /etc/init.d/apache2 restart

10. Check that FFmpeg and cURL extensions are installed

Open phpinfo.php in browser (http://localhost/phpinfo.php) to verify FFmpeg/cURL extensions are now listed.

11. Enable Apache mod_rewrite for pretty URLs

# sudo a2enmod rewrite

Open '/etc/apache2/sites-enabled/000-default' in a text editor.

In first two  <Directory> blocks, replace  AllowOverride None  with  AllowOverride All

# sudo /etc/init.d/apache2 restart

12. Install ‘id3v2’ package for editing metadata of some downloaded/converted file types

# sudo apt-get install id3v2

 

You're done !! Ubuntu is now ready for you to install and configure the YouTube-to-Mp3 Converter software, per the provided documentation.