HOWTO :: VoIP: Whosesale :: Calling Card :: OpenSer :: Radius :: Asterisk :: FreeSwitch :: A2Billing :: IVR :: Colo :: Colocations :: GADGETS

February 12, 2009

Installing FFmpeg & Dependencies For FLV Conversion

This guide should teach you how to install all the needed dependencies for ClipShare or other flash video conversion scripts. It’s primarily focused on RHEL or CentOS installs for the dependencies of these packages. The links in this guide are fresh as of 08/04/2008. Here is what this guide will help you install:

It assumes you already have Apache and PHP5 installed as those are required dependencies as well. There will also be a guide up for installing PHP5.2.6 from source on CentOS/RHEL soon.

First install subversion and ruby via yum or up2date:

yum -y install subversion ruby

Now we need to install MPlayer & FFmpeg sources from SVN:

cd ~
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

Now we need some codecs:

wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
tar xvjpf essential-20071007.tar.bz2
cd essential-20071007
mkdir /usr/local/lib/codecs
mv * /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
cd ~

Next we will install LAME MP3 encoder:

wget http://internap.dl.sourceforge.net/sourceforge/lame/lame-398.tar.gz
tar xvzpf lame-398.tar.gz
cd lame-398
./configure –prefix=/usr
make
make install
cd ~

Now we install Libogg:

wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
tar xvzpf libogg-1.1.3.tar.gz
cd libogg-1.1.3
./configure –prefix=/usr
make
make install
cd ~

We need to make sure the correct lib directories are setup in ldconfig. Edit the /etc/ld.so.conf file and add the following lines:

/usr/lib
/usr/local/lib

Now save and run the following command:

ldconfig

To install libvorbis we will run:

wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz
tar xvzpf libvorbis-1.2.0.tar.gz
cd libvorbis-1.2.0
./configure –prefix=/usr
make
make install
cd ~

Now we will install FLVTool2:

wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
tar xvzpf flvtool2-1.0.6.tgz
cd flvtool2-1.0.6
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
cd ~

Next we should build MPlayer & MEncoder and it will take a while unless you have a nice dual or quad core machine. Note that I’ve seen the SVN version of these packages break before, so you can always download the source code from their site (a stable copy) if it fails on make:

cd mplayer
./configure –prefix=/usr
make
make install
cd ~

We will now build FFmpeg:

mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp
cd ffmpeg
./configure –prefix=/usr –enable-libmp3lame –enable-libvorbis –disable-mmx –enable-shared
make
make install
cd ~

Symlink some libraries if needed (ignore file exists errors):

ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51

Now build FFmpeg-PHP:

wget http://voxel.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.3.1.tbz2
tar xvjpf ffmpeg-php-0.5.3.1.tbz2
cd ffmpeg-php-0.5.3.1
phpize
./configure –prefix=/usr
make
make install
cd ~

Now you need to copy the ffmpeg.so file that was created from it’s location (from the build) to /usr/local/lib/php/extensions/, it should look something like:

cp /usr/local/lib/php/extensions/no-debug-non-zts-????????????/ffmpeg.so /usr/local/lib/php/extensions/

Modify your php.ini. Try /etc/php.ini or /usr/lib/php.ini or /usr/local/Zend/etc/php.ini as they are common locations, you can do php -i | grep -i ini to find the proper location. Change the extension_dir value as seen below and add the extension as seen below:

extension_dir = “/usr/local/lib/php/extensions/”
extension=ffmpeg.so

Now save and restart apache and test php for ffmpeg on both apache via phpinfo() and from shell:

service httpd stop
killall -9 httpd
service httpd start
php -i | grep -i ffmpeg

Let me know via comments if you find some bugs or better ways to do things!

August 1, 2008

HOWTO: Debian Etch Apache2 + SSL

Filed under: Apache2 — Tags: , , — nelson @ 8:46 pm

Introduction: Howto Apache2 + SSL Installation

This tutorial will teach you how to install and configure Apache2 + SSL for Debian Etch. The installation is straightforward. You can just copy pasted the commands below:

Install apache2 in debian etch


#apt-get install apache2


Install openssl using the following command


#apt-get install openssl ssl-cert


Install PHP5 support for apache2 in debian etch

#apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi

Once you install apache server you need to Generate a certificate,Enable Apache SSL support and Configure your SSL options.


Generate A certificate

(more…)

July 24, 2008

HOWTO: Debian VPN PPTP

Filed under: PPTP, VPN — Tags: , , , , — nelson @ 6:34 pm

This tutorial will guide you how to install and configure VPN PPTP in Debian Etch. The installation is straightforward.

Note: Make sure that your VPN Server has two Network Interface Card (NIC). One for Outside Interface (where the public IP is configured) and the other is INSIDE interface (where your LAN IP is configured)

Introduction

What is PPTP? Short for Point-to-Point Tunneling Protocol, a new technology for creating Virtual Private Networks (VPNs) , developed jointly by Microsoft Corporation, U.S. Robotics, and several remote access vendor companies, known collectively as the PPTP Forum. A VPN is a private network of computers that uses the public Internet to connect some nodes. Because the Internet is essentially an open network, the Point-to-Point Tunneling Protocol (PPTP) is used to ensure that messages transmitted from one VPN node to another are secure. With PPTP, users can dial in to their corporate network via the Internet.

PPTP is known to be less secure than other VPN software, but if you need a quick solution for a VPN server that will connect out of the box from Windows workstations PPTP is the obvious choice. This post will show how easy it is to setup a pptp vnp server on Debian Etch.
(more…)

July 9, 2008

OpenVZ: Debian Etch Install

Filed under: OpenVZ — Tags: , , , — nelson @ 10:23 am

This tutorial will show you how to install OpenVZ in Debian Etch System. The installation is straightforward and you can just do copy and paste.

Introduction: What is OpenVZ

From the website:

OpenVZ is container-based virtualization for Linux. OpenVZ creates multiple secure, isolated containers (otherwise known as VEs or VPSs) on a single physical server enabling better server utilization and ensuring that applications do not conflict. Each container performs and executes exactly like a stand-alone server; a container can be rebooted independently and have root access, users, IP addresses, memory, processes, files, applications, system libraries and configuration files. For more information about the technology and how it differs from the others like Xen, VMware etc., see introduction to virtualization, doc/openvz-intro.pdf (73 KB) or wikipedia:OpenVZ.

OpenVZ is free open source software, available under GNU GPL.

OpenVZ is the basis of Parallels Virtuozzo Containers, a commercial virtualization solution offered by Parallels. OpenVZ project is supported by Parallels.

(more…)

Powered by WordPress

HOWTO :: VoIP: Whosesale :: Calling Card :: OpenSer :: Radius :: Asterisk :: FreeSwitch :: A2Billing :: IVR :: Colo :: Colocations :: GADGETS is Digg proof thanks to caching by WP Super Cache!