Elijah Lofgren

I follow Jesus Christ and enjoy reading, writing, helping people, and making websites. Who is Jesus?

My life mission: "Whatever you do, do it all for the glory of God." - 1 Corinthians 10:31

You are here: Home » Ubuntu and Kubuntu Tips » Web Dev Tips » Easily install a local testing LAMP server (Linux, Apache, MySQL, PHP, phpMyAdmin)

Easily install a local testing LAMP server (Linux, Apache, MySQL, PHP, phpMyAdmin)

Run the following command:

sudo apt-get install apache2 php5 php5-mysql php5-gd mysql-server phpmyadmin

To enable mod_rewrite run the following 2 commands:

sudo ln -sfn /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
sudo /etc/init.d/apache2 restart

Or instead you could use XAMPP.

Note: For some really odd reason, underscores will sometimes not work in MySQL database names (at least for me). I don't know why this is, but I just wanted to warn you because I wasted an hour of my time try trying to track down a problem that was caused by having underscores in the MySQL database name.