Jump to content


[Howto] Apache2/PHP5/MySQL5 on Debian/Ubuntu

  • Please log in to reply
5 replies to this topic

#1 Daniel0

  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 06 September 2006 - 05:13 PM

Installing Apache2/PHP5/MySQL5 on Debian/Ubuntu

Note: Since Ubuntu is based on Debian I suppose that this will work on Debian too, but I haven't tested it.

This has been tested on Ubuntu 6.06.

You will have to do this as root or run the commands using sudo.

Installing the software

Run this command to install Apache2 PHP5 and MySQL5:
aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server

Set root password for MySQL

Run the following command on the terminal to get into MySQL's console:
mysql -u root

When in the console run this query:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_root_password');

to exit MySQL's console.

Starting Apache

Run this command as root to start Apache:
apache2ctl start

Replace start with stop or restart to stop or restart Apache, respectively.


Additionally you may run this command as root to install phpMyAdmin:
aptitude install phpmyadmin


Apache configuration file: /etc/apache2/apache2.conf
PHP configuration file: /etc/php5/apache2/php.ini
MySQL configuration file: /etc/mysql/my.cnf
Webpage root directory (what to call this?): /var/www

#2 redbullmarky

  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 14 September 2006 - 09:51 AM

Any chance you know how to do similar on FC2?

- PHP 4.3.10, MySQL 3
- Fedora Core 2
- Plesk 7.6/Virtuozzo Control Panel

need an update to:
- PHP 5, MySQL 4.1
without losing stuff like GD, etc.

Problem is I'm very very rusty when it comes to linux and i'll be damned if I can find a tutorial out there written in 'English'/laymans :)

"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#3 Daniel0

  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 21 September 2006 - 07:26 PM

No... sorry. But I found this on Google: http://www.lamphowto.com/

#4 maddog39

  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 29 October 2006 - 04:32 PM

Also Plesk and Virtuzzio are both commericial scripts, and therefore you need a pretty dang expensive license.

#5 deRusett

  • Members
  • PipPip
  • Member
  • 26 posts

Posted 08 January 2007 - 02:20 AM

This is using  Apache 2.0.5x,  php5.1.xx,

anyone got a debian/ubuntu  Apache2.2/php5.2 install running?

I get the Apache 2.2 like so
$wget -c http://apache.sunsit...pd-2.2.3.tar.gz
sudo apt-get install build-essential
$tar -xvf httpd-2.2.3.tar.gz
$cd httpd-2.2.3
sudo make install

but I can't seem to get php5.2 to install with it,  I get errors when I try to configure
and if I use apt-get install I notice that all of the apache related stuff is for 2.0.5x  and from what I read at apache.org  2.2 has changed the way apache does things over 2.0

#6 michaellunsford

  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 15 January 2007 - 06:18 PM

I to am trying to upgrade php (on FC2 Plesk server, no Virtuozzo) without succcess. So far, I've made PHP with zero options (so GD and mysql -- who knows what else -- aren't working). the lamphowto.com address makes its disclaimer on PHP5, and even if it didn't, it doesn't tell you how to do anything.

It'd be nice if I could at least get up to php 4.4. Anyone know how?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users