Diferencia entre revisiones de «Instalar Apache httpd»

De BandaAncha.st
Saltar a: navegación, buscar
(Compile-Time Configuration Issues)
(rev)
Línea 9: Línea 9:
  
 
===Compile-Time Configuration Issues===
 
===Compile-Time Configuration Issues===
[http://www.vinnieveritas.com]
+
 
 +
Añadimos
 +
 
 
  CFLAGS="-DDYNAMIC_MODULE_LIMIT=0"
 
  CFLAGS="-DDYNAMIC_MODULE_LIMIT=0"
  

Revisión del 11:16 15 dic 2007

Objetivos

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

Añadimos

CFLAGS="-DDYNAMIC_MODULE_LIMIT=0"

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.

--enable-nonportable-atomics

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).

Enlaces

Pasos previos

Me ha sido necesario:

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

Proceso

# 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
wget http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz
# descomprimo
tar -xzvf httpd-2.2.4.tar.gz
tar -zxvf mod_fcgid.2.1.tar.gz
tar -zxvf subversion-1.4.3.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
# configuro mod_dav_svn
cd subversion-1.4.3
./configure --prefix=/usr/local/subversion --with-apache=../httpd-2.2.4 # libtool: link: only absolute run-paths are allowed
cd ..
# configuramos fuentes
cd httpd-2.2.4
./buildconf
CFLAGS="-DDYNAMIC_MODULE_LIMIT=0" \
./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-dav \
	--enable-deflate \
	--enable-rewrite \
	--enable-dav_svn \
	--enable-fcgid
# compilamos
make
# instalamos
make install

Configuración