Revisión actual |
Tu texto |
Línea 1: |
Línea 1: |
− | ==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).
| |
− |
| |
− | * [http://httpd.apache.org/docs/2.2/en/misc/perf-tuning.html#compiletime Compile-Time Configuration Issues]
| |
− |
| |
− | ==Enlaces==
| |
− |
| |
| * [http://fastcgi.coremail.cn/ mod_fcgi] | | * [http://fastcgi.coremail.cn/ mod_fcgi] |
| * [http://httpd.apache.org/ Apache httpd] | | * [http://httpd.apache.org/ Apache httpd] |
− |
| |
− | ==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 | | # bajo lo necesario |
− | wget <nowiki>http://apache.rediris.es/httpd/httpd-2.2.4.tar.gz</nowiki> | + | wget http://apache.rediris.es/httpd/httpd-2.2.4.tar.gz |
− | wget <nowiki>http://kent.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.1.tar.gz</nowiki> | + | wget http://kent.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.1.tar.gz |
| # descomprimo | | # descomprimo |
− | tar -xzvf httpd-2.2.17.tar.gz | + | tar -xzvf httpd-2.2.4.tar.gz |
− | tar -zxvf mod_fcgid.2.3.6.tar.gz | + | tar -zxvf mod_fcgid.2.1.tar.gz |
− | # copio el directorio de mod_fcgid sobre el de apache para compilarlo estáticamente | + | # muevo los fuentes de mod_fcgi a modules de apache para compilarlo estáticamente |
− | cp -R mod_fcgid.2.3.6 httpd-2.2.17 | + | mv mod_fcgid.2.1 httpd-2.2.4/modules/mod_fcgid |
− | # configuramos fuentes | + | |
− | cd httpd-2.2.17 | + | cd httpd-2.2.4 |
− | ./buildconf
| |
− | | |
− | Sin soporte para módulos:
| |
− | | |
− | 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-deflate \
| |
− | --enable-expires \
| |
− | --enable-fcgid \
| |
− | --enable-headers \
| |
− | --enable-rewrite \
| |
− | --enable-ssl
| |
− | | |
− | # compilamos
| |
− | make
| |
− | # instalamos
| |
− | make install
| |
− | | |
− | Con soporte para módulos:
| |
− | | |
− | ./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-status \
| |
− | --disable-userdir \
| |
− | --enable-deflate \
| |
− | --enable-expires \
| |
− | --enable-fcgid \
| |
− | --enable-headers \
| |
− | --enable-rewrite \
| |
− | --enable-ssl
| |
− | | |
− | curl-devel.x86_64
| |
− | | |
− | LoadModule passenger_module /usr/local/ruby/lib/ruby/gems/1.8/gems/passenger-3.0.1/ext/apache2/mod_passenger.so
| |
− | PassengerRoot /usr/local/ruby/lib/ruby/gems/1.8/gems/passenger-3.0.1
| |
− | PassengerRuby /usr/local/ruby/bin/ruby
| |
− | | |
− | | |
− | <VirtualHost *:80>
| |
− | ServerName www.yourhost.com
| |
− | DocumentRoot /somewhere/public # <-- be sure to point to 'public'!
| |
− | <Directory /somewhere/public>
| |
− | AllowOverride all # <-- relax Apache security settings
| |
− | Options -MultiViews # <-- MultiViews must be turned off
| |
− | </Directory>
| |
− | </VirtualHost>
| |
− | | |
− | ==Configuración==
| |
− | | |
− | [[Categoría:Administración de un servidor dedicado]]
| |