0

I am wondering if there is anything like taking existing RPM packages and putting them into one main RPM for offline deploy/installs.

What I am trying to do is install MySQL Server on CentOS 6.5. I would like to distribute this to our servers which do not have access to repos outside of company network. These packages will be uploaded to our internal repo either seperately or in one package (hopefully).

So instead of running yum install mysql-community*.rpm I am hoping that I can somehow package the below RPMs into one and on target servers just run yum install some_standard_package.rpm.

  • mysql-community-client-5.7.17-1.el6.x86_64.rpm
  • mysql-community-common-5.7.17-1.el6.x86_64.rpm
  • mysql-community-libs-5.7.17-1.el6.x86_64.rpm
  • mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm
  • mysql-community-server-5.7.17-1.el6.x86_64.rpm

I have searched for a solution but all I find are pages instructing me how to rebuild an RPM package form source which is not what I am looking for.

Hugo y
  • 1,421
  • 10
  • 20
New2Python
  • 325
  • 1
  • 4
  • 17

4 Answers4

2

afaik there is no way to bring multiple rpms into one rpm. You can however:

  • get all the original rpms (consider using zypper --download-only)
  • put them in a folder
  • (optionally) compress the folder
  • transfer that folder to you other servers
  • (optionally) extract the folder
  • cd folder
  • rpm -Uvh *.rpm (that is: install all rpms you find in this folder)
Chris Maes
  • 35,025
  • 12
  • 111
  • 136
2

You can download the RPMs to a local repo, build a group file for them in the local repo and then install the group with yum:

 yum-groups-manager -n "My Group" --id=mygroup --save=mygroups.xml --mandatory mysql-community-client mysql-community-common ....

 createrepo -g mygroups.xml /svr/repo

and install with

 yum group install "My Group"

I have not tested this: it's cribbed from here.

NickD
  • 5,937
  • 1
  • 21
  • 38
  • You can simply `rsync` the rpms to a given directory and then use `createrepo` which creates the rpm metadata within that directory allowing it to be used as a yum/zypper/rpm repository for any distro using rpm as the package manager. (your thinking is correct) – David C. Rankin Mar 24 '18 at 05:21
0

offline_yum_install installs rpm packages with dependencies off line using yum. Its output is a mysql.tgz which has an install_script and all packages that the rpm depends on.

Have a look at the offline_yum_install github repo.

yulei
  • 1
  • 2
0

yumdownloader could be an option, example in this other thread: https://stackoverflow.com/a/66927190/5078874