I do this now and again, whenever I need to update an old system or set up a new one, and it's high time I recorded the options I use to do so.
First, download the most current httpd package from Apache's website.
Run the following command:
./configure --disable-autoindex --disable-userdir --enable-dav --enable-dav-fs --enable-dav-lock --enable-info --enable-auth-digest --enable-rewrite --enable-so --enable-ssl --enable-deflate --with-mpm=prefork
Then run make
, then make install
. I leave the base directory alone, I like it at /usr/local/apache2.
Get MySQL from MySQL.com and just run ./configure; make; make install
.
Get the latest version of PHP from PHP.net. Run the following command:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/conf --disable-short-tags --with-gd --with-zlib --with-bz2 --with-mysql=/usr --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-mcrypt=/usr/local --enable-mbstring --with-openssl --with-curl --enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared --with-pdo-mysql=shared,/usr