Navigate / search

How to install apache, mysql, php on ubuntu linux desktop

I use my Ubuntu installed Compaq C700 for PHP development (mostly WordPress related development). I thought I’d post some articles on my current setup for others. On this post, I thought I’d write about how to install the Apache web server, MySQL database server and the PHP scripting language on a Ubuntu desktop edition environment.

Apache, MySQL and PHP is not installed by default on the desktop edition of Ubuntu. Setting up a LAMP (Linux Apache MySQL PHP) environment on Ubuntu is actually quite easy. Just follow the steps on this post and you’d be able to have your own LAMP environment setup in no time.

In order to install Apache, MySQL and PHP on Ubuntu Linux desktop edition, you will need to use the Synaptic Package Manager program. To start up the Synaptic Package Manager, just click System | Administration | Synaptic Package Manager on your Ubuntu setup. It will ask for an administrator password, just type in your user password on the displayed prompt. Once you got it started you’ll see a screen like the one below:


One of the good features of the Synaptic Package Manager is that you can install a whole bunch of software that is grouped by task. You can access the feature from by navigating to Edit | Mark Packages by Task… And guess what, Synaptic is even has a Task Group labeled LAMP server which will install Apache, MySQL and PHP. Just click on the checkbox for the LAMP server and it will mark all the needed software for installation including any required dependencies.


After click on Ok and it will show a list of software that it will mark. Click on the “Mark” button.


Once you’ve done that, clicking on the “Apply button below the main menu will display the dialog box below. Just click on the “Apply” button on the dialog box to start the installation.


Once you click on “Apply”, the Synaptic Package Manager will start downloading the selected software from the Ubuntu repository.


After some time, it will then ask for a MySQL password. Type in the password you want to set for the MySQL root user which is the account for the super administrator for the MySQL server. It will display a similar dialog box asking for confirmation of the password. Just type in the same password to set it properly.


Once that’s done, it will continue downloading and installing the Apache, MySQL and PHP software on your Ubuntu desktop environment.


If everything was successful, just click on the “Close” button and exit the Synaptic Package Manager. That’s it you’re now ready to use your LAMP setup on your Ubuntu desktop computer.

To do a simple check if it’s working, fire-up your Firefox web browser and go to the URL http://localhost. It should show the page below:


You’re done. You can now start using LAMP to create your own web appications using PHP. Next time I’ll post how to install Eclipse and NetBeans on your Ubuntu desktop for using an IDE for PHP development. You can subscribe to my blog to get updated. Enjoy.

Update: If you want to use NetBeans, you can read about my post on how to install NetBeans in Ubuntu Linux.

Gerry Ilagan

Gerry Ilagan is into mobile apps and WordPress development at @speeqs. He loves to write about electronics, the Internet of Things, mobile phones, and #crazyideas.


Alan Pope

I notice that the screenshots on your blog posts are missing when I am reading it via an RSS reader. If I then visit your site and go back to my RSS reader I can then see them. This makes me wonder if you’re blocking gets for images where the referrer didn’t come from specific places?


Thank you for the tutorial. It helped me 🙂


I appreciated very much for your work and sharing info. The procedures or steps you have given are clearly .. and absolutely working very well for me. Once again, appreciated very…much.


Thanks for the help man. Very useful.


Good job. Thanks a lot.

David D. Barton, Jr.

Thank you. Very helpful. I look forward to reading your others.

K Latt

Thanks a lot for your post. It’s really useful one for me.

[…] How to Install Apache, MySql, Php on Ubuntu Linux Desktop There are several ways. But the most user friendly manner is to use the Synaptic Package manager. To start up the Synaptic Package Manager, just click System | Administration | Synaptic Package Manager on your Ubuntu setup. Navigate to Edit | Mark Packages by Task. Select the Task Group labeled LAMP server which will install Apache, MySQL and PHP.  To know the process in detail just visit this link. […]




Thanks for the Guide really helpful for me.

Well if possible Please add Command line version of guide explaining the way we can do this using terminal.

like “sudo apt-get install psql”



Package manager does not allow ‘by task’ in later releases. I used:
$ sudo apt-get update
$ sudo apt-get install lamp-server^
(note the ‘^’ is needed)

Leave a comment


email* (not published)


Blog Library