Hace algún tiempo escribí una guia para [url=http://www.ecualug.org/2010/11/11/blog/razametal/la_combinaci%C3%B3n_ideal_debian_squid_thundercache_aptcacherng]instalar thudercache, apt-cacher-nt y squid en Debian[/url], algunos han tratado de seguir la guia para Centos sin lograr resultados positivos.
Aprovechando que tuve que instalar thundercache y squid en un servidor Centos, comparto con ustedes el procedimiento que he seguido para lograr la instalación:
Instalar dependencias:
yum install squid httpd php php-cli php-mysql php-gd sqlite sqlite-devel libstdc++-devel unzip bzip2
Descargar thundercache para nuestra aquitectura:
Link para 32 bits:
wget http://www.razametal.org/conf/thundercache/thunder3-32bits.tar.bz2 -O /usr/src/thunder3-32bits.tar.bz2
Link para 64 bits:
wget http://www.razametal.org/conf/thundercache/thunder3-64bits.tar.bz2 -O /usr/src/thunder3-64bits.tar.bz2
Instalacion de Thundercache:
cd /usr/src
tar -jvxf thunder3-32bits.tar.bz2
cp -R sbin/* /usr/local/sbin
chmod a+x /usr/local/sbin/thunder
mkdir /var/log/thunder
mkdir /var/tmp/thunder
mkdir /var/run/thunder
mkdir /var/cache/thunder
ln -s /var/cache/thunder /thunder
chmod a+rwx /var/log/thunder
chmod a+rwx /var/tmp/thunder
chmod a+rwx /var/run/thunder
chmod a+rwx /thunder
chown -R apache:apache /thunder/
chmod -R 777 /thunder/
umask 000 /thunder/
wget http://www.razametal.org/conf/thundercache/centos/thunder -O /etc/init.d/thunder
chmod a+x /etc/init.d/thunder
cp -R etc/thunder /etc/thunder
touch /etc/thunder/whitelist
touch /etc/thunder/blacklist
chkconfig thunder --level 345 on
ln -s /etc/thunder/thunder.php /var/www/html/thundercache.php
Instalamos la librería necesaria para ejecutar thundercache en Centos:
mkdir /usr/src/gcc
cd /usr/src/gcc
wget ftp://ftp.slackware.org.uk/slackware/slackware-12.1/slackware/d/gcc-g++-4.2.3-i486-1.tgz
tar zvxf gcc-g++-4.2.3-i486-1.tgz
cp /usr/src/gcc/usr/lib/libstdc++.so.6.0.9 /usr/lib/
rm -f /usr/lib/libstdc++.so.6
ln -s /usr/lib/libstdc++.so.6.0.9 /usr/lib/libstdc++.so.6
Configuramos squid:
sed -i 's/hierarchy\_stoplist\ cgi\-bin/\#hierarchy\_stoplist\ cgi\-bin/g' /etc/squid/squid.conf
sed -i 's/http_port\ 3128/\http_port\ 3128\ transparent/g' /etc/squid/squid.conf
sed -i 's/\#\ max_filedesc\ 1024/max_filedesc\ 4096/g' /etc/squid/squid.conf
Agregamos al final de /etc/squid/squid.conf :
# Thundercache 3
acl thunder_lst url_regex -i "/etc/thunder/thunder.lst"
cache deny thunder_lst
cache_peer 127.0.0.1 parent 8080 0 proxy-only no-digest
dead_peer_timeout 2 seconds
cache_peer_access 127.0.0.1 allow thunder_lst
cache_peer_access 127.0.0.1 deny all
# Fin de modificaciones para Thundercache
Redireccionamos con iptables las peticiones hacia thundercache, en este ejemplo asumo que eth1 es la interfaz de red interna:
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -A INPUT -i eth1 -p tcp --dport 3128 -j ACCEPT
/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp -s 0/0 --dport 80 -j REDIRECT --to-port 3128
Iniciamos los servicios:
service squid restart
service thunder start
Comentarios
Estimado Raza Cuando coloqué
Estimado Raza
Cuando coloqué el thunder me funco por 3 días sin problemas, luego me encuentro en la mañana y un vídeo que ya había visto se quedaba estancado en la primera 5ta parte de este. Como ya había usado el thuder en ubuntu se me ocurrió borrar el /var/spool/squid/ y un restart al squid y todo funco otra vez, viendo el access.log del thunder, veo infinidad de actividad, cosa rara que no hay usuarios conectados. tail -f /var/log/thuner/access.log, será algún ataque o es alguna vulnaveridad del thundercache:
1307388938.000 0 218.29.188.86 TCP_MISS/200 2105 GET http://ad.yieldmanager.com/imp? - NONE/- -
1307388939.000 0 184.95.47.173 TCP_MISS/200 7238 GET http://l1.login.vip.ukl.yahoo.com/? - NONE/- -
1307388939.000 0 218.29.188.92 TCP_MISS/200 4873 GET http://ad.yieldads.com/st? - NONE/- -
1307388939.000 0 218.29.188.92 TCP_MISS/302 493 GET http://ad.yieldmanager.com/imp? - NONE/- -
1307388939.000 0 112.84.228.192 TCP_MISS/500 658 GET http://www.traffic-network.net/network/net2.php? - NONE/- -
1307388939.000 0 121.112.71.197 TCP_MISS/302 80 GET http://ameblo.jp/monacomins/day-20101226.html - NONE/- -
1307388939.000 0 218.29.54.99 TCP_MISS/200 441 GET http://content.yieldmanager.com/ak/q.gif - NONE/- -
1307388939.000 0 218.29.54.99 TCP_MISS/200 4873 GET http://ad.yieldads.com/st? - NONE/- -
1307388939.000 0 218.29.188.221 TCP_MISS/200 1797 GET http://ad.yieldmanager.com/imp? - NONE/- -
1307388939.000 0 89.149.223.180 TCP_MISS/500 569 POST http://mpic.co.kr/bbs1/w1_dext_save.asp - NONE/- -
1307388940.000 0 78.159.112.200 TCP_MISS/200 147488 GET http://www.google.com/search? - NONE/- -
1307388940.000 0 93.127.77.151 TCP_MISS/200 23295 GET http://images.google.com/ - NONE/- -
1307388940.000 0 218.29.188.86 TCP_MISS/200 4905 GET http://content.yieldmanager.edgesuite.net/atoms/f5/04/e1/bc/f504e1bcd40e99f767b6a9e8b8a58833.gif - NONE/- -
1307388940.000 0 61.136.101.136 TCP_MISS/302 430 GET http://ad.yieldads.com/imp? - NONE/- -
1307388940.000 0 218.29.188.86 TCP_MISS/200 2105 GET http://ad.yieldmanager.com/imp? - NONE/- -
1307388940.000 0 88.81.49.189 TCP_MISS/200 2104 GET http://go.jetswap.com/autosurf? - NONE/- -
1307388940.000 0 222.186.11.90 TCP_MISS/404 615 GET http://celebritiescolumn.com/eminem/eminem-shouts-out-lil-wayne-during-scotland-gig/ - NONE/- -
1307388940.000 0 218.24.35.74 TCP_MISS/200 12135 GET http://content.yieldmanager.edgesuite.net/atoms/4e/31/d0/7f/4e31d07f56aa239766e07422130370a.gif - NONE/- -
1307388940.000 0 178.219.244.158 TCP_MISS/200 8686 GET http://xadvert.ru/tizernaya_reklama_v_internete.html - NONE/- -
1307388940.000 0 89.149.223.180 TCP_MISS/200 659 POST http://ncce15.ubu-confer.org/webboard/add_ans.php - NONE/- -
1307388941.000 0 218.29.188.92 TCP_MISS/200 4873 GET http://ad.yieldads.com/st? - NONE/- -
1307388941.000 0 61.136.101.67 TCP_MISS/200 343 GET http://content.yieldmanager.com/ak/q.gif - NONE/- -
1307388941.000 0 184.82.210.235 TCP_MISS/200 436 GET http://66.163.169.181/config/pwtoken_get? - NONE/- -
Es un centos 5.4 + iptables + squid-2.6.STABLE21-6.1.el5 + kernel-2.6.18-238.9.1.el5
Aunque pare el squid sigue lo mismo. Que podrá ser, con el thunder obviamente se paraliza.
Saludos
Vamos Ecuador, si se puede
Por defecto thunder escucha
Por defecto thunder escucha en todas las interfaces de red, puede ser que tu proxy este siendo utilizado por gente de otros lados, para evitarlo debes cambiar un parametro en /etc/thunder/thunder.conf llamado BIND el cual debe quedar de la siguiente manera:
BIND_ADDRESS 127.0.0.1
De esta manera thunder va a escuchar exclusivamente en 127.0.0.1.
-----
Visita este [url=http://www.sindominio.net/ayuda/preguntas-inteligentes.html]link[/url] :evil:
[img]http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg[/img]
(adsbygoogle = window.adsbygoogle || []).push({});
Que bien Raza. Lo detuvo al
Que bien Raza. Lo detuvo al instante, gracias.
Saludos
Vamos Ecuador, si se puede
Thunercache
Ya otra vez lo probe y sigue dando error y da el mismo problema en ubuntu como centos
razametal se me ocurre poner un servidor normal con squid htb y poner en otra server pero solo el thundercache
como se puede hacer para redireccionar el primer servidor q tiene squid mas htb al otro server q tiene thunder .........
me creo q esa es la solucion porque hace relajo con squid
te agradeceria si dieras ese aporte muy bueno
Thunder Cache
Excelente manual mi bro, felicitaciones y gracias por tomarte tu tiempo para publicar tu experiencia, lo tengo funcionando a 100% en mi CentOS 5.6 con squid 2.7
Thunder para Centos 5.5
Seguro pana q te funciona pruebalo bien porque aveces te funka 2 o un
dia......
borra el cache del internet explorer borra lo del /var/spool/squid/ rm -Rf *
y despues un reboot
para reiniciar y hay prueba de nuevo
para ver si funca jejejje
Para todos
Amigos disculpa q los desilucione pero yo e estado probando y porbando y no funka 100% porque al parecen el q hace relajo es el squid.....
averiguando mucho del thunder incluso a los q tienen con microtik le funciona muy bien y ellos tienen un server microtik mas otro server en debian y les funciona super q bien....
para q usamos server en linux la sulucion es q tengan 2 server independiente una para trabajar con squid + nateo + apache + htb..etc..........Yo ya estoy en eso ajala q hay si funcione.....
ayudar urgente
hola amigo pucha nose estoy como una semana tratando de instalar el thunder, llego a instalar todo pero el detalle esque cuando conf el redireccionamiento de mk abro cualqiuer pagina y me sale un mensaje qu dise asi
ERROR
The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: http://www.google.com.pe/
Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
Your cache administrator is webmaster.
nose que podria ser quisiera ver si por favor me pueden mandar un manual completo ya que en el esta descrito mas arriba hay codigos que no acepta como por ejemplo
este
yum install squid httpd php php-cli php-mysql php-gd sqlite sqlite-devel libstdc++-devel unzip bzip2
ve cuando pongo ese scrip no lo reconose les agredeseria un monton su ayuda ya que estoy como 3 semanas sin conseguir resultados y la verdad ya quiero desertar en el intento espero me ayuden
ahh otra cosa como configuro o instalo los plug ins para el thunder
saludos
Tienes que revisar el manual
Tienes que revisar el manual de configuración de squid, el mensaje ACCESS DENIED lo obtienes porque no tienes declarada y aprobada una ACL para tu red interna.
-----
Visita este [url=http://www.sindominio.net/ayuda/preguntas-inteligentes.html]link[/url] :evil:
[img]http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg[/img]
(adsbygoogle = window.adsbygoogle || []).push({});
thunder
Hola maestro raza..buen dia
ahora trato de configurar en CentOS5.6, y cuando levanto el servicio manda este orror
[root@firewall ~]# /etc/init.d/thunder restart
Shutting down Thunder ...
Starting Thunder ...
/etc/init.d/thunder: line 53: 9994 Violación de segmento $Thunder_BIN -c $Thunder_CONFIG
Ojala pues con esto ya pueda configurar este asunto.
gracias por adelantado.
Páginas