Diferencia entre revisiones de «Instalar Apache httpd»

De BandaAncha.EU
Saltar a: navegación, buscar
m (Revertidos los cambios de (disc.) a la última edición de Josh)
Línea 71: Línea 71:
  --enable-deflate \
  --enable-deflate \
  --enable-rewrite \
  --enable-rewrite \
  --enable-fcgid \
--enable-headers \
  # compilamos
  # compilamos

Revisión del 12:48 14 dic 2009


Compilar Apache httpd junto con mod_fcgi.

  • con optimizaciones para mejorar el rendimiento del binario
  • modulos compilados estáticamente
  • solo los modulos que se vayan a utilizar
  • con mod_fcgi compilado estáticamente

Compile-Time Configuration Issues



If you have no intention of using dynamically loaded modules (you probably don't if you're reading this and tuning your server for every last ounce of performance) then you should add -DDYNAMIC_MODULE_LIMIT=0 when building your server. This will save RAM that's allocated only for supporting dynamically loaded modules.


By default, APR uses mutex-based atomics on Linux. If you configure with --enable-nonportable-atomics, however, APR generates code that uses a 486 opcode for fast hardware compare-and-swap. This will result in more efficient atomic operations, but the resulting executable will run only on 486 and later chips (and not on 386).


Pasos previos

Me ha sido necesario:

yum install autoconf # para ./buildconf
yum install libtools # compilador C
yum install zlib.devel # utilizado por mod_deflate


# bajo lo necesario
wget http://apache.rediris.es/httpd/httpd-2.2.4.tar.gz
wget http://kent.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.1.tar.gz
# descomprimo
tar -xzvf httpd-2.2.4.tar.gz
tar -zxvf mod_fcgid.2.1.tar.gz
# muevo los fuentes de mod_fcgi a modules de apache para compilarlo estáticamente
mv mod_fcgid.2.1 httpd-2.2.4/modules/mod_fcgid
# configuramos fuentes
cd httpd-2.2.4
./configure \
	--enable-nonportable-atomics \
	--with-mpm=worker \
	--disable-actions \
	--disable-alias \
	--disable-asis \
	--disable-authn_default \
	--disable-authz_default \
	--disable-authz_groupfile \
	--disable-authz_host \
	--disable-autoindex \
	--disable-env \
	--disable-filter \
	--disable-imagemap \
	--disable-include \
	--disable-negotiation \
	--disable-setenvif \
	--disable-so \
	--disable-status \
	--disable-userdir \
	--enable-deflate \
	--enable-rewrite \
	--enable-fcgid \
	--enable-headers \
# compilamos
# instalamos
make install