• My Del.icio.us

Compilando o Varnish para Sistemas RedHat-Like

Command based post:

cd /tmp

# Obtendo o Varnish

wget http://www.varnish-software.com/sites/default/files/varnish-2.1.4.tar.gz

#  Descompacte

tar xvf varnish-2.1.4.tar.gz

# Copia o Varnish compactado para a pasta de source codes

cp varnish-2.1.4.tar.gz /usr/src/redhat/SOURCES

cd varnish-2.1.4/redhat

# Execute o rpmbuild para gerar os rpms

rpmbuild -ba varnish.spec

Depois de algum tempo, os arquivos RPMs serão gerados dentro de “/usr/src/redhat/RPMS” .

# Caso o erro abaixo ocorra

#### top  macro def tmpdir=/tmp/vtc.8121.6b8b4567
#### top  macro def bad_ip=10.255.255.255
#    top  TEST ././tests/v00017.vtc starting
#    top  TEST VCL compiler coverage test: vcc_acl.c
##   v1   Launch
###  v1   CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/vtc.8121.6b8b4567/v1 -p auto_restart=off -p syslog_cli_traffic=off -a ‘127.0.0.1:0’ -S /tmp/vtc.8121.6b8b4567/v1/_S -M 127.0.0.1:33398 -P /tmp/vtc.8121.6b8b4567/v1/varnishd.pid -sfile,/tmp/vtc.8121.6b8b4567/v1,10M
###  v1   debug| storage_file: filename: /tmp/vtc.8121.6b8b4567/v1/varnish.82E3U9 size 10 MB.\n
###  v1   debug| Creating new SHMFILE\n
###  v1   debug| Varnish on Linux,2.6.32-21-server,x86_64,-sfile,-hcritbit\n

###  v1   CLI RX  200
#### v1   CLI RX| VCL compiled.
—- v1   VCL compilation got 200 expected 106
#    top  RESETTING after ././tests/v00017.vtc
##   v1   Wait
##   v1   R 8140 Status: 0000
#    top  TEST ././tests/v00017.vtc FAILED
FAIL: ./tests/v00017.vtc

Verifique se o DNS configurado em seu sistema resolve o seguinte endereço:  “10.1.2.” , se o DNS resolver este endereço, então  altere seu servidor DNS para algo como “nameserver 8.8.8.8” e sucesso…

Fonte: http://www.varnish-cache.org/trac/ticket/692#comment:1