32 位和 64 位的 yum 存储库设置,mysql 连接器

yum repository setup for both 32 bit and 64 bit, mysql connector

在我的存储库设置中,我有以下内容:

[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

因为我的机器是 64 位机器,我的 basesearch 是 x86_64(见下面的 yum-debug-dump 输出):

yum-debug-dump version 1
%%%%SYSTEM INFO
  uname: 2.6.32-573.12.1.el6.x86_64, x86_64
  rpm ver: RPM version 4.8.0
  python ver: 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
%%%%YUM INFO
  arch: ia32e
  basearch: x86_64
  releasever: 6
  yum ver: 3.2.29
  enabled plugins: fastestmirror,presto
  global excludes:
.... ( entire output NOT included )

是否可以创建另一个名为 "mysql-connectors-community-i386" 的存储库并使用以下配置以便我可以同时支持两者:

[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/6/i386/
enabled=1
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

是的,URL是正确的。

这确实有效。这有点笨拙,我认为有更好的方法,但它有效并帮助我解决了一些问题。

编辑,为清楚起见,这是我的连接器存储库,可在我的机器上同时获得 64 位和 32 位:

more /etc/yum.repos.d/mysql-community.repo
...
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-connectors-community-32]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/i386/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql