Q & A : multi server : dns : primary & secondary

ehcp guest: sir how to make own dns to provide other website
ehcp guest: such ns1 ,ns2
ehcp guest: ip address and
ehcp guest: i want to make two server
ehcp guest: primary and secondry
ehcpdeveloper odaya giriş yaptı.
ehcp guest: hello
ehcpdeveloper: 1min
ehcp guest: ok
ehcpdeveloper: do you want to manage both server using ehcp ?
ehcp guest: yes
ehcpdeveloper: 2nd server will be only dns ?
ehcpdeveloper: secondary dns ?
ehcp guest: yes
ehcp guest: only backup of primary server
ehcpdeveloper: ok.
ehcpdeveloper: 1min
ehcp guest: for load balancing
ehcpdeveloper: 1st, have a look at http://www.ehcp.net/?q=node/540
ehcpdeveloper: ns1 and ns2 already setup by default, in ehcp.
ehcpdeveloper: on same server,
ehcpdeveloper: if you want to have a secondary serveri
ehcpdeveloper: then, follow this procedure:
ehcp guest: ok
ehcpdeveloper: on server 1 (s1): install ehcp normally,
ehcpdeveloper: s1: get into mysql, give ehcp user the right to connect from ip of server2 (s2)
ehcpdeveloper: that is, mysql ehcp user in s2 should be able to connect to mysql of s1
ehcpdeveloper: then, on s2:
ehcpdeveloper: install ehcp normally,
ehcp guest: yes
ehcpdeveloper: 1min
ehcpdeveloper: in ehcp dir, open config.php,
ehcpdeveloper: replace: $dbhost='localhost';
ehcpdeveloper: with: $dbhost='ip of S1';
ehcpdeveloper: restart ehcp in S2, watch logs, debug S2 as described in http://ehcp.net/?q=node/771
ehcpdeveloper: in this case: S2 will connect to S1 through mysql, to syncronize bind/dns with domains.
ehcpdeveloper: so, S2 will be a secondary dns server.
ehcpdeveloper: in fact, S2 will also setup directories of domains too.., i think.
ehcp guest: ok
ehcpdeveloper: we may need a few manual tuning too.
ehcpdeveloper: this is a manual procedure,
ehcp guest: what
ehcpdeveloper: ehcp has multi-server support only for mysql directly,
ehcpdeveloper: separate dns can only be setup this way, manually.. no automatic way, yet..
ehcp guest: ok
ehcpdeveloper: 1m
ehcp guest: and what to do sir
ehcpdeveloper: 1min
ehcp guest: ok
ehcpdeveloper: i will find and send you, 1min
ehcp guest: ok
ehcpdeveloper: i found this: (since this is a multi server special install):
ehcpdeveloper: in classapp.php,
ehcpdeveloper: just below function daemon(){ , above while loop,
ehcpdeveloper: $this->syncDomains();
ehcpdeveloper: add that,
ehcpdeveloper: and,
ehcpdeveloper: on crontab of S2:
ehcpdeveloper: add:
ehcpdeveloper: */20 * * * * /etc/init.d/ehcp restart
ehcpdeveloper: that will restart ehcp daemon on every 20 minutes,
ehcpdeveloper: so that, your S2 will sycnhronize itself from S1
ehcpdeveloper: if you want a smaller time interval, reduce that 20
ehcpdeveloper: ok ?
ehcp guest: ok
ehcpdeveloper: this is what i can remember.. maybe we may need some more fine tune.