LAMP stands for Linux, Apache, mySQL and PHP (in some instances Python). Having LAMP helps you work with PHP based projects with great ease, as you have a local hosting to do all the stuff that otherwise would be done on a live environment. You can install WordPress, Drupal, Joomla or any other PHP based CMS; you can develop your own PHP projects and practice without having to be worried much about security or paying for hosting and domain names. It’s a must-have tool to have, if you are a web developer.
Now, you can download and install each of the LAMP components separately and configure them to work together, or you can install it as a package. Why waste time – just do the package. Follow those steps:
1. Get tasksel and install lamp-server. Don’t forget to add password to your database!
sudo apt-get install tasksel sudo tasksel install lamp-server
2. Add your username to the www-data group. Give rights to that group over the var/www folder (this is the folder where all your projects will be stored)
sudo chown -R www-data:www-data /var/www
3. Install phpMyAdmin to make managing your databases an effortless experience
sudo apt-get install phpmyadmin
When prompted – choose apache and don’t add a database password as you’ve already done it once.
3.1. If you type in localhost/phpmyadmin you should be able to see phpMyAdmin already. Find and edit the following file, if that’s not the case – /etc/apache2/apache2.conf Add this line somewhere at the bottom:
Restart apache after saving apache2.conf:
sudo /etc/init.d/apache2 restart
Lets say you’ve installed WordPress, but it keeps asking you for FTP credentials each time you want to update a plugin, install a theme or edit a file. Run this and change username with whatever username you use to log into the computer:
sudo chown -R www-data:www-data username