poniedziałek, 15 grudnia 2014

vmware-install.pl --SILENT

"vmware-install.pl --default EULA_AGREED=yes"

piątek, 12 grudnia 2014

NginX Cluster heartbeat

NginX


root@nginx1:~# cat /etc/nginx/nginx.conf
user www-data;
worker_processes 4;
pid /run/nginx.pid;

events {
        worker_connections 768;
        # multi_accept on;
}

http {
    upstream nginx {
#least_conn albo ip_hash;
        server web.ccc.ad;
        server web1.ccc.ad;
        server web2.ccc max_fails=3 fail_timeout=120;

    }

    server {
        listen 80;
        location / {
            proxy_pass http://web.ccc.ad;
        }

    }



Konfiguracja HA


root@nginx2:~# cat /etc/ha.d/ha.cf
use_logd on
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport 695
ucast eth0 192.168.163.7
ucast eth0 192.168.163.8
# bcast eth0
auto_failback on
node nginx1 nginx2
root@nginx1:~# cat /etc/ha.d/haresources
nginx2 10.1.9.15 nginx
root@nginx1:~# cat /etc/ha.d/authkeys
auth 1
1 sha1 7da31aaa10e9f1e018eac2dc9e097331e4d9db043rfd
root@nginx1:~# ls -l /etc/ha.d/
razem 32
-rw------- 1 root root 55 gru 11 18:47 authkeys
-rw-r--r-- 1 root root 173 gru 11 18:41 ha.cf
-rw-r--r-- 1 root root 23 gru 11 18:45 haresources
Pomoc:
- SSL: