Amazon EC2 Linux as LAMP server

The following guide demonstrates how to install

  • Apache Webserver 2.4
  • PHP 5.4
  • MySQL Server 5.5 (Community Edition)

Step 1: install Apache, PHP, MySQL

sudo yum install -y httpd24 php54 mysql55

Step 2: start the services

sudo /etc/init.d/mysqld start
sudo /etc/init.d/httpd start

Step 3: make sure services start after a reboot

sudo chkconfig --level 2345 httpd on
sudo chkconfig --level 2345 mysqld on

How-To Fedora 20 LAMP installation

This short guide demonstrates how to setup Fedora 20 as a LAMP server containing Apache, PHP, Perl, Python, Ruby and MySQL.

You have to use the shell and be able to use the machine as  root.

Start the terminal and run:

sudo yum install -y httpd php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-magickwand php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy php-mysql php-odbc php-pear php-mhash curl perl-libwww-perl ImageMagick libxml2 php-pecl-apc mysql mysql-server phpmyadmin ruby mod_python perl mod_perl perl-HTML-Parser perl-DBI perl-Net-DNS perl-Digest-SHA1 perl-ExtUtils-AutoInstall perl-NetAddr-IP perl-Archive-Tar

Second step is to enable the Apache Webserver and MySQL Database server;

sudo systemctl enable httpd.service sudo systemctl start httpd.service sudo systemctl enable mysqld.service sudo systemctl start mysqld.service sudo mysql_secure_installation

How-To Ubuntu LAMP Server

This short guide demonstrates how to install Apache, PHP, MySQL as LAMP server on Ubuntu Linux.

sudo apt-get install mysql-server mysql-client apache2 install php5 libapache2-mod-php5
sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo /etc/init.d/apache2 restart

Tools which can be installed are phpMyAdmin and MySQL Workbench:

sudo add-apt-repository ppa:olivier-berten/misc
sudo apt-get update
sudo apt-get install mysql-workbench-gpl phpmyadmin

Raspberry Pi LAMP installation guide

This short guide teaches you how to turn Raspberry Pi into a LAMP server.
LAMP stands for Linux Apache MySQL PHP

Step 1: update the Raspberry Pi OS to the latest version:

sudo apt-get install -y rpi-update
sudo apt-get update -y && sudo apt-get upgrade -y

Step 2: install Apache Webserver and create permissions:
sudo apt-get install -y apache2 apache2-utils
sudo groupadd -f -g33 www-data
sudo chown pi:www-data /var/www
sudo chmod 775 /var/www

Step 3: install PHP and mod_php
sudo apt-get install -y php5 libapache2-mod-php5 php5-common mysql-client
sudo apt-get install -y php-pear php5-mysql php5-curl php5-gd php5-idn php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-
recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json

Step 4: Install MySQL and phpMyAdmin

sudo apt-get install -y mysql-server
mysql_secure_installation
sudo apt-get install -y
phpmyadmin

How-To setup Fedora Linux 15 as LAMP server

Aside

This short guide demonstrates how to setup Fedora 15 as a LAMP server containing Apache, PHP, Perl, Python, Ruby and MySQL.

You have to use the shell and be able to use the machine as  root.


sudo
yum install httpd
yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
yum install mysql mysql-devel mysql-server
yum install httpd-devel ruby ruby-devel
yum install mod_python
yum install mod_perl
yum install perl-HTML-Parser perl-DBI perl-Net-DNS perl-Digest-SHA1 perl-ExtUtils-AutoInstall perl-NetAddr-IP perl-Archive-Tar
/etc/init.d/httpd restart

Now you have got everything installed except for mod_ruby – so that`s the next step;

cd /tmp
wget http://modruby.net/archive/mod_ruby-1.3.0.tar.gz
tar zxvf mod_ruby-1.3.0.tar.gz
cd mod_ruby-1.3.0/
./configure.rb --with-apr-includes=/usr/include/apr-1
make
make install
/etc/init.d/httpd restart

You have to add mod_ruby by hand in /etc/httpd/conf.d/ruby.conf
By adding

LoadModule ruby_module modules/mod_ruby.so