Easy,Simple Shell Script To Install LAMP Server Automatically in Ubuntu 11.10+

-Create a file lamp.sh

-Copy/Paste the following code in the file

#!/bin/bash
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install mysql-server mysql-client
sudo apt-get install php5
sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear 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
echo “Hurray ! Installation Finished ….!”

-Save the file

-Now run the file from CLI

sh lamp.sh

Note – You will be asked for input during installation. So keep an eye. And this script doesn’t install phpMyAdmin. Moreover you wont get mysql support in php, so you better read Getting MySql support in PHP5 from this tuorial .

  • http://www.debian-tutorials.com scorpio2k2

    this is not a script. it’s just a list of commands