Master/slave is the simplest and most straightforward of all replication scenarios, and also the basis of all other types of topology. The fundamental basis for the master/slave topology is that changes in the master are distributed and applied to the each of the configured slaves.
tpm includes a specific topology structure for the basic master/slave configuration, using the list of hosts and the master host definition to define the master/slave relationship. Before starting the installation, the prerequisites must have been completed (see Appendix B, Prerequisites). To create a master/slave using tpm:
./tools/tpm install alpha\ --topology=master-slave \ --master=host1 \ --replication-user=tungsten \ --replication-password=password \ --install-directory=/opt/continuent \ --members=host1,host2,host3 \ --start
The description of each of the options is shown below; click the icon to hide this detail:
Click the icon to show a detailed description of each argument.
Specifies which host will be the master.
The user name that will be used to apply replication changes to the database on slaves.
The password that will be used to apply replication changes to the database on slaves.
Directory where Tungsten Replication will be installed.
List of all the hosts within the cluster, including the master host.
Hosts in this list that do not appear in the
--master option will be configured as
Starts the service once installation is complete.
If the MySQL configuration file cannot be located, the
--datasource-mysql-conf option can be used
to specify it's location:
./tools/tpm install alpha\ --topology=master-slave \ --master=host1 \ --replication-user=tungsten \ --replication-password=password \ --datasource-mysql-conf=/etc/mysql/my.cnf \ --install-directory=/opt/continuent \ --members=host1,host2,host3 \ --start
If the installation process fails, check the output of the
/tmp/tungsten-configure.log file for
more information about the root cause.
Once the installation has been completed, the service will be started and ready to use. For information on checking the running service, see Section 3.1.1, “Monitoring a Master/Slave Dataservice”.
For information on starting and stopping Tungsten Replication see Section 2.5, “Starting and Stopping Tungsten Replicator”; configuring init scripts to startup and shutdown when the system boots and shuts down, see Section 2.6, “Configuring Startup on Boot”.