Installing ffmpeg-php on an Ubuntu 9.04 LAMP Server 06/09/10

“Chokri”  commented on the post “Installing an Ubuntu Linux Hardy 8.04 LAMP and FFMpeg Server With a GUI – LAMP installation with cgi-bin“, asking:

“…I have trouble while installing ffmpeg-php, I downloaded the tar file but while executing the make command, I obtain stop, what to do?…”

Well, it’s been a while since I played with fmpeg-php on Ubuntu 8.04, I’ve since (about a year ago, if I remember correctly) installed a 9.04 based Ubuntu LAMP server. I use that server as a local development server for WordPress based sites, video based sites (as well as traditional xhtml sites), etc.

Without too much further (verbose) discussion, here are the commands I used to get this server up and running (on Ubuntu 9.04). It’s still working today, and is a great WordPress and site development environment!

Install your base 9.04 server as is. DO NOT select LAMP server install.

Then start getting the tools and services you need installed…

Video sites will need the flvtool (Yamdi is a Meta Data injector for flv):

sudo aptitude install flvtool2 yamdi

Of course we’ll need a database:

sudo aptitude install mysql-server mysql-client libmysqlclient15-dev

Now we need a web server:

sudo aptitude install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert

Let’s get some of the plugins we’ll need (ffmpeg-php, for example):

sudo aptitude install libapache2-mod-php5 libapache2-mod-ruby libapache2-mod-python php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-ffmpeg php5-json php5-ps

Let’s make sure we enable some mods:

sudo gedit /etc/apache2/mods-available/dir.conf

sudo a2enmod ssl
sudo a2enmod rewrite
# sudo a2enmod suexec
a2enmod include
# sudo a2enmod dav_fs
# sudo a2enmod dav

Save and close dir.conf

Then restart apache2:

sudo /etc/init.d/apache2 restart

FTP would be nice to install, that way I can work somewhere else and upload the files if I’m not local:

sudo aptitude install proftpd ucf gproftpd
(Install as inetd because we assume only a few connections a day, not high volume, in this scenario, running as inetd will save resources – Remember, this is just for dev work, it’s not a public production server!)

I want phpMyAdmin. Please give me a GUI to create databases and users / permissions, etc.:

sudo aptitude install phpmyadmin

Test server… Overrides are not working. Let’s edit the config:

sudo gedit /etc/apache2/sites-available/default

Ah ha! Default for AllowOverride is set as: none, should be set to: all

File now looks like this:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory “/var/www/cgi-bin”>
AllowOverride all
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

Alias /doc/ “/usr/share/doc/”
<Directory “/usr/share/doc/”>
Options Indexes MultiViews FollowSymLinks
AllowOverride all
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

Okay, we’ll have to reload Apache for the changes to take effect:

sudo /etc/init.d/apache2 restart

I’m getting a prompt that there is mail in the root mailbox, is there an easy way (for me) to quickly read it:

sudo aptitude install alpine

I want to read the message(s), I need to be root to do this:

sudo su

Start Apline and read messages:

alpine

Drop out of “root” after I’ve read messages and closed Alpine:

exit

Let’s get Ruby:

sudo aptitude install ruby ri rdoc libmysql-ruby ruby1.8-dev irb1.8 libdbd-mysql-perl libdbi-perl libmysql-ruby1.8 libmysqlclient15off libnet-daemon-perl libplrpc-perl libreadline-ruby1.8 libruby1.8 rdoc1.8 ri1.8 ruby1.8 irb libopenssl-ruby libopenssl-ruby1.8 libhtml-template-perl

…and do an upgrade…

sudo aptitude safe-upgrade

Create needed links:

sudo ln -s /usr/bin/gem1.8 /usr/local/bin/gem
sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri
sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb

Time for a Rails:

sudo gem install rails

Oops… access problems, maybe my default (I goofed in a couple edits)…

sudo gedit /etc/apache2/sites-enabled/000-default

File now reads as:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory “/var/www/cgi-bin”>
AllowOverride all
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

Alias /doc/ “/usr/share/doc/”
<Directory “/usr/share/doc/”>
Options Indexes MultiViews FollowSymLinks
AllowOverride all
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

Reload httpd:

sudo /etc/init.d/apache2 restart

Installed a WordPress site, and it’s working. nice!

Granted, the above is a fast rundown, I didn’t get into too much details (as this could easily extend to several pages worth of information). Above all, everyone’s server environment has different needs and tweaks – Experiment, have fun!

Care to Share?


You can leave a response, or trackback from your own site.

2 Responses to this article

 
nancy September 19, 2010 Reply

Hi ,
Can anyone help me find the reason why my usb ports keep failing ?
My optical mouse starts to blink , freezes and then goes off so i try another port and its OK for a while then the same happens again .
So i try another until all have been tried so reboot and everything works again .
Im not technically minded and have NO idea why this is happening .
Ive googled my problem but cannot seem to find a solution .
I would really appreciate some help on this as i cant find any anywhere .

Thanks

Nancy

 
UbuntuLinuxHelp March 29, 2011 Reply

@nancy

Hi, your comment is not related in any way (that I see) with installing ffmpeg-php on LAMP.

However, this almost sounds like a hardware issue. I’ve often experienced intermittent short-term failures in devices and integrated motherboard components; which are indicative that the device may fail.

You might want to ask someone local to you, to take a look and give you some help.

Also, another thing you may want to consider is the compatibility (in this case of your USB device) with the operating system.

I hope this somehow points you in the right direction. :)

Leave a Reply

close comment popup

Leave A Reply