Installing LAMP Server in Ubuntu

At early days of my linux experience, I always thought “Linux Sucks”. I had been installing applications and doing all other stuffs by just clicking the two buttons on my mouse. And when I came to Linux (Ubuntu) I couldn’t to EVERYTHING in same way. I had to remember a lot of commands, scripts and configuration files and methods.

It sucks right? 
Hell No!!! its actually fast, efficient, scalable and awesome.

Today, I will discuss about running php, mysql application on ubuntu using LAMP (Linux, Apache, MySQL, PHP) Stack.

In windows most of us probably used XAMPP by bitnami. It also has its linux and OSX version, but lets not go to there, we will discuss on LAMP Stack where Apache, MySQL and PHP are installed seperately.

Follow the steps below to complete your installation.

Step 1:-
Install tasksel.
Use the following command to install it.
$ sudo apt-get install tasksel

Step 2:-
Install LAMP using Tasksel
After installing tasksel, let’s install LAMP setup on your Ubuntu.
$ sudo tasksel

Step 3:-
Now check on Lamp Server.

Hover on Lamp server and press Space key.

Step 4:-
Press Enter

Step 5:-
During installation, It will prompt for MySQL root account password. Enter your password and other details(if asked).

Hope your setup is completed.
check by visiting http://localhost on addressbar of your browser

If you want phpmyadmin for accessing a database, It’s simple as
$ sudo apt-get install PHPMyAdmin
and remember the password you entered. It will be your password for ‘root’ account. After all this restart apache with
$ sudo systemctl restart apache2.
And now you are ready to go with PHP / WordPress Development.
Your default localhost folder will be under /var/www/html/
Now make a file named phpinfo.php under /var/www/html/ and copy following code
Now visit http://localhost/phpinfo.php in your favorite web browser.

Bravo!!! You have now sucessfully install LAMP with phpmyadmin. 
I hope this helps you installing lamp server in Ubuntu.


Leave a Comment

Your email address will not be published. Required fields are marked *

Share This
Scroll to Top