SQL nodes. On each of the machines designated to host 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 managing 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
symbolic link named mysql to the mysql directory. Note that the actual file and directory names
vary according to the MySQL Cluster version number.
shell cd /var/tmp
shell tar -C /usr/local -xzvf mysql-cluster-gpl-7.3.3-linux2.6.tar.gz
shell ln -s /usr/local/mysql-cluster-gpl-7.3.3-linux2.6-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 .
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 platform, such as update-rc.d on Debian.
Remember that the preceding steps must be repeated on each machine where an SQL node is to
reside.
... zobacz całą notatkę
Komentarze użytkowników (0)