from: http://dag.wiee.rs/blog/using-apt-in-an-rpm-world
Everytime I am surprised that people don't know that apt-get works on RPM-based distributions and works much better than the alternatives. Especially in a CentOS/RHEL environment where you have various distribution releases running, apt-rpm allows you to use the same apt version and the same apt features across CentOS/RHEL 2.1, 3, 4 and 5.
In an attempt to persuade you to try out apt, let me denounce some myths about the current apt-rpm:
- works on RPM packages
- can do multilib (coexist 32bit and 64bit)
- does check GPG keys on packages
- can work with repomd repositories (as used by yum)
- does work a lot faster than yum
- is being maintained (although could use more hands)
- has python bindings
- has a graphical interface (synaptics)
- handles multiple repositories much better
- allows to pin packages by version or repository (and manages cross-dependencies)
- existed years before yum (and was the only depsolver for a few years in the Red Hat world)
Now, because I can say it works great but you may not believe me, let me make it very simple for you to try it out on CentOS. Here is a quickstart guide...
First we start off installing apt from RPMforge. Follow the guide on the CentOS wiki to configure RPMforge for your system. Then do:
yum install apt
(or alternatively install the latest apt RPM package from http://packages.sw.be/apt/for your distribution)
and then edit the file /etc/apt/sources.list.d/os.list and add for CentOS:
repomd http://mirror.centos.org/ centos/$(VERSION)/os/$(ARCH)
repomd http://mirror.centos.org/ centos/$(VERSION)/updates/$(ARCH)
repomd http://mirror.centos.org/ centos/$(VERSION)/extras/$(ARCH)
This adds the official CentOS os, updates and extras repositories.
Now you can use it, for example do:
apt-get update
to update the locally cached metadata, or do:
apt-get upgrade
to upgrade your system with the latest updates, or yet, do:
apt-get install synaptic
to install a package named synaptic. Try:
synaptic
to start synaptic and use the graphical interface (also available from System > Administration > Synaptic Package Management)
There are a few commands that use the locally cached metadata, the following apt-cache commands are used most often:
apt-cache search keyword
to search the local metadata for packages related to keyword, or:
apt-cache policy package
to show the different versions of a certain package that is offered.
PS And let me also add that the project name is apt-rpm, not apt4rpm (a complete different project).
本文介绍如何在 CentOS 系统上安装并使用 apt-rpm 工具,该工具可提供比 yum 更快更一致的包管理体验,支持多库共存、多架构并行等特性。

3543

被折叠的 条评论
为什么被折叠?



