Software installation on CentOS 6.x

 


      …Please note:

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

·         These instructions were tested on a CentOS system without cPanel installed. If you have cPanel installed, or you want to install cPanel, some modification of these instructions may be required.

 

 

1. Install Apache.

 

#yum install httpd

 

2. wget should be installed on host machine and also install gcc library

 

#yum install wget gcc

 

3. Then install epel repo.

 

#wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

#rpm -Uvh epel-release-6-8.noarch.rpm

 

4. Let's install PHP and the PHP cURL extension. (At the time of this writing, this installs PHP 5.3.)

 

#yum install php php-devel php-gd php-common

 

5. Now lets make additional changes in /etc/httpd/conf/httpd.conf

 

·         By default, Apache is using /var/www/html for the document root (or web root), but you can change this value if you will use another directory.

·         You need to uncomment this line #ServerName www.example.com:80, and put there your website domain name or just the IP address of your server.

 

6. Now start Apache.

 

#/etc/init.d/httpd start

 

7. Lets check if php is installed

 

#php -v

 

You will receive output like the following (will vary depending on PHP version installed):

 

PHP 5.3.3 (cli) (built: Sep 30 2014 05:55:00)

Copyright (c) 1997-2010 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

 

8. Compile FFmpeg from source.

Get the dependencies:


#yum install autoconf automake gcc-c++ libtool make nasm pkgconfig zlib-devel git

 

Make a directory in “/root/” to put all of the source code into:

#cd /root

#mkdir ~/ffmpeg_sources

 

Build/Install FFmpeg and codecs as follows:

Yasm

Yasm is an assembler used by x264 and FFmpeg.

cd ~/ffmpeg_sources

curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz

tar xzvf yasm-1.2.0.tar.gz

cd yasm-1.2.0

./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"

make

make install

make distclean

export "PATH=$PATH:$HOME/bin"

libmp3lame

MP3 audio encoder.

Requires FFmpeg to be configured with --enable-libmp3lame

cd ~/ffmpeg_sources

curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz

tar xzvf lame-3.99.5.tar.gz

cd lame-3.99.5

./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm

make

make install

make distclean

FFmpeg

cd ~/ffmpeg_sources

git clone --depth 1 git://source.ffmpeg.org/ffmpeg

cd ffmpeg

PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"

export PKG_CONFIG_PATH

./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libmp3lame

make

make install

make distclean

hash -r

. ~/.bash_profile


After all of this, FFmpeg will be compiled into “/root/bin/ffmpeg”.

 

9. Move the FFmpeg binary file from “/root/bin/ffmpeg” to “/usr/bin/ffmpeg”. Then set permissions of “/usr/bin/ffmpeg” to chmod 0777 and set ownership to the Apache user.

 

10. Don't forget to change ownership on your document root (web root) folder to user from which Apache is working:

·         #ps -aef | grep httpd will show you which user is using Apache (in my case, it's “apache”)

·         chown -R apache:apache /var/www/html/

 

 

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