Master Server:
Service IP:192.168.1.120(Used in trunk and device registration)
eth0:192.168.1.234,this is primary IP of master server
eth0:1 ,the name of virtual NIC,it is disabled default
eth1:10.10.10.1,the heartbeat IP
Slave Server:
eth0:192.168.1.235,this is primary IP of slave server
eth0:1 ,the name of virtual NIC,it is disabled default
eth1:10.10.10.2,the heartbeat IP
After configuring eth0 and IP,and finish the installation of AsterCC,then you should download and send the “identity” to support@astercc.org for obtaining authorization.We will configure them through clusterconf.sh. First,copy /opt/asterisk/scripts/astercc/clusterconf.sh to /root/ directory:
cp /opt/asterisk/scripts/astercc/clusterconf.sh /root
Enter /root directory,and execute commands as shown below:
cd /root
chmod +x ./clustercc.sh
Select the type of configuration,input 1 means “HA”,as shown below:
Configure detailed parameters after press “Enter”,as shown below:
Input the parameters as the prompt of script above,press “y” if you confirm parameters above.
You will enter next step after inputing “yes” and the password of slave server twice,script continues to run automatically:
When script is finished,you should log on and shutdown the slave server,execute commands as shown below:
shutdown -h now
Then reboot the slave server after the master server is restarted completely:
reboot
You should log on two database servers separately,execute commands as shown below:
show slave status \G;
As shown below,the values of “Slave_IO_Running” and “Slave_SQL_Running” are “Yes”,and others are normal.It is demonstrated the synchronization of database is available.
Execute commands as shown below on Master server first:
cd /home/ccsync && touch abcSecond verify the “abc” file existed or not(maybe there is a few seconds delay):
ls /home/ccsync/abcAnd then,remove the “abc” file on master server,and check the file whether was also deleted in slave server.
rm /home/ccsync/abcLast,test function of switching between master and slave server.
Master Server:
eth0:Service IP:192.168.1.234 (Used in trunk and device registration).
eth0:1,the name of virtual NIC,this is primary IP of master server:192.168.1.120(used in database and web services).
eth1:10.10.10.1,the heartbeat IP.
Slave Server(backup server):
eth0:192.168.1.235 ,the primary IP of PBX service(Used in trunk and device registration).
eth0:1,the name of virtual NIC,it is disabled default.
eth1:10.10.10.2,the heartbeat IP.
Cluster Server:
eth1:192.168.1.245,the NIC of PBX service.
After configuring eth0 and IP,and finish the installation of AsterCC,then you should download and send the “identity” to support@astercc.org for obtaining authorization.We will configure them through clusterconf.sh. First,copy /opt/asterisk/scripts/astercc/clusterconf.sh to /root/ directory:
cp /opt/asterisk/scripts/astercc/clusterconf.sh /root
Enter /root directory,and execute commands as shown below:
cd /root
chmod +x ./clustercc.sh
Select the type of configuration,input 2 means “Cluster”,as shown above:
Input the parameters as the prompt of script above,press “y” and “Enter” if you confirm parameters above.Then,you will enter next step after inputing “yes” and the password of slave server twice,script continues to run automatically:
Press “Enter” after inputting the possword of slave server twice,as shown below:
Press “Enter” to continue the configuration automatically,as shown below:
So far,the configuration is finished.After the script is finished,log and shutdown the slave server and other servers that running PBX service only:
shutdown -h now
And then reboot the master server,execute command as shown below:
reboot
Then poweron the slave server and other servers after the master server is restarted completely.
You should log on two database servers separately,execute commands as shown below:
show slave status \G;
As shown below,the values of “Slave_IO_Running” and “Slave_SQL_Running” are “Yes”,and others are normal.It is demonstrated the synchronization of database is available.
Execute commands as shown below on Master server first:
cd /home/ccsyncSecond verify that the “abc” existed or not(maybe there is a few seconds delay):
ls /home/ccsync/abcAnd then,remove the “abc” file on master server,and check the file whether was also deleted in slave server.
rm /home/ccsync/abcLast,test function of switching between master and slave server.