RHEL 数据包管理器
我在 debian 的工程/管理级别工作了几年,并使用 apt 作为数据包管理器。
现在我必须使用 RHEL,并且需要快速了解如何处理数据包管理。我了解 rpm 工具,但不太了解。
我正在特别寻找这个: - 我如何将本地 PM 链接到互联网或 CD 上的包存储库 - rpm 仅适用于单个文件(如 dpkg)还是也可用于管理(如 apt-get:搜索等),
因此 apt 在 debian 上非常酷。 RHEL 中也有类似的东西吗?
干杯,克里斯
I am working for some years with debian on engineering/administration level and using apt as packetmanager.
Now I have to work with a RHEL and I need some quick overview of how to handle packetmanagement there. I know the rpm-tool but not very well.
I am looking especially for this:
- how can I link my local PM to a paket-repository in the internet or on CD
- is rpm just for single files (like dpkg) or also for managin (like apt-get: searching etc)
so apt on debian is very cool. is there something comparable in RHEL too??
cheers, chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不完全是。 Rpm 适用于 Redhat,dpkg 适用于 Debian。 Redhat 中 apt-tools/aptitute 的等价物是 yum。
Redhat将存储库放入文件中,而不是单个sources.list文件中。您可以在
/etc/yum.repos.d/
中找到这些存储库定义。因此,要查看哪些存储库可用,请使用命令 yum repolist。例如,我的这个 Scientific Linux 系统会给出以下输出:如果你想添加一个存储库,你要么尝试获取一个预定义的文件(提示:几乎所有第 3 方存储库都会为你提供一个 rpm,它会自动执行所有操作),或者编写你的自己的存储库定义。将其放入 /etc/yum.repos.d/ 中名为 reponame.repo 的文件中。这是 EPEL 项目的示例:
$basearch
解析为uname -m
,即 x86_64 或 i686。如果您正确设置了所有内容(强制设置为 name、baseurl 和enabled=1),请运行 yum update 并使用 yum repolist 检查您的存储库是否已正确包含。通常你只会使用 yum;很少单独使用 rpm。如果您习惯了 aptitude,yum 对您来说不会是太大的挑战,因为 update/upgrade/clean/erase 等命令几乎相同。
yum 文档可以在 Fedora 的网页上找到: http:// /docs.fedoraproject.org/en-US/Fedora/14/html/Software_Management_Guide/index.html
祝你好运!
亚历克斯.
Not quite. Rpm is for Redhat what dpkg is for Debian. The Redhat equivalent of apt-tools/aptitute is yum.
Redhat puts repositories in files, rather then a single sources.list file. You find those repo-definitions in
/etc/yum.repos.d/
. So see what repositories are available, you use the commandyum repolist
. For instance, this Scientific Linux system of mine it gives the following output:If you want to add a repository, you either try getting a predefined file (hint: almost any 3rd party repository gives you an rpm which does everything automatically) or write your own repository defintion. Put it in a file called reponame.repo in /etc/yum.repos.d/. This is an example from the EPEL project:
$basearch
resolves touname -m
, so to x86_64 or i686. If you set everything up correctly (mandatory settings are name, baseurl and enabled=1), runyum update
and check withyum repolist
if your repository was correctly included.Usually you'll only use yum; rpm alone is rarely used. If you're used to aptitude, yum won't be much of a challenge for you for the commands like update/upgrade/clean/erase are pretty much the same.
The yum documentation can be found on Fedora's webpage: http://docs.fedoraproject.org/en-US/Fedora/14/html/Software_Management_Guide/index.html
Good luck!
Alex.
Ubuntu“dkpg”-> RHEL-> “转速”
Ubuntu“apt-get install **”RHEL -> “yum install **”
有多种适用于 RHEL 的非官方版本,如果您订阅了 RHN,那么您可以直接从 Red Hat Network 获取软件包。
/etc/yum.repos.d/中的配置文件
Ubuntu "dkpg" -> RHEL -> "rpm"
Ubuntu "apt-get install **" RHEL -> "yum install **"
There are various unofficial available for RHEL and if you are subscribed to RHN then you get the packages directly from Red Hat Network.
Configuration files in /etc/yum.repos.d/