informatica:linux:haproxy
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:haproxy [2012/10/11 11:13] – javi | informatica:linux:haproxy [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
http:// | http:// | ||
+ | |||
===== Instalacion ===== | ===== Instalacion ===== | ||
+ | |||
+ | ==== Paquete debian ==== | ||
sudo aptitude update; sudo aptitude install haproxy | sudo aptitude update; sudo aptitude install haproxy | ||
Line 11: | Line 14: | ||
+ | ==== Fuentes ==== | ||
+ | |||
+ | Importante para obtener soporte SSL | ||
+ | |||
+ | 1. (Opcional) Instalar dependencias: | ||
+ | |||
+ | sudo aptitude update; sudo aptitude install build-essential libpcre3-dev libssl-dev | ||
+ | |||
+ | 2. Descargar: | ||
+ | |||
+ | cd /usr/local; sudo wget -c --tries=0 http:// | ||
+ | |||
+ | 3. Descomprimir | ||
+ | |||
+ | sudo tar xvfz haproxy-1.5-dev15.tar.gz; | ||
+ | |||
+ | 4. Compilar: | ||
+ | cd / | ||
+ | sudo make install | ||
===== Config ===== | ===== Config ===== | ||
Line 154: | Line 176: | ||
} | } | ||
</ | </ | ||
+ | |||
Line 187: | Line 210: | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== Estadisticas ===== | ||
+ | |||
+ | 1. Habilitar estadisticas. TODO: revisar config y hacer lo mismo a traves de peticiones HTTP en lugar de socket | ||
+ | |||
+ | sudo vim / | ||
+ | |||
+ | Y anyadir/ | ||
+ | |||
+ | < | ||
+ | global | ||
+ | stats socket / | ||
+ | </ | ||
+ | |||
+ | 2. Reiniciar haproxy | ||
+ | |||
+ | sudo / | ||
+ | |||
+ | 3. Instalar socat | ||
+ | |||
+ | sudo aptitude update; sudo aptitude install socat | ||
+ | |||
+ | 4. Convertirse en root y probar comandos: | ||
+ | |||
+ | clear;echo "show stat" | socat unix-connect:/ | ||
+ | |||
+ | Listado completo de comandos en la seccion '9.2. Unix Socket commands' | ||
+ | |||
+ | ==== Deshabilitar/ | ||
+ | |||
+ | Requiere tener las estadisticas habilitadas y ser root. | ||
+ | |||
+ | **Deshabilitar**: | ||
+ | |||
+ | clear;echo " | ||
+ | |||
+ | **Habilitar**: | ||
+ | |||
+ | clear;echo " | ||
informatica/linux/haproxy.1349953992.txt.gz · Last modified: 2015/04/13 20:19 (external edit)