[英]How to build offline RPM deploy using existing RPMs?
I am wondering if there is anything like taking existing RPM packages and putting them into one main RPM for offline deploy/installs.我想知道是否有任何类似于将现有 RPM 包放入一个主 RPM 以进行离线部署/安装的方法。
What I am trying to do is install MySQL Server on CentOS 6.5.我想要做的是在 CentOS 6.5 上安装 MySQL 服务器。 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
.因此,
yum install mysql-community*.rpm
运行yum install mysql-community*.rpm
我希望我能以某种方式将以下 RPM 打包成一个,然后在目标服务器上运行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.我已经搜索了一个解决方案,但我找到的只是指导我如何重建 RPM 包表单源的页面,这不是我正在寻找的。
afaik there is no way to bring multiple rpms into one rpm. afaik 没有办法将多个 rpm 变成一个 rpm。 You can however:
但是,您可以:
zypper --download-only
)zypper --download-only
)rpm -Uvh *.rpm
(that is: install all rpms you find in this folder) rpm -Uvh *.rpm
(即:安装您在此文件夹中找到的所有 rpm)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:您可以将 RPM 下载到本地存储库,在本地存储库中为它们构建一个组文件,然后使用 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 .我还没有测试过:它是从这里抄袭的。
offline_yum_install
installs rpm packages with dependencies off line using yum
. offline_yum_install
使用yum
离线安装带有依赖项的 rpm 包。 Its output is a mysql.tgz
which has an install_script and all packages that the rpm depends on.它的输出是一个
mysql.tgz
,它有一个 install_script 和 rpm 依赖的所有包。
Have a look at the offline_yum_install github repo .看看offline_yum_install github repo 。
yumdownloader
可能是一个选项,例如在另一个线程中: https : yumdownloader
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.