Monday, October 19, 2009

LAMP - Apache, PHP, MySQL Installation easy steps

Some like it binary some like compiling, I am amongst the compiling ones..
here are some easy steps that I usually follow to compile Apache, PHP to my machine.

  1. Apache
    1. ./configure --prefix=/usr/local/apache2.2.6 --enable-so --enable-proxy --enable-rewrite --enable-expires --enable-headers --enable-deflate --enable-ssl
    2. sudo make
    3. sudo make install
    4. cd /usr/local
    5. ln -s apache2.2.6 apache
    6. cd
  2. PHP
    1. ./configure --prefix=/usr/local/php5.2.5 --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-pdo-mysql --with-gd --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib
    2. sudo make
    3. sudo make install
    4. cd /usr/local
    5. ln -s php5.2.5 php
    6. Configure Apache httpd.conf for PHP module
      1. LoadModule php5_module modules/libphp5.so
      2. AddType application/x-httpd-php .php .phtml

No comments: