DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info) multi-install

Info Catalog (mysql.info) multi-hardware-software-network (mysql.info) multi-computer (mysql.info) multi-config
 
 15.3.2 Multi-Computer Installation
 ----------------------------------
 
 Each MySQL Cluster host computer running storage or SQL nodes must have
 installed on it a MySQL-max binary. For management nodes, it is not
 necessary to install the MySQL server binary, but you do have to
 install the MGM server daemon and client binaries (`ndb_mgmd' and
 `ndb_mgm', respectively). This section covers the steps necessary to
 install the correct binaries for each type of Cluster node.
 
 MySQL AB provides precompiled binaries that support Cluster, and there
 is generally no need to compile these yourself. Therefore, the first
 step in the installation process for each cluster host is to download
 the file `mysql-max-5.0.19-pc-linux-gnu-i686.tar.gz' from the MySQL
 downloads area (http://dev.mysql.com/downloads/). We assume that you
 have placed it in each machine's `/var/tmp' directory. (If you do
 require a custom binary, see  installing-source-tree.)
 
 RPMs are also available for both 32-bit and 64-bit Linux platforms; as
 of MySQL 4.1.10a, the `-max' binaries installed by the RPMs support the
 `NDBCluster' storage engine. If you choose to use these rather than the
 binary files, be aware that you must install _both_ the `-server' and
 `-max' packages on all machines that are to host cluster nodes. (See
  linux-rpm, for more information about installing MySQL using
 the RPMs.) After installing from RPM, you will still need to configure
 the cluster as discussed in  multi-config.
 
 * After completing the installation, do not yet start any of the
 binaries. We will show you how to do so following the configuration of
 all nodes.
 
 *Storage and SQL Node Installation*
 
 On each of the three machines designated to host storage or SQL nodes,
 perform the following steps as the system `root' user:
 
   1. Check your `/etc/passwd' and `/etc/group' files (or use whatever
      tools are provided by your operating system for manging users and
      groups) to see whether there is already a `mysql' group and `mysql'
      user on the system. Some OS distributions create these as part of
      the operating system installation process. If they are not already
      present, create a new `mysql' user group, and then add a `mysql'
      user to this group:
 
           shell> groupadd mysql
           shell> useradd -g mysql mysql
 
      The syntax for `useradd' and `groupadd' may differ slightly on
      different versions of Unix, or they may have different names such
      as `adduser' and `addgroup'.
 
   2. Change location to the directory containing the downloaded file,
      unpack the archive, and create a symlink to the `mysql-max'
      directory named `mysql'. Note that the actual file and directory
      names will vary according to the MySQL version number.
 
           shell> cd /var/tmp
           shell> tar -xzvf -C /usr/local mysql-max-5.0.19-pc-linux-gnu-i686.tar.gz
           shell> ln -s /usr/local/mysql-max-5.0.19-pc-linux-gnu-i686 /usr/local/mysql
 
   3. Change location to the `mysql' directory and run the supplied
      script for creating the system databases:
 
           shell> cd mysql
           shell> scripts/mysql_install_db --user=mysql
 
   4. Set the necessary permissions for the MySQL server and data
      directories:
 
           shell> chown -R root .
           shell> chown -R mysql data
           shell> chgrp -R mysql .
 
      Note that the data directory on each machine hosting a data node
      is `/usr/local/mysql/data'. We will use this piece of information
      when we configure the management node. (See  multi-config.)
 
   5. Copy the MySQL startup script to the appropriate directory, make
      it executable, and set it to start when the operating system is
      booted up:
 
           shell> cp support-files/mysql.server /etc/rc.d/init.d/
           shell> chmod +x /etc/rc.d/init.d/mysql.server
           shell> chkconfig --add mysql.server
 
      (The startup scripts directory may vary depending on your
      operating system and version -- for example, in some Linux
      distributions, it is `/etc/init.d'.)
 
      Here we use Red Hat's `chkconfig' for creating links to the
      startup scripts; use whatever means is appropriate for this
      purpose on your operating system and distribution, such as
      `update-rc.d' on Debian.
 
 Remember that the preceding steps must be performed separately for each
 machine on which a storage or SQL node is to reside.
 
 *Management Node Installation*
 
 Installation for the management (MGM) node does not require
 installation of the `mysqld' binary. Only the binaries for the MGM
 server and client are required, which can be found in the downloaded
 `-max' archive.  Again, we assume that you have placed this file in
 `/var/tmp'.
 
 As system `root' (that is, after using `sudo', `su root', or your
 system's equivalent for temporarily assuming the system administrator
 account's privileges), perform the following steps to install
 `ndb_mgmd' and `ndb_mgm' on the Cluster management node host:
 
   1. Change location to the `/var/tmp' directory, and extract the
      `ndb_mgm' and `ndb_mgmd' from the archive into a suitable
      directory such as `/usr/local':
 
           shell> cd /var/tmp
           shell> tar -zxvf mysql-max-5.0.19-pc-linux-gnu-i686.tar.gz \
                     /usr/local '*/bin/ndb_mgm*'
 
   2. Change location to the directory into which you unpacked the
      files, and then make both of them executable:
 
           shell> cd /usr/local
           shell> chmod +x ndb_mgm*
 
 In  multi-config, we will create and write configuration files
 for all of the nodes in our example Cluster.
 
Info Catalog (mysql.info) multi-hardware-software-network (mysql.info) multi-computer (mysql.info) multi-config
automatically generated byinfo2html