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.

 

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: http://www.dailymotion.com/video/x1a0yk0_convert-youtube-to-mp3-free-php-script-installation-tutorial-part-3_music

8. 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

Save your php.ini file.

# sudo /etc/init.d/apache2 restart

9. Check that cURL extension is installed

Open phpinfo.php in browser (http://localhost/phpinfo.php) to verify cURL extension is now listed.

 

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