HTML |
---|
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
...
Configuring for Master-Master Replication
1. Create two ProVision installs on two different servers. These servers can be bare metal or they can be VMs. These servers will be referred to as Rep1 and Rep2.
...
Info |
---|
Note: “name_of_database” is a placeholder for the name of the 6connect ProVision database. This is typically “provision” but may be different based on the choices made during installation. |
...
Info |
---|
Note: “name_of_database” is a placeholder for the name of the 6connect ProVision database. This is typically “provision” but may be different based on the choices made during installation. |
...
Info |
---|
Note: you will have to replace name_of_database with the 6connect ProVision database name chosen at install. |
25. While still in MySQL on Rep2, run the following commands:
...
To complete the test now use a web browser to navigate to the ProVision GUI on Rep2 and log in. This should again produce an equal increase in log counts on both servers.
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1. Create two ProVision installs on two different servers. These servers can be bare metal or they can be VMs. These servers will be referred to as Rep1 and Rep2. 2. Open an SSH session to Rep1. 3. Confirm that Rep1 can communicate with Rep2 by issuing a ping command:
If the Rep1 cannot communicate with Rep2, consult your system or network administrator to clear this error. 4. Stop the apache2 service using the following command:
5. Stop the software firewall, if running:
6. Run the following command to open the MySQL configuration file for editing:
7. Find the line that reads
And change it to:
If this line does not appear, add it to the bottom of the config. If you are using an IPv6-only network, use “::” instead of “0.0.0.0”.
8. Add the following lines to the end of the file, then save and exit:
9. Enter the following command:
If you get errors, please re-check that you have correctly entered the changes in step (6) to the configuration file, and that you have replaced the name of the database correctly. 10. Create a dump of the current database state:
You will need the MySQL root password for this, which can normally be found at: /var/www/html/data/globals.php
11. Transfer the database dump to Rep2, to serve as the basis for the synchronization:
You will have to customize this command with a user on Rep2 and its location. Ex:
12. Run the following command:
13. Restart MySQL:
14. While still on Rep1, log in to MySQL as root.
15. Run the following commands in MySQL:
16. Run the following command in MySQL:
Note the ‘File’ and ‘Position’ columns. These will be referred to later as “rep1_file” and “rep1_position.” 17. Leave the SSH session to Rep1 open. Open a second SSH session to Rep2. 18. Confirm that Rep2 can communicate with Rep1 by issuing a ping command:
If the Rep2 cannot communicate with Rep1, consult your system or network administrator to clear this error. 19. Stop the apache2 service using the following command:
20. Stop the software firewall, if running:
21. Run the following command to open the MySQL configuration file for editing:
22. Find the line that reads
And change it to:
If this line does not appear, add it to the bottom of the config. If you are using an IPv6-only network, use “::” instead of “0.0.0.0”.
23. Add the following lines to the end of the file, then save and exit:
24. Enter the following command:
If you get errors, please re-check that you have correctly entered the changes in step (20) to the configuration file, and that you have replaced the name of the database correctly. 25. Run the following command:
26. Restart MySQL:
27. Log into MySQL as root:
28. Run the following commands to delete the current ProVision database and to adopt the MySQL dump that was created in step (10). If this is not part of the initial ProVision configuration, ensure that proper backups have been made and are accessible before deleting.
29. While still in MySQL on Rep2, run the following commands:
30. Run the following command in MySQL:
Note the ‘file’ and ‘position’ columns. These will be referred to later as “rep2_file” and “rep2_position.” 31. On Rep1, in MySQL, run the following commands:
Note that you must replace “location_of_rep2”, “replication_password”, “rep2_file” and “rep2_position” with values from earlier in this tutorial. 32. On Rep2, in MySQL, run the following commands:
Note that you must replace “location_of_rep1”, “replication_password”, “rep1_file” and “rep1_position” with values from earlier in this tutorial. 33. On Rep1, exit MySQL and enter the following command:
34. On Rep2, exit MySQL and enter the following command:
35. Replication should now be running between the two servers. To test this, log in to MySQL on both Rep1 and Rep2, switch to the ProVision database on both and run the following command:
This will show how many logs are recorded by each database. Now, use a web browser to navigate to the ProVision GUI on Rep1 and log in. This will produce additional log events within the ProVision database. Return to MySQL on both databases and run the above command again. You should see two things: that the log count has increased, and that the count is identical on both servers. If this matches what you see then replication is working. To complete the test now use a web browser to navigate to the ProVision GUI on Rep2 and log in. This should again produce an equal increase in log counts on both servers. |
...