Jump to content

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


Recommended Posts

[b]Installing Apache2/PHP5/MySQL5 on Debian/Ubuntu[/b]

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 [tt]sudo[/tt].

[b]Installing the software[/b]

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

[b]Set root password for MySQL[/b]

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

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

Type [code]exit[/code] to exit MySQL's console.

[b]Starting Apache[/b]

Run this command as root to start Apache: [code]apache2ctl start[/code]

Replace [tt]start[/tt] with [tt]stop[/tt] or [tt]restart[/tt] to stop or restart Apache, respectively.

[b]phpMyAdmin[/b]

Additionally you may run this command as root to install phpMyAdmin: [code]aptitude install phpmyadmin[/code]

[b]Files/Directories:[/b]

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
Link to comment
Share on other sites

Daniel
Any chance you know how to do similar on FC2?

Current:
- 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 :)

Cheers
Mark
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
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.sunsite.ualberta.ca/httpd/httpd-2.2.3.tar.gz
sudo apt-get install build-essential
$tar -xvf httpd-2.2.3.tar.gz
$cd httpd-2.2.3
./configure
make
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
Link to comment
Share on other sites

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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.