Hi guys.
In this tutorial I'll try to show how to installing clip-share and
preparing a Linux server using Lampp (Xampp)
You can use any linux distribution you want but in my case i tested
the following tutorial on Debian and OpenSUSE 10.3
Debian:
http://www.debian.org/distrib/
OpenSUSE:
http://software.opensuse.org/
After installation open up your firefox and download Lampp last
version here:
Step 1
Download Lampp for Linux:
DL (
http://www.apachefriends.org/en/xampp-linux.html)
http://www.apachefriends.org/download.php?...x-1.6.5a.tar.gz ( get the
latest release! )
Save the lampp in your home directory
Start Linux Shell (Terminal) and use sodo or su for extracting lampp
sodo tar xvfz xampp-linux-1.6.5a.tar.gz -C /opt
or
su
tar xvfz xampp-linux-1.6.5a.tar.gz -C /opt
(if you're loged in as system administrator, make sure u are in right
path
you can find out by typeing pwd . if lampp is saved in normal user
Dektop directory
type " cd /home/ur_account_name/Desktop )
now lampp is extreacted to /opt/lampp/
----------------------------------------
now we need install second file:
Lampp Development Package
http://www.apachefriends.org/download.php?...l-1.6.5a.tar.gz
Extract: tar xvfz xampp-linux-devel-1.6.5a.tar.gz -C /opt
To start lampp , call this command in shell
/opt/lampp/lampp start
For change defualt ftp, mysql and lampp directory password:
/opt/lampp/lampp security
###########################################
Step 2
Download Packages:
Start Linux shell if you're closed it :)
( we will make a directory inside root home directory to download all
packages in one place)
mkdir ffmpeg
Login to ffmpeg folder by type:
1. ~/ffmpeg
2. cd /root/ffmpeg
( type pwd for conforming yur current location if you're unsure :) )
in shell:
wget
http://mafiascripts.net/ffmpeg/flvtool2-1.0.6.tgz
wget
http://mafiascripts.net/ffmpeg/lame-3.97.tar.gz
wget
http://mafiascripts.net/ffmpeg/essential-20071007.tar.bz2
wget
http://mafiascripts.net/ffmpeg/MPlayer-1.0rc1.tar.bz2
wget
http://mafiascripts.net/ffmpeg/libogg-1.1.3.tar.gz
wget
http://mafiascripts.net/ffmpeg/libvorbis-1.1.2.tar.gz
wget
http://mafiascripts.net/ffmpeg/ffmpeg_source.tar.gz
wget
http://mafiascripts.net/ffmpeg/ffmpeg-php-0.5.1.tbz2
wget
http://mafiascripts.net/ffmpeg/amrnb-6.1.0.4.tar.bz2
wget
http://mafiascripts.net/ffmpeg/libpng-1.2.18.tar.bz2
wget
http://mspedia.com/ffmpeg/libjpeg-6b.tar.bz2
wget
http://mafiascripts.net/ffmpeg/zlib-1.2.3.tar.bz2
wget
http://mafiascripts.net/ffmpeg/libwmf-0.2.8.3.tar.gz
wget
http://mafiascripts.net/ffmpeg/freetype-2.3.5.tar.bz2
wget
http://mafiascripts.net/ffmpeg/gd-2.0.35.tar.bz2
wget
http://mafiascripts.net/ffmpeg/ImageMagick-6.3.5-5.tar.bz2
Now we need to install them one by one but before we starting, you
need to
install following packages by inserting your linux CD or DVD in CD/DVD
drive and start package manager
install:
gcc
gcc++
libgcc
libgcc42
autoconf
automake
libtool
ruby
ruby-devel
ScSh:
h**p://
mafiascripts.net/ffmpeg/Screenshot.png
Now we are ready to install packages:
Note: we're now loged in /ffmpeg folder ( cd /root/ffmpeg/)
#############Install FreeType##########
Step 1 Extract freetype ( for all packages follow this steps )
tar -xvjf freetype-2.3.5.tar.bz2
Step 2 Login to folder that contain extracted files
cd /root/ffmpeg/freetype-*
Step 3 call configure command by type:
./configure
Step 4 wait until called command finish its job then call make by
type:
make
Step 5 wait until called command finish its job then call make install
by type:
make install
############Install Zlib#########
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvjf zlib-1.2.3.tar.bz2
cd zlib*
./configure
make
make install
#########Install LibPNG###########
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvjf libpng-1.2.18.tar.bz2
cd libpng-*
./configure
make
make install
##########Install LibJPEG##############
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvjf libjpeg-6b.tar.bz2
cd libjpeg-*
./configure
make
make install
###############Install LibWMF###################
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvzf libwmf-0.2.8.3.tar.gz
cd libwmf-0.2.8.3/
./configure
make
make install
##############Install GD###############
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvjf gd-2.0.35.tar.bz2
cd gd-2.0.35/
./configure --with-png=/usr/local/lib/ --with-jpeg=/usr/local/lib/
make
make install
############Install ImageMagick############
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvjf ImageMagick-6.3.5-5.tar.bz2
cd ImageMagick-6.3.5/
./configure
make
make install
###########Install FLVtool2############
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -zxvf flvtool2-1.0.6.tgz
cd flvtool2-*/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
ln -s /usr/bin/flvtool2 /usr/local/bin/flvtool2
Note:ln -s makes symbolic link (Shortcut in windows)
######################LAME##############################
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -zxvf lame-3.97.tar.gz
cd lame-3.97
./configure --enable-mp3x --enable-mp3rtp
make
make install
#################LibOGG#################
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvzf libogg-1.1.3.tar.gz
cd libogg-*
./configure
make
make install
##################Install AMRnb##############
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvjf amrnb-6.1.0.4.tar.bz2
cd amrnb-6.1.0.4/
./configure
make
make install
#################Install Essential#####################
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvjf essential-20071007.tar.bz2
chown -R root.root essential-20071007.tar.bz2
mkdir -pv /usr/local/lib/codecs/
cp -vrf essential-20071007/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
###Note: chown (change ownership) CP (copy) chmod (changemod)
###################Install LibVorbis####################
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvzf libvorbis-1.1.2.tar.gz
cd libvorbis-1.1.2
./configure
make
make install
##################Install MPlayer###################
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -jvxf MPlayer-1.0rc1.tar.bz2
cd MPlayer-1.0rc1/
./configure --with-codecsdir=/usr/local/lib/codecs/ --with-freetype-
config=/usr/include/freetype
make
make install
cp -vrf etc/codecs.conf /usr/local/etc/mplayer/
make clean
ln -s usr/local/bin/mplayer /usr/bin/mplayer
ln -s /usr/local/bin/mencoder /usr/bin/mencoder
#######################Install FFMPEG###################
Now back to ffmpeg folder ( cd /root/ffmpeg )
tar -xvzf ffmpeg_source.tar.gz
cd ffmpeg_source
tar xzf ffmpeg.tar.gz
cd ffmpeg/
./configure --enable-mp3lame --enable-shared --enable-libogg --enable-
vorbis --enable-amr_nb --enable-amr_wb --enable-amr_if2
make
make install
ln -s /usr/local/bin/ffmpeg /usr/bin/ffmpeg
/usr/bin/ffmpeg -v
###############REConfig Mplayer############
Now back to ffmpeg folder ( cd /root/ffmpeg )
cd MPlayer-1.0rc1/
./configure --with-codecsdir=/usr/local/lib/codecs/ --with-freetype-
config=/usr/include/freetype
make
make install
cp -vrf etc/codecs.conf /usr/local/etc/mplayer/
make clean
ln -s usr/local/bin/mplayer /usr/bin/mplayer
ln -s /usr/local/bin/mencoder /usr/bin/mencoder
###################Install FFMPEG-PHP#######################
tar -jxvf ffmpeg-php-0.5.1.tbz2
cd ffmpeg-php-*
/opt/lampp/bin/phpize
./configure --enable-shared --with-php-config=/opt/lampp/bin/php-
config --with-ffmpeg=/usr/local/bin/ffmpeg
make
make install
#################### END of installation ##################
now you need to open up your php.ini and add ffmpeg.so
if you have Gnome desktop simply call php.ini by call following
command
gedit /opt/lampp/etc/php.ini
or manully open it up. it's in /opt/lampp/etc/ folder
between line 516 - 527 add:
extension="ffmpeg.so"
line 386 add:
;extension_dir = /opt/lampp/lib/php/extensions/no-debug-non-
zts-20060613/
now should look like this:
; Directory in which the loadable extensions (modules) reside.
;extension_dir = /opt/lampp/lib/php/extensions/no-debug-non-
zts-20020429/
;extension_dir = /opt/lampp/lib/php/extensions/no-debug-non-
zts-20040412/
;extension_dir = /opt/lampp/lib/php/extensions/no-debug-non-
zts-20060613/
#if you have plan to use mail() function, you need to configure
sendmail too
#line 566 should look like this:( make sure you have installed
sendmail)
#in shell (terminal) write: whereis sendmail
#for call documentation call: man sendmail
; For Unix only. You may supply arguments as well (default: "sendmail -
t -i").
sendmail_path = /usr/sbin/sendmail -t
sendmail_from =
your....@gmail.com
change this valuse (read script installation document)
; Maximum allowed size for uploaded files. line 426
upload_max_filesize = 400M
; Maximum size of POST data that PHP will accept. line 332
post_max_size = 400M
max_execution_time = 8000 ; Maximum execution time of each script, in
seconds line 201
memory_limit = 100M ; Maximum amount of memory a script may consume
(8MB) line 202
; a value for this directive (e.g., output_buffering=4096). line 88
output_buffering = On
; After this number of seconds, stored data will be seen as 'garbage'
and
; cleaned up by the garbage collection process. line 788
session.gc_maxlifetime = 40000
Save changes and open up httpd.conf located in /opt/lampp/etc/
line 186
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
#XAMPP
#Order deny,allow
#Deny from all
</Directory>
Change it ot
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride All
#XAMPP
#Order deny,allow
#Deny from all
</Directory>
Line 334
ScriptAlias /cgi-bin/ "/opt/lampp/cgi-bin/"
change it to
ScriptAlias /cgi-bin/ "/opt/lampp/htdocs/cgi-bin/"
Line 350
<Directory "/opt/lampp/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
change it to
<Directory "/opt/lampp/htdocs/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksifOwnerMatch
Order allow,deny
Allow from all
</Directory>
Save changes and restart apache by call:
/opt/lampp/lampp restartapache
Now you have php5 configured with FFMPEG-PHP , yur server will support
ostube, clipshare phpmotion and etc..