Ubuntu Apache-PHP-MySQL Server

Submitted by str on Mon, 06/13/2005 - 10:00

After the default normal installation of Ubuntu, here are the additional steps I need to do to have a Apache-PHP-MySQL Server.

  1. SSH Server (for my remote access)
    sudo apt-get install ssh
  2. Database Server
    sudo apt-get install mysql-server
  3. Apache HTTP Server
    sudo apt-get install apache2
  4. PHP for Apache HTTP Server
    sudo apt-get install php4
  5. MYSQL for Apache HTTP Server
    sudo apt-get install libapache2-mod-auth-mysql
    sudo apt-get install php4-mysql

Note: Ubuntu 10.04 LTS and 10.10 update is here.

Related Items

Comments

Installed Ubuntu on my USB key a while back. Thanks to your instructions, it is now a PHP/Mysql development environment. All I had to do was change "php4" references to "php5".

Anonymous (not verified)

Tue, 01/08/2008 - 06:48

The one here is better... shows you how to set up a SSL site as well.

http://blog.st0rage.org/

Eduardo (not verified)

Thu, 06/26/2008 - 00:26

It went all OK until I did something wrong. From then on, I can`t "sudo mysql" beacause it answers me "access denied for user 'root'@'localhost' USING PASSWORD: NO)". If I only "mysql" the answer is "access denied for user 'eduardo'@'localhost' USING PASSWORD: NO)".
Can you help me?
Thanks.

Bob Cahn (not verified)

Tue, 06/23/2009 - 04:45

Very good instructions. I replaced php4 with php5 everywhere since some of my scripts need that function.

/Bob Cahn

Thanks -- just what I was looking for. I'd skipped over the last two steps and firefox kept asking me if I wanted to open or save the php file...

m

Marco (not verified)

Thu, 09/24/2009 - 20:17

Don't forget to install the GD library:
sudo apt-get install phpX-gd

duytu_VietNam (not verified)

Tue, 06/08/2010 - 05:21

I used command:
sudo apt-get install php4 for Ubuntu 10.4 but it is fail.
duytu@home sudo apt-get install php4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Can you help me ?

Anonymous (not verified)

Fri, 11/26/2010 - 19:10

In reply to by Yi Yang (not verified)

I might suggest modifying the original posts to reflect PHP5 installation, as right now all of the copy paste links are for php4 ;). Otherwise very useful article.

Hey , you have a very good blog, its excellent information in its field. You have done a great job, keep doing it for to help, people like Myself.
natural pcos

Wägesystem (not verified)

Mon, 03/19/2012 - 10:41

With your web browser, go to the URI http://localhost : if you read "It works!", which is the content of the file /var/www/index.html , this proves Apache works.
Troubleshooting Apache
If you get this error:
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
then use a text editor such as "sudo nano" at the command line or "gksudo gedit" on the desktop to create a new file,

FiveFingers (not verified)

Wed, 03/28/2012 - 00:37

This article has great reference value, thank you very much for sharing, I would like to reproduced your article, so that more people would see it.

really interesting details you have written.
I will definitely be back again. thanks for posting .

pishwa (not verified)

Fri, 06/15/2012 - 22:30

Thank you for sharing excellent information. Your website is so cool. I'm impressed by the details that you have on this blog. It reveals how nicely you perceive this subject

SleepY (not verified)

Fri, 07/13/2012 - 10:49

I am really happy to read this post and it contains many useful facts. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement. Thanks for sharing with us.

Learner (not verified)

Fri, 07/03/2015 - 07:49

This site is a classic source of common questions I have in my mind. Thank you for this guide. Please keep posting.