LAMP stands for Linux, Apache, MySQL, and PHP, is an open source software stack. LAMP is used to configure the web server and host the web content. This step-by-step tutorial shows how to setup LAMP and install Linux, Apache, MySQL, and PHP on Ubuntu. Linux part is taken care of by Ubuntu, you only need to install Apache, MySQL, and PHP.
Apache mod_rewrite Module is used to rewrite requested URLs on the fly. This mod_rewrite module provides an easy way to manipulate URLs using an unlimited number of rules. In order to work with URL rewrite rule, you need to enable mod_rewrite in Apache server. Follow this step-by-step guide to enable the mod_rewrite module in Apache server on Ubuntu.
GD library is used to create and manipulate image file in PHP. PHP will need to be compiled with GD library for image functions to work. If you are using Apache web server and want to install PHP GD support, then this tutorial will help you a lot. Ubuntu comes with the package called php5-gd to add GD support. You need to install php5-gd to Apache for using the image functions in PHP.