How do you install MySQL ZRM?: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
No edit summary
 
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== Before installation: Do's/Don'ts ===
=== Before installation ===


* Check the version of your MySQL server. Verify that this is a version supported by Zmanda Recovery Manager for MySQL.
* Check the version of your MySQL server. Verify that this is a [[What_does_MySQL_ZRM_run_on?|version supported]] by Zmanda Recovery Manager for MySQL.


* MySQL ZRM requires MySQL client commands to be installed on the machine where MySQL ZRM is running. This is required even if MySQL ZRM is backing up remote MySQL servers. MySQL ZRM depends on the following commands:
* MySQL ZRM requires MySQL client commands to be installed on the machine where MySQL ZRM is running. These commands are required even if MySQL ZRM is backing up remote MySQL servers. MySQL ZRM depends on the following MySQL commands:
** mysqladmin
** mysqladmin
** mysqlshow
** mysqlhotcopy
** mysqlhotcopy
** mysqldump
** mysqldump
Line 11: Line 10:
** mysql
** mysql


* The MySQL client commands installed on MySQL ZRM machine should be compatible with the MySQL server. It is preferable to use the same version of MySQL on MySQL servers and on the MySQL ZRM machine (if they are running on different machines.
* The MySQL client commands installed on MySQL ZRM machine should be compatible with the MySQL server. It is preferable to use the same version of MySQL on MySQL servers and on the MySQL ZRM machine if they are running on different machines.
 
* If the MySQL client commands are installed in a different location (not ''/usr/bin/''), it is neccessary to configure the client command location and binary log location in [[mysql-zrm.conf]]. See [[How_do_I_configure_MySQL_ZRM%3F#MySQL_server_parameters|mysql-zrm.conf configuration]] section for details.


* Zmanda Recovery Manager for MySQL installation and configuration requires Unix superuser access. All MySQL ZRM commands are run as the superuser.
* Zmanda Recovery Manager for MySQL installation and configuration requires Unix superuser access. All MySQL ZRM commands are run as the superuser.


* Check the version of Perl and compatibility with MySQL database. MySQL Perl interfaces (DBD, DBI packages) are required for some backup methods.
* ZRM for MySQL requires Perl 5.8.7 or later version.
**DBD::mysql package must be installed on your system. Following command can install DBD::mysql package:
 
# perl -MCPAN -e 'install DBD::mysql'
* Two perl modules are necessary for MySQL ZRM installation
** perl-DBI
** perl-XML-Parser
 
These packages are available from [http://www.cpan.org CPAN] repository or as part of the distribution. Following command can install perl DBI module:


=== RPM installation ===
# perl -MCPAN -e 'install DBI'
 
=== Installation using RPM ===


* RPM installation must be done as superuser.
* RPM installation must be done as superuser.
* RPMs are available from [http://www.zmanda.com/downloads.html Zmanda downloads] page.
* RPMs are available from [http://www.zmanda.com/download-zrm.php Zmanda downloads] page.
  # rpm -ivh MySQL-zrm-1.0.2-1.noarch.rpm
** There are two ZRM for MySQL RPMs - ''MySQL-zrm'' RPM must be installed on the machine that will be doing backups and ''MySQL-zrm-socket-server'' RPM must be installed on the MySQL servers if the MySQL server is being backed up remotely using socket [[How_to_create_custom_plugins_for_MySQL_ZRM%3F#Copy_plugin|copy plugin]].
* Verify the RPM signatures. If the signatures are not correct, try downloading again.
* Install using rpm(8) command:
  # rpm -ivh MySQL-zrm-1.1.5-1.noarch.rpm
  Preparing...                ########################################### [100%]
  Preparing...                ########################################### [100%]
   1:MySQL-zrm              ########################################### [100%]
   1:MySQL-zrm              ########################################### [100%]
* Files are installed in following directories:
 
=== Installation using Debian packages ===
 
* Debian package installation must be done as superuser.
* Debian packages are available from [http://www.zmanda.com/download-zrm.php Zmanda downloads] page.
** There are two debian packages - ''mysql-zrm'' package must be installed on the machine that will be doing backups and ''mysql-zrm-socket-server'' package must be installed on the MySQL servers if the MySQL server is being backed up remotely using socket [[How_to_create_custom_plugins_for_MySQL_ZRM%3F#Copy_plugin|copy plugin]].
* Use MD5 checksums in the downloads page to check the integrity of the downloaded package before installation.
* Install using dpkg(8) command:
 
# dpkg -i mysql-zrm_1.1.3_all.deb
Unpacking mysql-zrm (from mysql-zrm_1.1.3_all.deb) ...
Setting up mysql-zrm (1.1.3) ...
 
: On MySQL servers, you can install mysql-zrm-socket-server debian package if socket copy plugin is being used.
  # dpkg -i mysql-zrm-socket-server_1.1.3_all.deb
  Unpacking mysql-zrm-socket-server (from
  mysql-zrm-socket-server_1.1.3_all.deb) ...
  Setting up mysql-zrm-socket-server (1.1.3) ...
  Reloading internet superserver: inetd.
 
=== Installation from tar ball ===
 
* Download the MySQL ZRM tar ball from [http://www.zmanda.com/download-zrm.php Zmanda downloads page].
* Verify the MD5 sum of the downloaded tar ball matches the information in the Zmanda downloads page.
* Uncompress the tar ball
  $ gunzip MySQL-zrm-1.1.5-release.tar.gz
* Extract the tar file using tar(1) command. The files will be extracted with respect to the current directory. Extracting the files in root (/) directory will install MySQL ZRM. The directory locations used by the tar ball may not be compatible with the distribution. So, extract the files in a temporary directory and move them to correct directory location. For locations where files are installed, see [[#Installation locations|installation locations]].
  $ mkdir /usr/tmp/MySQL-zrm; cd /usr/tmp/MySQL-zrm
  $ tar xvf MySQL-zrm-1.1.5-release.tar
 
=== Installation locations ===
 
Files are installed in following directories:


{| border=1 align="center"
{| border=1 align="center"
Line 33: Line 75:
|Executables||/usr/bin
|Executables||/usr/bin
|-
|-
|Man pages||/usr/share/man/man1
|Man pages||/usr/share/man/{man1,man5}
|-
|-
|Configuration files||/etc/mysql-zrm
|Configuration files||/etc/mysql-zrm
|-
|Plugin templates and samples || /usr/share/mysql-zrm/plugins
|-
|README files and docs || /usr/share/doc/MySQL-zrm-* or /usr/share/doc/mysql-zrm
|-
|-
|Libraries||/usr/lib/mysql-zrm
|Libraries||/usr/lib/mysql-zrm
Line 41: Line 87:
|Log files||/var/log/mysql-zrm
|Log files||/var/log/mysql-zrm
|-
|-
|Documentation||/usr/share/doc/MySQL-zrm-1.0
|Backup images || /var/lib/mysql-zrm
|}
|}


Line 50: Line 96:
* Use rpm(8) command  
* Use rpm(8) command  
  # rpm -qa | grep MySQL-zrm
  # rpm -qa | grep MySQL-zrm
  MySQL-zrm-1.0.2-1
  MySQL-zrm-1.1.3-1
   
   
* Check mysql-zrm man page
* Check mysql-zrm man page
  # man mysql-zrm
  # man mysql-zrm

Latest revision as of 19:07, 1 June 2007

Before installation

  • Check the version of your MySQL server. Verify that this is a version supported by Zmanda Recovery Manager for MySQL.
  • MySQL ZRM requires MySQL client commands to be installed on the machine where MySQL ZRM is running. These commands are required even if MySQL ZRM is backing up remote MySQL servers. MySQL ZRM depends on the following MySQL commands:
    • mysqladmin
    • mysqlhotcopy
    • mysqldump
    • mysqlbinlog
    • mysql
  • The MySQL client commands installed on MySQL ZRM machine should be compatible with the MySQL server. It is preferable to use the same version of MySQL on MySQL servers and on the MySQL ZRM machine if they are running on different machines.
  • If the MySQL client commands are installed in a different location (not /usr/bin/), it is neccessary to configure the client command location and binary log location in mysql-zrm.conf. See mysql-zrm.conf configuration section for details.
  • Zmanda Recovery Manager for MySQL installation and configuration requires Unix superuser access. All MySQL ZRM commands are run as the superuser.
  • ZRM for MySQL requires Perl 5.8.7 or later version.
  • Two perl modules are necessary for MySQL ZRM installation
    • perl-DBI
    • perl-XML-Parser

These packages are available from CPAN repository or as part of the distribution. Following command can install perl DBI module:

# perl -MCPAN -e 'install DBI'

Installation using RPM

  • RPM installation must be done as superuser.
  • RPMs are available from Zmanda downloads page.
    • There are two ZRM for MySQL RPMs - MySQL-zrm RPM must be installed on the machine that will be doing backups and MySQL-zrm-socket-server RPM must be installed on the MySQL servers if the MySQL server is being backed up remotely using socket copy plugin.
  • Verify the RPM signatures. If the signatures are not correct, try downloading again.
  • Install using rpm(8) command:
# rpm -ivh MySQL-zrm-1.1.5-1.noarch.rpm
Preparing...                ########################################### [100%]
  1:MySQL-zrm               ########################################### [100%]

Installation using Debian packages

  • Debian package installation must be done as superuser.
  • Debian packages are available from Zmanda downloads page.
    • There are two debian packages - mysql-zrm package must be installed on the machine that will be doing backups and mysql-zrm-socket-server package must be installed on the MySQL servers if the MySQL server is being backed up remotely using socket copy plugin.
  • Use MD5 checksums in the downloads page to check the integrity of the downloaded package before installation.
  • Install using dpkg(8) command:
# dpkg -i mysql-zrm_1.1.3_all.deb
Unpacking mysql-zrm (from mysql-zrm_1.1.3_all.deb) ...
Setting up mysql-zrm (1.1.3) ...
On MySQL servers, you can install mysql-zrm-socket-server debian package if socket copy plugin is being used.
 # dpkg -i mysql-zrm-socket-server_1.1.3_all.deb
 Unpacking mysql-zrm-socket-server (from
 mysql-zrm-socket-server_1.1.3_all.deb) ...
 Setting up mysql-zrm-socket-server (1.1.3) ...
 Reloading internet superserver: inetd.

Installation from tar ball

  • Download the MySQL ZRM tar ball from Zmanda downloads page.
  • Verify the MD5 sum of the downloaded tar ball matches the information in the Zmanda downloads page.
  • Uncompress the tar ball
 $ gunzip MySQL-zrm-1.1.5-release.tar.gz
  • Extract the tar file using tar(1) command. The files will be extracted with respect to the current directory. Extracting the files in root (/) directory will install MySQL ZRM. The directory locations used by the tar ball may not be compatible with the distribution. So, extract the files in a temporary directory and move them to correct directory location. For locations where files are installed, see installation locations.
 $ mkdir /usr/tmp/MySQL-zrm; cd /usr/tmp/MySQL-zrm
 $ tar xvf MySQL-zrm-1.1.5-release.tar

Installation locations

Files are installed in following directories:

Directory location
Executables /usr/bin
Man pages /usr/share/man/{man1,man5}
Configuration files /etc/mysql-zrm
Plugin templates and samples /usr/share/mysql-zrm/plugins
README files and docs /usr/share/doc/MySQL-zrm-* or /usr/share/doc/mysql-zrm
Libraries /usr/lib/mysql-zrm
Log files /var/log/mysql-zrm
Backup images /var/lib/mysql-zrm

Is MySQL ZRM really installed?

You can do one of the following to verify installation:

  • Use rpm(8) command
# rpm -qa | grep MySQL-zrm
MySQL-zrm-1.1.3-1

  • Check mysql-zrm man page
# man mysql-zrm