Software installation on CentOS 6.x …Please note: These

advertisement
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.

If you need any further help, you may find free support at
http://www.codingforums.com/showthread.php?t=205066, check the FAQ
(http://www.codingforums.com/showpost.php?p=1365061&postcount=977), and/or contact me
directly via Tradebit.com or Codingforums.com for paid support (charged at my hourly rate).
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-68.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 let’s 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"
ibx264
H.264 video encoder.
Requires FFmpeg to be configured with --enable-gpl --enable-libx264 --extra-libs=-ldl
cd ~/ffmpeg_sources
git clone --depth 1 git://git.videolan.org/x264
cd x264
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enablestatic
make
make install
make distclean
libfdk_aac
AAC audio encoder.
Requires FFmpeg to be configured with --enable-libfdk_aac (and --enable-nonfree if you also
included --enable-gpl)
cd ~/ffmpeg_sources
git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac
cd fdk-aac
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
make distclean
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/lame3.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" --disableshared --enable-nasm
make
make install
make distclean
libopus
Requires FFmpeg to be configured with --enable-libopus
cd ~/ffmpeg_sources
curl -O http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
tar xzvf opus-1.1.tar.gz
cd opus-1.1
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
make distclean
libogg
Ogg bitstream library. Required by libtheora and libvorbis.
cd ~/ffmpeg_sources
curl -O http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
tar xzvf libogg-1.3.1.tar.gz
cd libogg-1.3.1
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
make distclean
libvorbis
Requires FFmpeg to be configured with --enable-libvorbis
cd ~/ffmpeg_sources
curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
tar xzvf libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build"
--disable-shared
make
make install
make distclean
libvpx
VP8/VP9 video encoder.
Requires FFmpeg to be configured with --enable-libvpx
cd ~/ffmpeg_sources
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
./configure --prefix="$HOME/ffmpeg_build" --disable-examples
make
make install
make clean
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-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis
--enable-libvpx --enable-libx264
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. Upload software to your server into document root (web root) folder.
11. 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/
12. Install ‘id3v2’ package for editing metadata of some downloaded/converted file types

Create the repository config file “/etc/yum.repos.d/linuxtech.repo”:
[linuxtech]
name=LinuxTECH
baseurl=http://pkgrepo.linuxtech.net/el6/release/
enabled=1
gpgcheck=1
gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET

Install id3v2 rpm package:
# yum install id3v2
You're done !! CentOS is now ready for you to install and configure the YouTube-to-Mp3
Converter software, per the README.txt file.
Download