您的位置:时时app平台注册网站 > 时时app平台注册网站 > RHEL 5.7 使用rpm安装XtraBackup问题总结【时时app平台

RHEL 5.7 使用rpm安装XtraBackup问题总结【时时app平台

2019-10-14 20:00

/usr/share/man/man1/mysql_waitpid.1.gz

  file /usr/bin/msql2mysql from install of mysql-5.0.77-4.el5_6.6.x86_64 conflicts with file from package MySQL-client-advanced-5.6.20-1.rhel5.x86_64

 

 

/etc/init.d/mysql

[root@DB-Server tmp]#yum -y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl-DBD-MySQL

 

  file /usr/bin/mysql_find_rows from install of mysql-5.0.77-4.el5_6.6.x86_64 conflicts with file from package MySQL-client-advanced-5.6.20-1.rhel5.x86_64

在MySQL的官方文档,你可以看到RPM包所在的安装目录。我们使用rpm -ql 对比验证了一下,基本都OK,但是很奇怪的是,在上面这个版本中,我没有找到/etc/my.cnf,而是/usr/my.cnf

时时app平台注册网站 1

时时app平台注册网站 2

 

 

[root@DB-Server tmp]# yum -y install libev.x86_64

Loaded plugins: product-id, security, subscription-manager

Updating Red Hat repositories.

Setting up Install Process

No package libev.x86_64 available.

Nothing to do

 

 

[root@DB-Server tmp]# rpm -ivh libev-4.15-1.el5.rf.x86_64.rpm 

warning: libev-4.15-1.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6

Preparing...                ########################################### [100%]

   1:libev                  ########################################### [100%]

[root@DB-Server tmp]# yum list | grep "perl-DBD-MySQL"

perl-DBD-MySQL.x86_64                      3.0007-2.el5                media   

[root@DB-Server tmp]# yum install perl-DBD-MySQL

那么我们可以使用“rpm -ql  包名”来查看具体的安装路径。如下所示:

  file /usr/bin/mysqlaccess from install of mysql-5.0.77-4.el5_6.6.x86_64 conflicts with file from package MySQL-client-advanced-5.6.20-1.rhel5.x86_64

 

在Red Hat Enterprise Linux Server release 5.7 (Tikanga)上使用RPM方式安装Percona Xtrabackup 2.4.6时遇到了一些问题,特意总结在此。

Files or Resources

Location

Client programs and scripts

/usr/bin

mysqld server

/usr/sbin

Configuration file

/etc/my.cnf

Data directory

/var/lib/mysql

Error log file

For RHEL, Oracle Linux, CentOS or Fedora platforms: /var/log/mysqld.log

For SLES: /var/log/mysql/mysqld.log

Value of secure_file_priv

/var/lib/mysql-files

System V init script

For RHEL, Oracle Linux, CentOS or Fedora platforms: /etc/init.d/mysqld

For SLES: /etc/init.d/mysql

Systemd service

For RHEL, Oracle Linux, CentOS or Fedora platforms: mysqld

For SLES: mysql

Pid file

/var/run/mysql/mysqld.pid

Socket

/var/lib/mysql/mysql.sock

Keyring directory

/var/lib/mysql-keyring

Unix manual pages

/usr/share/man

Include (header) files

/usr/include/mysql

Libraries

/usr/lib/mysql

Miscellaneous support files (for example, error messages, and character set files)

/usr/share/mysql

 

/usr/bin/myisam_ftdump

[root@DB-Server tmp]# rpm -ivh percona-xtrabackup-24-2.4.6-2.el5.x86_64.rpm 

warning: percona-xtrabackup-24-2.4.6-2.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID cd2efd2a

error: Failed dependencies:

        libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.6-2.el5.x86_64

        perl(DBD::mysql) is needed by percona-xtrabackup-24-2.4.6-2.el5.x86_64

/usr/bin/mysqldump

  file /usr/bin/mysql_waitpid from install of mysql-5.0.77-4.el5_6.6.x86_64 conflicts with file from package MySQL-client-advanced-5.6.20-1.rhel5.x86_64

/usr/bin/mysql_upgrade

遇到这个错误是因为没有安装MySQL-shared-compat组件,安装了MySQL-shared-compat-advanced-5.6.20-1.rhel5.x86_64.rpm后,然后使用yum install perl-DBD-MySQL就不会遇到conflict with file的错误

/usr/bin/innochecksum

 

/usr/bin/mysql_config_editor

 

时时app平台注册网站 3

 

 

 

/usr/share/man/man1/mysqlshow.1.gz

如上所示,既然缺少组件,那么安装libev.x86_64, 如下所示,本地yum源安装libev.so.4失败,只能从网上下载libev-4.15-1.el5.rf.x86_64.rpm,网址为

/usr/share/man/man1/mysqlimport.1.gz

 

 

[root@DB-Server tmp]# rpm -qa | grep -i mysql

MySQL-server-advanced-5.6.20-1.rhel5

MySQL-client-advanced-5.6.20-1.rhel5

[root@DB-Server tmp]# rpm -ivh MySQL-shared-compat-advanced-5.6.20-1.rhel5.x86_64.rpm 

Preparing...                ########################################### [100%]

   1:MySQL-shared-compat-adv########################################### [100%]

[root@DB-Server tmp]# yum install perl-DBD-MySQL

[root@DB-Server tmp]# rpm -ivh percona-xtrabackup-24-2.4.6-2.el5.x86_64.rpm 

warning: percona-xtrabackup-24-2.4.6-2.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID cd2efd2a

Preparing...                ########################################### [100%]

   1:percona-xtrabackup-24  ########################################### [100%]

[root@DB-Server tmp]# 

 

 

 

安装 perl-DBD-MySQL时,就会遇到大量类似下面错误

/usr/bin/mysqlaccess

 

 

 

/usr/share/man/man1/mysqlbinlog.1.gz

安装相关依赖组件时,遇到conflict with file的错误,如上截图所示,然后安装Percona Xtrabackup 2.4.6是就会遇到下面错误:

如果使用RPM安装了一些包,一般来说,RPM默认安装路径如下:

 

/usr/bin/mysqlshow

  file /usr/bin/mysql from install of mysql-5.0.77-4.el5_6.6.x86_64 conflicts with file from package MySQL-client-advanced-5.6.20-1.rhel5.x86_64

-l 显示软件包中的文件列表

 

MySQL-server-advanced-5.6.20-1.rhel5

/usr/bin/mysql_zap

/usr/share/man/man1/mysql_config_editor.1.gz

/usr/bin/mysqlaccess.conf

MySQL 5.6

/usr/bin/mysqlbinlog

[root@DB-Server ~]# rpm -qc MySQL-server-advanced-5.6.20-1.rhel5

 

/etc/logrotate.d/mysql

 

/etc/my.cnf

 

[root@DB-Server ~]# 

/usr/bin/mysqlbug

/usr/bin/mysql_waitpid

 

.....................................................

/usr/bin/mysqld_multi

/etc/logrotate.d/mysql

/usr/bin/mysql_secure_installation

 

 

/usr/bin/myisampack

/usr/bin/msql2mysql

 

/etc/my.cnf

[root@DB-Server ~]# rpm -ql MySQL-client-advanced-5.6.20-1.rhel5

[root@DB-Server ~]# rpm -qa | grep -i mysql

 

/usr/bin/mysql

/usr/bin/mysql_fix_extensions

/usr/share/man/man1/mysql_find_rows.1.gz

 

/usr/bin/mysqlslap

 

/usr/bin/mysql_convert_table_format

/usr/bin/myisamlog

/usr/bin/mysql_plugin

/usr/bin/mysqld_safe

 

MySQL-client-advanced-5.6.20-1.rhel5

/usr/bin/mysqlcheck

/usr/share/man/man1/mysqlslap.1.gz

Directory

Contents of Directory

/usr/bin

Client programs and scripts

/usr/sbin

The mysqld server

/var/lib/mysql

Log files, databases

/var/lib/mysql-files

Value of secure_file_priv

/usr/share/info

MySQL manual in Info format

/usr/share/man

Unix manual pages

/usr/include/mysql

Include (header) files

/usr/lib/mysql

Libraries

/usr/share/mysql

Miscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation

/usr/share/sql-bench

Benchmarks

/usr/share/man/man1/mysql.1.gz

 

/usr/share/man/man1/msql2mysql.1.gz

[root@DB-Server tmp]# rpm -ql MySQL-server-advanced-5.6.20-1.rhel5

另外一台测试服务器,使用yum安装了mysql-community-server-5.7.18,测试验证发现又是正常。 暂时不清楚这个细节问题。

以MySQL的安装为例,我们使用RPM方式安装了MySQL的两个包,其实rpm有两个参数-l和-c可以帮助我们查看具体的安装路径。

/usr/bin/mysql_install_db

/usr/share/man/man1/mysqlaccess.1.gz

/usr/share/man/man1/mysqladmin.1.gz

/usr/bin/mysqladmin

时时app平台注册网站 4

MySQL 5.7

/usr/bin/mysqlimport

/usr/share/man/man1/mysqldump.1.gz

/usr/bin/mysqltest

 

  Directory

Contents of Directory

/etc

一些配置文件的目录,例如/etc/init.d/mysql

 

/usr/bin

一些可执行文件

/usr/lib

一些程序使用的动态函数库

/usr/share/doc

一些基本的软件使用手册与帮助文档

/usr/share/man

一些man page文件

 

/usr/bin/my_print_defaults

/usr/bin/mysql_find_rows

 

/usr/bin/mysqldumpslow

/usr/bin/mysql_tzinfo_to_sql

/usr/bin/mysqlhotcopy

-c 显示配置文件列表

/usr/share/man/man1/mysqlcheck.1.gz

/usr/bin/myisamchk

 

Linux下如何查看使用YUM安装过的包的安装路径呢? 在搞清楚这个问题前,我们先来了解一下YUM。 YUM(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器。基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,避免了手动安装的麻烦(寻找资源、下载;放到指定目录安装;处理依赖关系并下载依赖关系的包进行安装)。所以用yum安装,实质上是用RPM安装,所以RPM查询信息的指令都可用。

本文由时时app平台注册网站发布于时时app平台注册网站,转载请注明出处:RHEL 5.7 使用rpm安装XtraBackup问题总结【时时app平台

关键词: