Install and use a LAMP Server on Ubuntu

If you’ve been wishing that you could install a web server on your Ubuntu PC, you will be pleased to find out that you can install one very easily. All you will need is an Internet connection, and a bit of time. I hope this guide is helpful.

Here’s how to install: Open Synaptic Package Manager. Choose Edit > Mark Packages by Task. Scroll down and check the box beside “LAMP Server.” This will mark apache2, PHP, and MySQL for installation. Apply the changes. You will be prompted for some configuration information. That’s it! Punch http://localhost into your browser’s address box to test your installation.

Now I suppose you want to add some files. The server’s root directory is /var/www. If you navigate there with your file browser you will see the files, and even be able to open them with gedit, but you will not be able to edit them. This is because the directory is owned by root. There are multiple ways to work with this. You can run Nautilus from a terminal (sudo nautilus /var/www), or even create a launcher on your desktop (for this command: gksudo nautilus /var/www). However, you will probably find it more convenient to change the permissions of the /var/www folder. To do this, run Nautilus as root (sudo nautilus), navigate to the /var folder and right-click on the www folder. Give yourself access under the permissions tab. Now you can create and delete files without running your file browser as root.

Feedback welcome!

Oh by the way, you can access the server from another computer on the network as well, provided that your firewall allows incoming traffic onĀ  port 80. Just enter http://your-ip, where your-ip is the ip address of the computer that hosts the server.

44 thoughts on “Install and use a LAMP Server on Ubuntu

  1. Pingback: Victor

  2. Pingback: jon

  3. Pingback: Tracy

  4. Pingback: Lloyd

  5. Pingback: gerald

  6. Pingback: Gerald

  7. Pingback: roger

  8. Pingback: Vincent

  9. Pingback: Julius

  10. Pingback: chad

  11. Pingback: Terrance

  12. Pingback: Wayne

  13. Pingback: claude

  14. Pingback: trevor

  15. Pingback: James

  16. Pingback: Stephen

  17. Pingback: Maurice

  18. Pingback: franklin

  19. Pingback: Darrell

  20. Pingback: Albert

  21. Pingback: mathew

  22. Pingback: Dustin

  23. Pingback: Isaac

  24. Pingback: Luis

  25. Pingback: Henry

  26. Pingback: Paul

  27. Pingback: Shannon

  28. Pingback: floyd

  29. Pingback: Charlie

  30. Pingback: Johnny

  31. Pingback: Ronald

  32. Pingback: Darrell

  33. Pingback: Cory

  34. Pingback: lance

  35. Pingback: dale

  36. Pingback: Bill

  37. Pingback: Terry

  38. Pingback: bryan

  39. Pingback: Edward

  40. Pingback: Ben

  41. Pingback: tyler

  42. Pingback: Donald

  43. Pingback: roy

  44. Pingback: bruce

Comments are closed.