2.3.1 Installing MySQL Cluster Manager on Unix Platforms

Installing the MySQL Cluster Manager agent on Linux and similar platforms can be accomplished using the following steps:

  1. Extract the MySQL Cluster Manager 1.2.4 program and other files from the distribution archive.  You must install a copy of MySQL Cluster Manager on each computer that you intend to use as a MySQL Cluster host. In other words, you need to install MySQL Cluster Manager on each host that is a member of a MySQL Cluster Manager management site. For each host, you should use the MySQL Cluster Manager build that matches that computer's operating system and processor architecture.

    On Linux systems, you can unpack the archive using the following command, using mcm-1.2.4-cluster-7.3.2-linux-sles11-x86-64bit.tar.gz as an example (the actual filename will vary according to the MySQL Cluster Manager build that you intend to deploy):

    shell> tar -zxvf mcm-1.2.4-cluster-7.3.2-linux-sles11-x86-64bit.tar.gz
    

    This command unpacks the archive into a directory having the same name as the archive, less the .tar.gz extension. Beginning with MySQL Cluster Manager 1.2.3, the archive contains a single directory at the top level, named mcm-1.2.4.

    Important

    Because the Solaris version of tar cannot handle long filenames correctly, the MySQL Cluster Manager program files may be corrupted if you try to use it to unpack the MySQL Cluster Manager archive. To get around this issue on Solaris operating systems, you should use GNU tar (gtar) rather than the default tar supplied with Solaris. On Solaris 10, gtar is often already installed in the /usr/sfw/bin directory, although the gtar executable may not be included in your path. If gtar is not present on your system, please consult the Solaris 10 system documentation for information on how to obtain and install it.

    In general, the location where you place the unpacked MySQL Cluster Manager directory and the name of this directory can be arbitrary. However, we recommend that you use a standard location for optional software, such as /opt on Linux systems, and that you name the directory using the 1.2.4 version number. (This facilitates subsequent upgrades.) On a typical Linux system you can accomplish this task like this:

    shell> mv mcm-1.2.4-cluster-7.3.2-linux-sles11-x86-64bit /opt/mcm-1.2.4
    

    In MySQL Cluster Manager 1.2.3 and later, you can instead do this:

    shell> cd mcm-1.2.4-cluster-7.3.2-linux-sles11-x86-64bit
    shell> mv mcm-1.2.4 /opt/mcm-1.2.4
    

    For ease of use, we recommend that you put the MySQL Cluster Manager files in the same directory on each host where you intend to run it.

Contents of the MySQL Cluster Manager Unix Distribution Archive.  If you change to the directory where you placed the extracted MySQL Cluster Manager archive and list the contents, you should see something similar to what is shown here:

shell> cd /opt/mcm-1.2.4
shell> ls
bin  cluster  etc  lib  libexec  licenses  share  var

These directories are described in the following table:

DirectoryContents
binMySQL Cluster Manager agent startup scripts
clusterContains the MySQL Cluster NDB 7.3.2 binary distribution
etcContains the agent configuration file (mcmd.ini)
etc/init.dInit scripts (not currently used)
lib and subdirectoriesLibraries needed to run the MySQL Cluster Manager agent
libexecMySQL Cluster Manager agent and client executables
licenses/lgplAn archive containing source code (including licensing and documentation), for glib 2.1
share/doc/mcmdREADME.txt file
varXML files containing information needed by MySQL Cluster Manager about processes, attributes, and command syntax

Normally, the only directories of those shown in the preceding table that you need be concerned with are the bin and etc directories.

For MySQL Cluster Manager 1.2.4 distributions that include MySQL Cluster, the complete MySQL Cluster NDB 7.3.2 binary distribution is included in the cluster directory. Within this directory, the layout of the MySQL Cluster distribution is the same as that of the standalone MySQL Cluster binary distribution. For example, MySQL Cluster binary programs such as ndb_mgmd, ndbd, ndbmtd, and ndb_mgm can be found in cluster/bin. For more information, see MySQL Installation Layout for Generic Unix/Linux Binary Package, and Installing a MySQL Cluster Binary Release on Linux, in the MySQL Manual.

If you wish to use the included MySQL Cluster software, it is recommended that you move the cluster directory and all its contents to a location outside the MySQL Cluster Manager installation directory, such as /opt/ndb-version. For example, on a Linux system, you can move the MySQL Cluster NDB 7.3.2 software that is bundled with MySQL Cluster Manager 1.2.4 to a suitable location by first navigating to the MySQL Cluster Manager installation directory and then using a shell command similar to what is shown here:

shell> mv cluster /opt/ndb-7.3.2
Note

The mcmd --bootstrap option uses the included MySQL Cluster binaries in the installation directory's cluster directory and does not work if they cannot be found there. To work around this issue, create a symbolic link to the correct directory in its place, like this:

shell> ln -s /opt/ndb-7.3.2 cluster

After doing this, you can use the mcm client commands add package and upgrade cluster to upgrade any desired cluster or clusters to the new MySQL Cluster software version.

The MySQL Cluster Manager agent by default writes its log file as mcmd.log in the installation directory. When the agent runs for the first time, it creates a directory where the agent stores its own configuration data; by default, this is /opt/mcm_data. (Prior to MySQL Cluster Manager 1.2.3, this was mcm_data in the MySQL Cluster Manager installation directory; see Bug #16521396.) The configuration data, log files, and data node file systems for a given MySQL Cluster under MySQL Cluster Manager control, and named cluster_name, can be found in clusters/cluster_name under this data directory (sometimes also known as the MySQL Cluster Manager data repository).

The location of the MySQL Cluster Manager agent configuration file, log file, and data directory can be controlled with mcmd startup options or by making changes in the agent configuration file. To simplify upgrades of MySQL Cluster Manager, we recommend that you change the data repository to a directory outside the MySQL Cluster Manager installation directory, such as /var/opt/mcm. See Section 2.4, “MySQL Cluster Manager Configuration File”, and Section 3.2, “Starting and Stopping the MySQL Cluster Manager Agent”, for more information.