setting up a mysql/php application on the own server;
the very basics, so localhost for now.
( a short summary, probably less confusing than all those commands, is at the bottom of this page).

1) apache2

apt-get install apache2

Thats it. You will find /var/www/index.html

If you want to run your page from your ~/public_html,
do

a2enmod userdir

as root and put the following in
/etc/apache2/sites-available default

    <Directory /home/*/public_html>
        Options +ExecCGI
        AddHandler cgi-script .cgi
    </Directory>

You can reach it via

http://localhost

in case you use /var/www/index.html
or:
http://locahost/~username

in case you use /home/username/public_html/index.html

For more tweaking or security read the docu.
This is just the very basic set-up.

2) wordpress

(or drupal, scuttle, ampache; the main procedure will be the same).

You will need php and mysql.
For mysql you will need the root password (not the root of your system,the root of mysql).
You will also need a password/username for each applications database.
Best might be to prepare at minimun two passwords before you start.

apt-get install apache2 php5 libapache2-mod-php5 php5-gd mysql-server php5-mysql libapache2-mod-auth-mysql

You will be asked for a mysql-root password.

Then install wordpress (drupal, scuttle, etc):

apt-get install wordpress

In case you plan to install more than one application, putting all at /var/www/content might be an idea:

mkdir /var/www/content

and link to it (here we link to /var/www/content, else use just /var/www)
ln -s /usr/share/wordpress /var/www/content/

and set up the database for mysql
(some applications will do that for you during installation, via debconf-common)

bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost
/etc/init.d/mysql restart

Go to:
http://localhost/content/wordpress 

and set it up (very easy)

Thats it.

3)Final Tips

To easily access your mysql/php applications from the web-browser,
in case you want to install several at all,
use for example this ,very basic, /var/www/index.html file

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title> Testing mysql/php </title>
        <!-- written by MKT; 2011, GPL-3 -->
    </head>

    <body>
            <h1>web applications</h1>

       <h2><a href="/content/plexus.pl/out.html">plexus</a></h2>
       <h2><a href="/cgi-bin/pyblosxom.cgi">pyblosxom</a></h2>
       <h2><a href="/content/scuttle/www">scuttle</a></h2>
       <h2><a href="/content/drupal7">drupal7</a></h2>
       <h2><a href="/cgi-bin/wordpress">wordpress</a></h2>
       <h2><a href="/content/tiddlywiki.html">tiddlywiki</a></h2>

    </body>
</html>

then go to localhost in your web-browser and click on the app you want to access
(you can remove all <a-references you ain’t use, sure).

If apps don’t set up a mysql database for you you can use phpmyadmin or the mysql-commands itself:
www.pantz.org/software/mysql/mysqlcomma...
(you will find the exact commands for wordpress in the German link).

If you don’t run it as a server, yet, but first try to learn it, you might:
/etc/init.d/apache2 stop
/etc/init.d/mysql stop
to save your RAM ressources. Start it when you need it.

help.ubuntu.com/community/WordPress
German (but lots of commands):
linux.slenmar.net/wp1.html

4) Short summary:

- install apache
- install mysql/php related applications; set the mysql-root password during that
- install the application you want (hopefully a mysql-database will be created during that); set the user+password for its database)
- ’ln -s ’ link it to /var/www or /var/www/content or /home/username/public_html/
- from your web-browser go to localhost/content/application-name and set it up (sometimes the setup.php is in a subdir of that. search it).
- done