Differences between revisions 2 and 3
Revision 2 as of 2011-11-22 01:43:15
Size: 9610
Editor: ?tuxfolder
Comment:
Revision 3 as of 2011-11-22 02:33:50
Size: 9582
Editor: ?tuxfolder
Comment: translated intro-
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
패키지 관리 시스템은 Debian 시스템에 설치된 소프트웨어 전체를 하나로 묶는다. Debian 에서 "패키지" 라고 하면 시스템에 설치되는 파일 꾸러미 제공체인 소프트웨어(각각), 패키지끼리의 의존성 관계, 소프트웨어 환경설정 등을 일컫는다. 패키지 관리 시스템은 Debian 시스템에 설치된 소프트웨어 전체를 하나로 묶는다. Debian 에서 "패키지(들)" 라고 하면 시스템에 설치되는 파일 꾸러미 제공체인 소프트웨어(각각), 패키지끼리의 의존성 관계, 소프트웨어 환경설정 등을 일컫는다. 패키지는 설치, (다른 패키지에서 더 이상 필요한 패키지가 아닌 경우 자동으로) 삭제가 가능하다.
Line 8: Line 8:
The package management system binds all the software on a Debian system together. Debian uses named "packages" for each piece of software, bundles of files which provide the files to be installed on the system, the dependencies between packages and the configuration of the software. These packages can be installed or removed (unless, of course some other package requires it) at will. In fact, the majority of the Debian installation process is installing the most basic packages that allow Debian to function. Debian 설치 프로세스의 주는 Debian 이 동작하기 위해서 가장 기본적인 패키지들을 설치하는 것이다.
Line 10: Line 10:
Debian package management consists of several layers. The lowest layers, most of which you won't want to touch, are made up of [[dpkg]] and associated programs. On top of those layers are the [[Apt]] and [[apt-get]] tools as well as the newer [[aptitude]] tool. The [[PackageManagement/PkgTools|Package Management Tools]] page has brief descriptions of these and other tools which work with DebianPackage files. Debian 패키지 관리는 몇 가지 계층으로 나눌 수 있다. 건드리기 힘든 최하위 층은 [dpkg]], 그것과 연결된 프로그램으로 구성된다. 그것들의 상위 층에 [[Apt]], [[apt-get]], 그리고 더 새로운 [[aptitude]] 도구가 존재한다. [[ko/PackageManagement/PkgTools|패키지 관리 도구들]] 에 앞서 언급한 도구들과 더불어 DebianPackage 파일과 함께 동작하는 도구들을 간략히 소개하고 있다.
Line 12: Line 12:
All of those tools are documented by a ManPage, so if you have questions, you should consult them (eg. '{{{man apt}}}'). If you're new, there are some commands that have proven most useful for everyday use. They are grouped generally as: 모두 [[ManPage|맨페이지]] 에 문서화 되어 있어서 궁금한 점들을 찾아 볼 수 있다.
(이런 식으로 '{{{man apt}}}' 말이다). 이 도구들과 친하지 않다면 매일 쓰기에 유용하다고 검증된 도구들을 쓸 수 있다. 아래 분류를 참고하자:
Line 14: Line 15:
== Full-Screen Frontends == == 전체화면을 지원하는 프런트 엔드 ==
(ncurses 기반) 콘솔용 프로그램과 GUI 기반 프로그램이 있다.

Translation(s): English - Italiano - 한국어(Korean)


패키지 관리 시스템은 Debian 시스템에 설치된 소프트웨어 전체를 하나로 묶는다. Debian 에서 "패키지(들)" 라고 하면 시스템에 설치되는 파일 꾸러미 제공체인 소프트웨어(각각), 패키지끼리의 의존성 관계, 소프트웨어 환경설정 등을 일컫는다. 패키지는 설치, (다른 패키지에서 더 이상 필요한 패키지가 아닌 경우 자동으로) 삭제가 가능하다.

Debian 설치 프로세스의 주는 Debian 이 동작하기 위해서 가장 기본적인 패키지들을 설치하는 것이다.

Debian 패키지 관리는 몇 가지 계층으로 나눌 수 있다. 건드리기 힘든 최하위 층은 [dpkg]], 그것과 연결된 프로그램으로 구성된다. 그것들의 상위 층에 Apt, apt-get, 그리고 더 새로운 aptitude 도구가 존재한다. 패키지 관리 도구들 에 앞서 언급한 도구들과 더불어 DebianPackage 파일과 함께 동작하는 도구들을 간략히 소개하고 있다.

모두 맨페이지 에 문서화 되어 있어서 궁금한 점들을 찾아 볼 수 있다. (이런 식으로 'man apt' 말이다). 이 도구들과 친하지 않다면 매일 쓰기에 유용하다고 검증된 도구들을 쓸 수 있다. 아래 분류를 참고하자:

전체화면을 지원하는 프런트 엔드

(ncurses 기반) 콘솔용 프로그램과 GUI 기반 프로그램이 있다.

These are both console (ncurses) and GUI based. There are a number of alternatives, similar in some regards, different in others. For users of RPM-based Linux distros, analogs include RedCarpet and Up2Date.

  • aptitude may be invoked in full screen console mode (ncurses) or CLI mode, and is a friendly frontend to apt. It replaces apt-get as the recommended tool for the command line.

  • DSelect is an older frontend to apt. It is no longer recommended.

  • adept is a nice GUI-based frontend with several nice options.

  • Synaptic is another GUI-based frontend.

  • other frontends are available (e.g. gnome-apt), try to use one of the above or apt-cache search to find one of them :)

Command-line Frontends

Generally, the command line tools integrate a number of operations (package list management, package retrieval, package installation, package configuration) in a single command plus arguments. The primary command line tool is aptitude. apt-get fulfills a similar purpose and although it is no longer the recommended primary tool some still use it. Here are some typical invocations:

  • aptitude update (or apt-get update, see apt-get) to update apt's internal database of available packages

  • aptitude safe-upgrade (or apt-get -u upgrade) to bring all currently installed packages up to date

  • aptitude search jabber (or apt-cache search jabber) to find a program that gives you access to the jabber instant-messaging system

  • aptitude show gabber (or apt-cache show gabber) to display more info about the GNOME jabber client

  • aptitude install gabber (or apt-get install gabber) to install the package

  • aptitude remove gabber (or apt-get remove gabber) to remove it again

  • aptitude search '~i' to show installed packages

"Apt Help":http://www.spack.org/wiki/UsingApt

You can also use Wajig, for an unified and more logical command-line interface to all package management functions.

Low-level Tools

Largely dpkg and friends, these are commands that perform a single task. They are most directly comparable to Redhat's "rpm" command.

  • dpkg-reconfigure locales to reconfigure Locales

  • dpkg-reconfigure exim to reconfigure the exim mail-transfer agent. This command isn't currently part of dpkg; it's provided by debconf.

  • dpkg, (see DPkg) invoked with various command-line arguments. If you find a place to download debian-packages that is not accessible via apt, you can download the packages and install them directly. Note that this method will not automagically resolve dependencies between packages etc, therefore use apt or dselect if possible.

  • dpkg --listfiles textutils to list all the files provided by the textutils package. This only works for packages which are already installed. This can be useful to find out what form a package's documentation has been provided in.

  • dpkg -S /path/to/some/file to find out which package a file belongs to.

  • deborphan can be handy but is no longer required to recover space because apt now automatically un-installs unneeded packages that were installed only to satisfy a dependency of a package that was specifically requested to be installed but has since been removed. It gives you a list of library packages that no longer have higher-level packages depending on them.

Contents of a debian file

To see the contents of debian packages in the Debian repositories, whether installed or uninstalled, install the apt-file package and enter

$ apt-file update
$ apt-file list foo

To get the contents of the file "abc.deb", you have to enter

$ dpkg-deb -c abc.deb 

Reconfiguring of debconf

To reconfigure debconf, so that it informs you of most changes of the new packages, you have to enter (as Root):

 # dpkg-reconfigure debconf

Chose "medium" here

Package Management with apt-get and dpkg

Package resource list for APT

The file /etc/apt/sources.list is the definition file of the sources for apt. For further information about this file type

$ man 5 sources.list

Retrieve new lists of packages:

To fetch the new lists of all the packages from sources.list enter:

# aptitude update

or the equivalent

# apt-get update

This command checks for new release-files on the given servers. Luckily the command is clever enough to check if the release-file has changed after the last update.

Upgrade of all the files:

To make an update of all the changed packages, enter the line

# aptitude safe-upgrade

If you want to do this from cron you should consider using the cron-apt package.

The older apt-get based method is:

# apt-get upgrade -u

The additional flag -u shows a list of upgraded packages as well. If you want to run the update in a cron-job, you should use the flags -dy. With this flags the new packages will be downloaded but not installed. You can install them later by writing apt-get update -u.

Distribution Upgrade of all the files:

WARNING

Following the upgrade instructions found in the release notes is the best way to ensure that your system upgrades from one major Debian release to another (e.g. from lenny to squeeze) without breakage!

These instructions will tell you to do a dist-upgrade (instead of upgrade) in the case of apt-get or safe-upgrade (instead of safe-upgrade in the case of aptitude) at least once. So you would have to type something like

# aptitude full-upgrade

or

# apt-get dist-upgrade -dy

# apt-get dist-upgrade -u

at some point during the major release upgrade.

A dist-upgrade may also be required to keep up-to-date with the latest version of sid.

Add a package:

How can you add a package to your system without the GUI programs? All you have to do is find out the name of this package and enter the command

# aptitude install sylpheed-claws

or

# apt-get install sylpheed-claws

to add the package sylpheed-claws.

Remove a package:

To get rid of the package foo which is no longer needed, enter the command

# aptitude remove foo

or

#  apt-get remove foo

If the package is needed by other packages you will be prompted to remove this package and all packages which depend on it.

Forcing removal of a package:

While making a distribution upgrade it could happen that you have to remove a package first. But sometimes this is not possible with apt-get remove since the package has unmet dependencies or is not installed completely. You can remove the package foo by using the command

# dpkg --force-all --remove foo 

Read the contents of a installed package:

Sometimes you want to know which files are in the package foo. To get this information enter the command

$ dpkg -L foo 

Get the description of a package:

You don't know what the package foo is for? Just write

$ aptitude show foo

or

$ dpkg -p foo 

Search the package of a file:

Have you ever wondered to which package belongs a given file? To get this information (e.g. for /usr/bin/apt-get), start the command

$ dpkg -S /usr/bin/apt-get

and it will tell you that this file is part of the package apt.


?CategoryQuickPackageManagement | CategoryPackageManagement