Package manager - cheat sheet
By: John McFarlane
<john.mcfarlane@rockfloat.com>
This document was originally created on 08/08/2008
Last updated:
08/14/2008 @ 00:20
Abstract:
The goal of this howto is to document how you do common things in
each of the following package managers or os specific tools:
- Gentoo - portage
- Debian/Ubuntu - apt
- Redhat-4.x - rpm
- Redhat-5.x, CentOS-5.x - yum
Table of Contents:
1. Check the version of an installed package
Frequently you need to look up what version of Apache or something
you are currently running:
I'm finished with this step
| Gentoo | Debian/Ubuntu | Redhat | Centos |
|---|---|---|---|
equery list apache |
dpkg --list httpd |
rpm -qa httpd |
yum list installed | grep httpd |
2. Check to see what updates are available
It's usually wise to look at package updates before applying them.
This can really safe time because you can then plan around package
updates that require more regression testing and configuration
changes.
I'm finished with this step
| Gentoo | Debian/Ubuntu | Redhat | Centos |
|---|---|---|---|
emerge -uDp world |
apt-get --dry-run upgrade |
-NA- |
yum list updates |
3. Manage the default runlevel
Servers are best configured with only the required services
running. Here's [one way] to turn them on/off.
I'm finished with this step
| Gentoo | Debian/Ubuntu | Redhat | Centos |
|---|---|---|---|
etc-update add apache2 default |
update-rc.d httpd defaults |
chkconfig httpd on |
chkconfig httpd on |
4. Check what package a particular file belongs to
Frequently I need to know what package a particular file belongs
to, or what package put it there.
I'm finished with this step
| Gentoo | Debian/Ubuntu | Redhat | Centos |
|---|---|---|---|
equery belongs /etc/services |
dpkg -S /etc/services |
rpm -qf /etc/services |
yum provides /etc/services |
This document was originally created on 08/08/2008
Conventions and tips for this howto document:
- For the record I think RPM is a piece of poo
- For the record I think Yum is not really much better
- For the record I will not be documenting up2date
Disclaimer:
This page is not endorsed by gentoo.org or any other cool
cats. Any information provided in this document is to be used
at your own risk.