Next Previous Contents

2. Installation

2.1 Intro

So, in many cases you will find MySQL, PHP and Apache right on the CD's of your distribution (Linux). So we think that in most of the cases you can easily obtain MySQL, PHP and Apache by using the particular benefits of your distro, like rpm, urpms,apt-get, rpm-find or whatever is supplied in your distro, check your documentation on how to use these tools.

If for some reason the above does not work, you can install from source and compile the software yourself, this is what we describe in this section. If you think there's a chance that you have MySQL, apache and PHP already installed, skip to '3. Putting LiHaLo to Work'. There we explain how to find out.

One of the greatest strengths of the *AMP systems is that they run on virtually every kind of computer-like system. Due to this hugh differences it is not trivial to write an installation manual for it. We try to explain it in a general way. So, if you have remarks, problems or contributions, please let us know.
We just wanted to supply some kind of a help for those who are not familiar with the 3 basic things needed in order to run LiHaLo. Lets's give it a try.

2.2 Installing a LAMP - system

Linux Apache MySQL PHP

2.2.1 The DB MySql

We suggest that you install the MySQL binary distribution for your platform, we had good experiences with it and it's certainly easier and faster than compiling the source distribution.

Download the binary distribution from MySQL's website: http://www.mysql.com/downloads/mysql-3.23.html, we're using the 3.23 series but we do not expect functional problems when using MySQL 4, but at the time of writing MySQL 4 was still in alpha phase. For a regular linux installation the donloaded file looks like this: mysql-3.23.51-pc-linux-gnu-i686.tar.gz. You will find very good installation instructions inside this tarball in the file INSTALL-BINARY. To get to this file:

# tar xvzf mysql-3.23.51-pc-linux-gnu-i686.tar.gz
# cd mysql-3.23.51-pc-linux-gnu-i686
# less INSTALL-BINARY

After you've read trough the first section of this file (Installing a MySQL Binary Distribution), MySQL should be up and running. You can verify your installation by running the command:

# mysqladmin version

On our test system this command returns this output:

# mysqladmin version
It outputs this information on my testmachine:
xenon:~# mysqladmin version
mysqladmin  Ver 8.23 Distrib 3.23.49, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          3.23.49-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/run/mysqld/mysqld.sock
Uptime:                 20 days 9 hours 37 min 2 sec

Threads: 12  Questions: 2064  Slow queries: 0  Opens: 78  Flush tables: 1  Open tables: 9 Queries per second avg: 0.001
The result will probably be similar on your system.

The RC3 on my PC (Mandrake 9.1) uses 4.0.11a-gamma and this gives no problems.
A download of a recent MySQL can be found at :
http://dev.mysql.com/downloads/mysql/4.1.html .

2.2.2 APACHE and PHP

Go get the Apache sourcecode from http://www.apache.org/dyn/closer.cgi/httpd/.

Go get the PHP sourcecode from http://www.php.net/downloads.php

Then surf to http://www.php.net/manual/en/install.apache.php, the PHP guys are doing a good job to explain how to install apache and PHP, don't mind when they tell about pgsql (PostgreSQL). we only use MySQL. They even have a section on Windows ..

If you manage to get up to here: Congrats! Your computer is now LiHaLo-ready !

2.3 Installing a WAMP - system

Windows Apache MySQL PHP

//You have no idea how much I love this ..... .oh boy .... Lucky me : there is still beer in the fridge.

The following guidelines are here to get a quick executable/usable installation.
Note : MySQL, Apache and PHP guys warn about usage of their software on Windows ... .
they all warn for either performance-,security- or stability problems ... The choice is up to you ..

Info
If the following is to complicated, I found a good installation-instruction for "WAMP". The URL is:
webthang.co.uk and following. I tried this and it worked.
If you get an error when you click "download here" , then go to internetmaster/tutefiles or go to the resp. website (apache.org, php.net or mysql.com ) and find the files there.

2.3.1 Installing APACHE

Alltough the PHP guys also describe the Windows way, they do it quite 'compact', so we give a more extensive description.

Download the actual Windows-version from http://www.apache.org and execute a standard installation under c:\apache . //seems almost to easy Afterwards you have to change the file "c:\apache\conf\httpd.conf" as follows :

You must open this file in a text-editor. 
A Linux-user is used to do so and is used to use things as Vi, GVIM, emacs, Joe .... .
Most Windows-users might have a problem here, inany case please use a text-editor, not a word processor. 
I am very sorry. Can't help you a lot with that, but of what i've heard : you can use NOTEPAD.
I've heard this is very good.
So you have to open "c:\apache\conf\httpd.conf" in Notepad.
Add the next rule:
Action application/x-httpd-php /cgi-bin/php.exe
so that PHP can interpret .*php-files. After that you install Apache as a service under NT, our you add the server to the directory:Windows-9x-Autostart. To check the installation, surf to http://localhost . This is the standardname of your pc. Instead of "localhost", you can also give the ip-address 127.0.0.1 Just in case Apache is not running, you must call it manualy in the DOS-prompt. Check the error-messages and read the manual for solving your problems.

NOTA. The above is a true for Win NT & 9x. For XP , I think it's best to have a look at :
windows.html .
So just read what you have to do. To have a basic install of Apache : don't do too much and choose the .msi download.
As of the day of this writhing, download apache_1.3.26-win32-x86.exe from http://www.apache.org/dist/httpd/binaries/win32/
Take care : this can change in the future, when there is a new release.

2.3.2 Adjusting PHP

If you downloaded the current Win32-binary PHP-file from http://www.php.net or http://www.php4win.de, then you can install it under: c:\php3 or c:\php.

Copy php.exe and the for MySQL-support required DLL's --e.g. the modules libmySQL.dll en php_mysql.dll (or others; see the PHP-documentation) to c:\Apache\cgi-bin\

In a parallel-installation of PHP3 & PHP4, you have to change first the name of the "php.exe" of the PHP 3-distribution to"php3.exe" and then cop this to c:\Apache\cgi-bin\ Copy the file "php(3).ini-dist" from the php-directory to the Windows-directory and change the name to "php(3).ini" . Open "php(3).ini" in e.g. Notepad. In the part called "Windows Extensions" you have to remove the commentmarks of the required and saved (and in cgi-bin saved Apachemodules) modules and at least set as value:

Extension=php(3)_mysql.dll
and in the part
MySQL]
mysql.default_port=3306
mysql_default_host=localhost
mysql.default_user=root
THe Mysql-library is already included in PHP4.

2.3.3 Installing MySQL

Download the newest version of MySQL-server for windows at : http://www.mysql.com. Install MySQL. Place MySQL as service under NT:
c:\mysql\bin\mysqld-install
or just add it to the Win 9x mysqld.exe Autostart-directory

this was fun, no ?

2.4 Installing a XAMP - system

Mac OSX Apache MySQL PHP

2.4.1 Installing APACHE

Mac OS X has Apache installed right from the start . Your DocumentRoot is in /Library/Webserver/Documents(/index.html)

You can configure your Apache as follows.
Maybe you need to give your password in the following examples. Or you may need to type sudo before the "vi" .
To start the server, click "Systems Preferences" ==> "Sharing".
When the "Sharing Panel" appears, select "Personal Web Sharing". Open a browser and type : http://localhost .
You should see some kind of a test/welcome page.

2.4.2 Installing PHP

The built-in Apache server is identified on your system as /usr/sbin/httpd. If you type /usr/sbin/httpd -V, you'll see the location of your default configuration file. Look for " -D SERVER_CONFIG_FILE="/etc/httpd/httpd.config " .
Do the following:
cd /etc/httpd
vi httpd.conf
To enaple PHP, you can remove the initial # from the following lines (in your httpd.config-file you just opened) : LoadModule php4_module
AddModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Press " Esc", then :wq .
Now STOP & RESTART Apache.

Create a PHP test-file and save it as Library/Webserver/test.php
It may look like this:
<html>
<body>
<? phpinfo()?>
</body>
</html>
Type "http://localhost/test.php" or http://127.0.0.1/test.php in your browser. You should see a table containing info about PHP.

2.4.3 Installing MySQL

And also for MySQL there is a solution. Go to macosx/unix_open_source and in the search-field type : MySQL . You will see a lot of downloads from which you can choose.
I know : I need to work this out more. Check our website for updates on this.
But most of all : www.entrophy.ch/software/macosx will get you where you want . Look for MySQL.
Next Previous Contents