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 is into mobile apps and WordPress development at @speeqs. He loves mobile phones, #crazyideas, gadgets, technology startups.