The following procedure will install a LAMP server with FFmpeg support for PHP on a Debian 6 machine
Install FFmpeg package
apt-get install ffmpeg
Install flvtool and yamdi
apt-get install flvtool2 yamdi
Install Mysql and other related packages needed
apt-get install mysql-server mysql-client libmysqlclient15-dev
Enter the root password when needed and confirm it.
Install Apache and other related packages
apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert
Install PHP and related packages
apt-get 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
Restart Apache
/etc/init.d/apache2 restart
Enable apache modules
a2enmod ssl
a2enmod rewrite
a2enmod include
Restart Apache
/etc/init.d/apache2 restart
Install FTP server
apt-get install proftpd ucf
During installation select “from inetd”.
apt-get install phpmyadmin
During installation select only apache2 and choose yes in next step. Enter the database administrator’s password and then create phpmyadmin’s password and confirm it.
Edit /etc/apache2/sites-available/default file so that it 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>
Restart Apache
/etc/init.d/apache2 restart
Install Alpine
apt-get install alpine
Test Alpine installation
alpine
Exit Alpine using quit
Install Ruby,Perl and other related packages
apt-get install ruby ri rdoc libmysql-ruby ruby1.8-dev irb1.8 libdbd-mysql-perl libdbi-perl libmysql-ruby1.8 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
Create soft links to executables
ln -s /usr/bin/gem1.8 /usr/local/bin/gem
ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
ln -s /usr/bin/ri1.8 /usr/local/bin/ri
ln -s /usr/bin/irb1.8 /usr/local/bin/irb
Install Rubygems
apt-get install rubygems1.8
Install Rails
gem install rails
Edit /etc/apache2/sites-enabled/000-default file so that it 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>
Restart apache
/etc/init.d/apache2 restart