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:

synaptic-package-manager-01

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.

synaptic-package-manager-03

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

synaptic-package-manager-04

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.

synaptic-package-manager-06

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

synaptic-package-manager-07

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.

synaptic-package-manager-08

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

synaptic-password-manager-10

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:

lamp-working

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 mobile phones, #crazyideas, gadgets, technology startups.

Comments

Alan Pope
Reply

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?

Pergi
Reply

Thank you for the tutorial. It helped me 🙂

pye
Reply

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.
pye

Sandro
Reply

Thanks for the help man. Very useful.

Alexander
Reply

Good job. Thanks a lot.

David D. Barton, Jr.
Reply

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

K Latt
Reply

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. […]

asif
Reply

thanks

Kundan
Reply

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”

Thanks

PGavin
Reply

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

name*

email* (not published)

website