Como instalar el modulo mod_gzip para acelerar paginas en centos 4.4

Forums: 

he seguido al pie de la letra el proceso de compilacion pero me lanza error al momento de compilar, modifico el archivo Makefile ya que ubica mal el programa apxs pero la compilarlo me lanza estos errores
edito el Makefile ya que la ruta esta mal y no compila siquiera porque no encuentra el apxs

la version de apache es httpd-2.0.52-32.3.ent.centos4

originalmente trae esto
APXS?=/usr/local/sbin/apxs

yo lo cambio a esto
APXS?=/usr/sbin/apxs

y empieza a compilar pero con muchos errores.


[root@ns mod_gzip-1.3.26.1a]# make
/usr/sbin/apxs -Wc,-Wall,-O3,-fomit-frame-pointer,-pipe -c mod_gzip.c mod_gzip_debug.c mod_gzip_compress.c -o mod_gzip.so
/bin/sh /usr/lib/apr/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apr-0 -I/usr/include/httpd -Wall,-O3,-fomit-frame-pointer,-pipe -c -o mod_gzip.lo mod_gzip.c && touch mod_gzip.slo
apxs:Error: Command failed with rc=65536
mod_gzip.c:1855: error: dereferencing pointer to incomplete type
mod_gzip.c: In function `mod_gzip_do_command':
mod_gzip.c:2125: warning: implicit declaration of function `ap_table_set'
mod_gzip.c:2133: warning: implicit declaration of function `ap_soft_timeout'
mod_gzip.c:2153: warning: implicit declaration of function `ap_send_http_header'
mod_gzip.c:2157: warning: passing arg 1 of `ap_send_mmap' from incompatible pointer type
mod_gzip.c:2161: warning: implicit declaration of function `ap_kill_timeout'
mod_gzip.c: In function `mod_gzip_handler':
mod_gzip.c:2243: warning: assignment makes pointer from integer without a cast
mod_gzip.c:2310: error: request for member `module_index' in something not a structure or union
mod_gzip.c:2313: error: request for member `module_index' in something not a structure or union
mod_gzip.c:2329: warning: initialization makes pointer from integer without a cast
mod_gzip.c:2401: warning: assignment makes pointer from integer without a cast
mod_gzip.c:2535: warning: implicit declaration of function `ap_pstrcat'
mod_gzip.c:2535: warning: assignment makes pointer from integer without a cast
mod_gzip.c:2576: warning: assignment makes pointer from integer without a cast
mod_gzip.c:2579: warning: assignment makes pointer from integer without a cast
mod_gzip.c:2582: warning: assignment makes pointer from integer without a cast
mod_gzip.c:2671: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:2671: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:2698: warning: assignment makes pointer from integer without a cast
mod_gzip.c:2699: warning: assignment makes pointer from integer without a cast
mod_gzip.c:2700: warning: assignment makes pointer from integer without a cast
mod_gzip.c:2701: warning: assignment makes pointer from integer without a cast
mod_gzip.c: At top level:
mod_gzip.c:2845: error: syntax error before '*' token
mod_gzip.c: In function `mod_gzip_merge1':
mod_gzip.c:2894: error: `merged_config' undeclared (first use in this function)
mod_gzip.c:2895: error: `nconf' undeclared (first use in this function)
mod_gzip.c:2895: error: `pconf' undeclared (first use in this function)
mod_gzip.c:2923: error: `p' undeclared (first use in this function)
mod_gzip.c: At top level:
mod_gzip.c:4245: error: syntax error before '*' token
mod_gzip.c: In function `mod_gzip_create_dconfig':
mod_gzip.c:4250: error: `dirspec' undeclared (first use in this function)
mod_gzip.c:4252: warning: implicit declaration of function `ap_pcalloc'
mod_gzip.c:4252: error: `p' undeclared (first use in this function)
mod_gzip.c:4258: warning: assignment makes pointer from integer without a cast
mod_gzip.c: At top level:
mod_gzip.c:4266: error: syntax error before '*' token
mod_gzip.c: In function `mod_gzip_merge_dconfig':
mod_gzip.c:4271: error: `p' undeclared (first use in this function)
mod_gzip.c:4272: error: `parent_conf' undeclared (first use in this function)
mod_gzip.c:4273: error: `newloc_conf' undeclared (first use in this function)
mod_gzip.c:4276: error: `pool' undeclared (first use in this function)
mod_gzip.c:4276: error: syntax error before ')' token
mod_gzip.c:4272: warning: unused variable `pconf'
mod_gzip.c:4273: warning: unused variable `nconf'
mod_gzip.c: At top level:
mod_gzip.c:4286: error: syntax error before '*' token
mod_gzip.c: In function `mod_gzip_create_sconfig':
mod_gzip.c:4291: error: `s' undeclared (first use in this function)
mod_gzip.c:4297: error: `p' undeclared (first use in this function)
mod_gzip.c:4303: warning: assignment makes pointer from integer without a cast
mod_gzip.c: At top level:
mod_gzip.c:4311: error: syntax error before '*' token
mod_gzip.c: In function `mod_gzip_merge_sconfig':
mod_gzip.c:4316: error: `p' undeclared (first use in this function)
mod_gzip.c:4317: error: `parent_conf' undeclared (first use in this function)
mod_gzip.c:4318: error: `newloc_conf' undeclared (first use in this function)
mod_gzip.c:4321: error: `pool' undeclared (first use in this function)
mod_gzip.c:4321: error: syntax error before ')' token
mod_gzip.c:4317: warning: unused variable `pconf'
mod_gzip.c:4318: warning: unused variable `nconf'
mod_gzip.c: At top level:
mod_gzip.c:4332: warning: missing braces around initializer
mod_gzip.c:4332: warning: (near initialization for `mod_gzip_cmds[0].func')
mod_gzip.c:4332: warning: initialization from incompatible pointer type
mod_gzip.c:4334: warning: initialization from incompatible pointer type
mod_gzip.c:4336: warning: initialization from incompatible pointer type
mod_gzip.c:4338: warning: initialization from incompatible pointer type
mod_gzip.c:4340: warning: initialization from incompatible pointer type
mod_gzip.c:4342: warning: initialization from incompatible pointer type
mod_gzip.c:4344: warning: initialization from incompatible pointer type
mod_gzip.c:4346: warning: initialization from incompatible pointer type
mod_gzip.c:4348: warning: initialization from incompatible pointer type
mod_gzip.c:4350: warning: initialization from incompatible pointer type
mod_gzip.c:4352: warning: initialization from incompatible pointer type
mod_gzip.c:4355: warning: initialization from incompatible pointer type
mod_gzip.c:4359: warning: initialization from incompatible pointer type
mod_gzip.c:4362: warning: initialization from incompatible pointer type
mod_gzip.c:4364: warning: initialization from incompatible pointer type
mod_gzip.c:4366: warning: initialization from incompatible pointer type
mod_gzip.c:4368: warning: initialization from incompatible pointer type
mod_gzip.c:4373: error: syntax error before "mod_gzip_handlers"
mod_gzip.c:4373: warning: type defaults to `int' in declaration of `mod_gzip_handlers'
mod_gzip.c:4375: warning: braces around scalar initializer
mod_gzip.c:4375: warning: (near initialization for `mod_gzip_handlers[0]')
mod_gzip.c:4375: warning: initialization makes integer from pointer without a cast
mod_gzip.c:4375: warning: excess elements in scalar initializer
mod_gzip.c:4375: warning: (near initialization for `mod_gzip_handlers[0]')
mod_gzip.c:4376: warning: braces around scalar initializer
mod_gzip.c:4376: warning: (near initialization for `mod_gzip_handlers[1]')
mod_gzip.c:4376: warning: initialization makes integer from pointer without a cast
mod_gzip.c:4376: warning: excess elements in scalar initializer
mod_gzip.c:4376: warning: (near initialization for `mod_gzip_handlers[1]')
mod_gzip.c:4377: warning: braces around scalar initializer
mod_gzip.c:4377: warning: (near initialization for `mod_gzip_handlers[2]')
mod_gzip.c:4377: warning: initialization makes integer from pointer without a cast
mod_gzip.c:4377: warning: excess elements in scalar initializer
mod_gzip.c:4377: warning: (near initialization for `mod_gzip_handlers[2]')
mod_gzip.c:4378: warning: braces around scalar initializer
mod_gzip.c:4378: warning: (near initialization for `mod_gzip_handlers[3]')
mod_gzip.c:4378: warning: initialization makes integer from pointer without a cast
mod_gzip.c:4378: warning: excess elements in scalar initializer
mod_gzip.c:4378: warning: (near initialization for `mod_gzip_handlers[3]')
mod_gzip.c:4379: warning: braces around scalar initializer
mod_gzip.c:4379: warning: (near initialization for `mod_gzip_handlers[4]')
mod_gzip.c:4379: warning: initialization makes integer from pointer without a cast
mod_gzip.c:4380: warning: data definition has no type or storage class
mod_gzip.c:4382: error: syntax error before "gzip_module"
mod_gzip.c:4382: warning: type defaults to `int' in declaration of `gzip_module'
mod_gzip.c:4384: error: `this_module_needs_to_be_ported_to_apache_2_0' undeclared here (not in a function)
mod_gzip.c:4384: error: initializer element is not constant
mod_gzip.c:4384: error: (near initialization for `gzip_module')
mod_gzip.c:4385: warning: excess elements in scalar initializer
mod_gzip.c:4385: warning: (near initialization for `gzip_module')
mod_gzip.c:4386: warning: excess elements in scalar initializer
mod_gzip.c:4386: warning: (near initialization for `gzip_module')
mod_gzip.c:4387: warning: excess elements in scalar initializer
mod_gzip.c:4387: warning: (near initialization for `gzip_module')
mod_gzip.c:4388: warning: excess elements in scalar initializer
mod_gzip.c:4388: warning: (near initialization for `gzip_module')
mod_gzip.c:4389: warning: excess elements in scalar initializer
mod_gzip.c:4389: warning: (near initialization for `gzip_module')
mod_gzip.c:4390: warning: excess elements in scalar initializer
mod_gzip.c:4390: warning: (near initialization for `gzip_module')
mod_gzip.c:4391: warning: excess elements in scalar initializer
mod_gzip.c:4391: warning: (near initialization for `gzip_module')
mod_gzip.c:4392: warning: excess elements in scalar initializer
mod_gzip.c:4392: warning: (near initialization for `gzip_module')
mod_gzip.c:4393: warning: excess elements in scalar initializer
mod_gzip.c:4393: warning: (near initialization for `gzip_module')
mod_gzip.c:4394: warning: excess elements in scalar initializer
mod_gzip.c:4394: warning: (near initialization for `gzip_module')
mod_gzip.c:4395: warning: excess elements in scalar initializer
mod_gzip.c:4395: warning: (near initialization for `gzip_module')
mod_gzip.c:4396: warning: excess elements in scalar initializer
mod_gzip.c:4396: warning: (near initialization for `gzip_module')
mod_gzip.c:4397: warning: excess elements in scalar initializer
mod_gzip.c:4397: warning: (near initialization for `gzip_module')
mod_gzip.c:4398: warning: excess elements in scalar initializer
mod_gzip.c:4398: warning: (near initialization for `gzip_module')
mod_gzip.c:4399: warning: excess elements in scalar initializer
mod_gzip.c:4399: warning: (near initialization for `gzip_module')
mod_gzip.c:4400: warning: excess elements in scalar initializer
mod_gzip.c:4400: warning: (near initialization for `gzip_module')
mod_gzip.c:4401: warning: excess elements in scalar initializer
mod_gzip.c:4401: warning: (near initialization for `gzip_module')
mod_gzip.c:4403: warning: excess elements in scalar initializer
mod_gzip.c:4403: warning: (near initialization for `gzip_module')
mod_gzip.c:4403: warning: data definition has no type or storage class
mod_gzip.c: In function `mod_gzip_redir1_handler':
mod_gzip.c:4549: error: structure has no member named `client'
mod_gzip.c:4589: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:4589: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:4593: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:4593: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:4740: warning: implicit declaration of function `close'
mod_gzip.c:4740: error: structure has no member named `client'
mod_gzip.c:4748: error: structure has no member named `client'
mod_gzip.c:4779: error: structure has no member named `client'
mod_gzip.c:4780: error: structure has no member named `client'
mod_gzip.c: In function `mod_gzip_dyn1_getfdo1':
mod_gzip.c:4968: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast
mod_gzip.c:4968: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
mod_gzip.c:5017: error: structure has no member named `client'
mod_gzip.c: In function `mod_gzip_sendfile2':
mod_gzip.c:5386: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5386: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5389: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5389: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5419: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5419: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5422: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5422: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5445: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5445: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5448: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5448: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5712: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5712: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5714: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5714: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5735: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5735: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5737: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:5737: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:6002: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:6002: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:6002: error: too few arguments to function `ap_log_error'
mod_gzip.c:6006: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:6006: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:6009: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:6009: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:6009: error: too few arguments to function `ap_log_error'
mod_gzip.c:6012: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:6012: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:6012: error: too few arguments to function `ap_log_error'
mod_gzip.c:6015: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:6015: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:6015: error: too few arguments to function `ap_log_error'
mod_gzip.c:6059: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:6059: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:6062: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:6062: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:6097: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:6097: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:6097: error: too few arguments to function `ap_log_error'
mod_gzip.c:6606: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:6606: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:5262: warning: unused variable `ok_to_send'
mod_gzip.c: In function `mod_gzip_open_output_file':
mod_gzip.c:7063: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:7063: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c: In function `mod_gzip_flush_and_update_counts':
mod_gzip.c:7142: error: structure has no member named `client'
mod_gzip.c:7147: error: structure has no member named `client'
mod_gzip.c: In function `mod_gzip_encode_and_transmit':
mod_gzip.c:7812: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:7812: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:7812: warning: passing arg 6 of `ap_log_error' makes pointer from integer without a cast
mod_gzip.c:7906: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:7906: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c:7906: warning: passing arg 6 of `ap_log_error' makes pointer from integer without a cast
mod_gzip.c:8056: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:8056: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_gzip.c: At top level:
mod_gzip.c:8066: warning: "struct pool" declared inside parameter list
mod_gzip.c:8066: error: conflicting types for 'mod_gzip_generate_vary_header'
mod_gzip.h:358: error: previous declaration of 'mod_gzip_generate_vary_header' was here
mod_gzip.c:8066: error: conflicting types for 'mod_gzip_generate_vary_header'
mod_gzip.h:358: error: previous declaration of 'mod_gzip_generate_vary_header' was here
mod_gzip.c: In function `mod_gzip_generate_vary_header':
mod_gzip.c:8069: error: `array_header' undeclared (first use in this function)
mod_gzip.c:8069: error: `ary' undeclared (first use in this function)
mod_gzip.c:8069: warning: implicit declaration of function `ap_make_array'
mod_gzip.c:8071: warning: implicit declaration of function `ap_push_array'
mod_gzip.c:8071: warning: assignment makes pointer from integer without a cast
mod_gzip.c:8076: warning: assignment makes pointer from integer without a cast
mod_gzip.c:8080: warning: implicit declaration of function `ap_array_pstrcat'
mod_gzip.c:8080: warning: return makes pointer from integer without a cast
mod_gzip.c: In function `mod_gzip_compress_file':
mod_gzip.c:8110: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_gzip.c:8110: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
apxs:Error: Command failed with rc=65536

les agradeceria mucho si me dicen por donde anda el error. quiero acelerar las paginas de mi servidor ya que recientemente vi a un amigo por esta pagina que epe le recomendaba activar el modulo gzip y me intereso ver eso para mi servidor empece pero estoy trabado. gracias por sus sugerencias.

Apache2 tiene mod_deflate

Imagen de acl

Desde apache 2.0 se encuentra el modulo mod_deflate que hace precisamente eso. Busca si en el directorio de modulos de apache ya se encuentra este. Tambien prueba viendo con 'httpd -l' para ver si ya esta compilado dentro del nucleo de apache.

En efecto ya existe

Imagen de Epe

En efecto ya existe mod_deflate implicito sin tener que compilar nada nuevo ni viejo, después en el httpd.conf lo unico que hay es que agregar:


SetOutputFilter DEFLATE
DeflateFilterNote ratio
DeflateCompressionLevel 3
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary

y reiniciar.. eso comprimirá las páginas estáticas.. para comprimir las páginas de php es activar el zlib output compression en el /etc/php.ini

oh sí, compilar cosas fuera del esquema de rpm puede tener consecuencias muy muy malas.

Saludos
epe
--
EcuaLinux.com
Ecuador: +(593) 9 9246504, +(593) 2 3412402
USA: +1 305 359 4495, España: +34 91 7617884


Saludos
epe

EcuaLinux.com

+(593) 9 9924 6504

Servicios en Software Libre

Gracias por el dato

Imagen de juandarcy2000

ya habilite compresion y gracias por aclarar lo del mod_deflate, pero no sabia que habia que ponerle esos datos adicionales para activarlo y leyendo la info en el apache.org referente a mod_deflate si salian todos esos parametros pero la verdad estaba bien quemado con tanto leer, muchas gracias por la ayuda.