__ __ __ .-----.--.--.----.| |.--.--.--| |.-----.--| | .-----.----.-----. | -__|_ _| __|| || | | _ || -__| _ |__| _ | _| _ | |_____|__.__|____||__||_____|_____||_____|_____|__|_____|__| |___ | |_____| [ visit www.excluded.org ] LAMP Howto (c) 2003 by Takt translated 2005 by feylamia 1. Prerequisites 2. Getting the packages 3. Apache 4. MySQL 5. PHP 6. Closing words 7. Greetz 1. Prerequisites: To set up your LAMP, you need a running Linux system, which needs to have the "bison", "flex" and "rpm" packages installed. I won't discuss the matters of virtualhosts, ssl, and the like here, because this howto deals only with the installation. Obviously the installation needs to be done as root (uid 0). 2. Getting the packages Now we need: Apache 1.3.xx, PHP 4.x.x and MySQL 4.xx Firstly, we get the Apache source codes, which can be found on http://www.apache.org/. The filename should look somewhat like this: "apache_1.3.xx.tar.gz". Afterwards download PHP4 from http://www.php.net/, again take the source. The filename here should be in the form: "php-4.x.x.tar.gz". Lastly, we need MySQL. Here we should get the binary, because this will easen our installation a lot. This can be found at www.mysqlcom, the filename will roughly be: "MySQL-Max-4.x.xx-x.arch.rpm", where arch stands for your cpu architecture. 3. Apache: Now we change our working directory to the one, in that we saved the apache file. This file needs to be extracted with "tar xvfz apache_1.3.xx.tar.gz" (remember to edit the xx!). By using "cd apache_1.3.xx" we now hop into the directory containing the sources. In the next step we configure the compilation of Apache. This is usually done by entering "./configure --prefix=/usr/local/apache --enable-shared=max" into the console. Depending on your system hardware, this can take a few minutes. After it returns us to our shell, we compile and install the Apache by executing "make && make install" in the directory. When this process is finished, the Apache itself is ready to go. Now, on to MySQL: 4. Mysql: In step 2, we fetched the RPM installer of MySQL. Again we change our working directory to the dir where the file is located. Now we can install MySQL by executing "rpm -i MySQL-Max-4.x.xx.arch.rpm" (Attention! Again remember to edit the x'es accordingly!). To finish the installation of MySQL now run "mysql_install_db". After this, we start the MySQL daemon, by typing "safe_mysqld &". After its running, we set a mysql password for the root user with "mysqladmin -u root -p password 'new-password'". Now, the MySQL server can be used. 5. PHP: Again, change working directory to the files location. To unzip the source codes, use the already known "tar xvfz php-4.x.x.tar.gz", and edit the x'es. With "cd php", we now go into the source directory, and configure the compiling process with "/configure --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf --with-mysql". This too may take a few minutes, after which PHP is compiled and installed with "make && make install". Your LAMP should now be running and waiting for some work. If you encounter problems, you might have to edit the httpd.conf, more on this can be found in the conclusion. 6. Closing words: Sometimes, it can happen that your httpd.conf is missing the following lines: "AddType application/x-httpd-php .php .php4 .phtml" "AddType application/x-httpd-php-source .phps" If you can't find them in there, just enter them by hand at the end of your httpd.conf. (This file is usually located in /usr/local/apache/conf) Now everything should be working fine. If you have any more questions, just ask them in our forum. 7. Greetz: -l0om: "And you still got a coffee can from us!" :P -ProXy: "sounds wise..." -Sirius: "well, I dont have anything else to do..." -Chili: "are you female?" Copying permitted, changing prohibited! Takt