I’ve noticed that a few of my readers are interested in learning how to install Apache on Ubuntu. I can relate to that (I forget how to get the job done from time to time), so I present to you: My Guide on how to install Apache, MySQL and PHP on a Ubuntu box (be it virtual or physical). I’ll also throw in three tools you could use to make the management of said server easier.
During this guide, I’ll be making the following assumptions:
- You’ve already installed Ubuntu (Or know how to).
- You know how to open the terminal, and use it (It’s simple, really).
- You’ve got access to the super-account and his cool moves.
- You’ve installed Ubuntu
- Optional: You’ve got a second PC / machine to verify access
Let’s get started
First of all, allow me to explain something: the installation of lamp-server we’re going to do, will install Apache2, MySQL and PHP5. So there’s no need to install any of those manually.
Bottom line: this guide will help you install Apache and more. (bonus!)
The steps to follow
- Open a Terminal window.
- Use the following command to start the installation:
- sudo tasksel install lamp-server
- note: Ubuntu is CaSe-SenSITIve; write the command above exactly as I did
Next thing on the list is to set the proper permissions for the folder where your websites will be stored (the folder /var/www). I’ve written the instructions in a previous post, so I’m not going to write it all again.
With that problem solved, you’re all good to go! Your APache server is running (or it should be); your MySQL server is ready and your PHP framework is compiled and installed. What are you waiting for? Start creating those websites!
There are some tools I always install on a new Ubuntu box, and you might find them usefull as well:
- phpmyadmin: must-have for any LAMP server. This tool allows you to manage your MySQL server, using any browser.
- phpmybackuppro: An usefull tool to create back-ups of said MySQL databases. Offers many great options.
- Webmin: a tool to manage or install various services on your UBuntu box. Can be downloaded or installed from the terminal command line.
You should be all set now. I hop that this how-to answered the question of some of you. If not, feel free to contact me (info can be found on this site) or leave a comment.
Categories: OS & Software