How To Install PHP, MySql, Apache (LAMP) in Ubuntu


How to Install PHP, MySql, Apache (LAMP) in Ubuntu. If you are using Linux or any Linux distros such as ( Ubuntu,Kubuntu etc) you can install LAMP easily using single command .

In this article i’m going to teach how to install PHP, MySql, Apache in Ubuntu using tasksel.

What is LAMP

LAMP is basically Linux,Apache,MySql and PHP used for web development. It’s a combination of operating system and open-source software stack . Similarly for Windows operating system WAMP is available and if you are using Mac os then install MAMP package.

How To Install PHP, MySql, Apache (LAMP) in Ubuntu

The most easy way to install Apache,PHP,Mysql on Ubuntu is to use tasksel. Tasksel groups some packages by tasks and offers the user an easy way to install the packages for that task.

Let’s install LAMP stack using tasksel.

Once it is install type tasksel command and press enter

Tasksel in Ubuntu

Install PHP – Tasksel Configuration Box

Subscribe Our Tutorials

Get Latest Updates on Facebook

It can open the package configuration box. Select the LAMP Server and then press ok.

Now you have done. It is one of the easiest and best way to install PHP,Apache,MySql in your system.

How to install phpMyAdmin on Ubuntu.

php.ini file path in Ubuntu.

How to Install LAMP Server on Ubuntu

We have learnt how to install LAMP using tasksel. You can also install LAMP bundle using terminal directly.

Update the apt-get package.

If you are not familiar about apt-get package manager in Ubuntu then read my previous tutorial about how to install,uninstall,remove,update package through apt-get package manager.

Install the LAMP server.

Now installation is done. You can check whether PHP has installed successfully or not by creating test.php file /var/www/html (which is the document root) directory.

In test.php file write following script.

Open this file in your web-browser by using this url (http://localhost/test.php). You’ll see PHP configuration file.

php.ini file location

php.ini File

If you are beginner learning Linux, check most useful linux command for beginners.

About WebRewrite

I am technology lover who loves to keep updated with latest technology. My interest field is Web Development.
Tagged , , . Bookmark the permalink.