[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Различия
Показаны различия между двумя версиями страницы.
Следующая версия | Предыдущая версия | ||
ru:slackbook:package_management [2013/12/01 12:09 (UTC)] – создано bormant | ru:slackbook:package_management [2013/12/01 16:01 (UTC)] (текущий) – [slackpkg] bormant | ||
---|---|---|---|
Строка 1: | Строка 1: | ||
====== Управление пакетами ====== | ====== Управление пакетами ====== | ||
- | |||
- | <note important> | ||
Управление пакетами является неотъемлемой частью любого дистрибутива Linux. | Управление пакетами является неотъемлемой частью любого дистрибутива Linux. | ||
Строка 30: | Строка 28: | ||
===== Установка, | ===== Установка, | ||
- | + | Хотя | |
- | While **// | + | справиться с нештатными задачами, такими как быстрая установка пакета, |
- | **// | + | установка целого набора пакетов или создание сценария установки. |
- | handling odd tasks, such as quickly installing a single package, | + | **// |
- | installing an entire disk set of packages, or scripting an install. | + | их без дополнительных вопросов. Как и все инструменты управления пакетами |
- | **// | + | Slackware, |
- | install, and simply installs them without asking any questions. Like | + | вас. В простейшем варианте |
- | all Slackware | + | для установки и делает в точности то, что от него ожидалось. |
- | you're doing and doesn' | + | |
- | simplest form, **// | + | |
- | list of packages to install, and does exactly what you would expect. | + | |
< | < | ||
Строка 58: | Строка 52: | ||
# The Blackbox home page is http:// | # The Blackbox home page is http:// | ||
# | # | ||
- | Package blackbox-0.70.1-i486-2.txz installed.</ | + | Package blackbox-0.70.1-i486-2.txz installed. |
- | + | </ | |
- | + | ||
- | You can of course install multiple packages at a time, and in fact use | + | |
- | shell wild cards.The following installs all of the //" | + | |
- | packages from a mounted CD-ROM: | + | |
+ | Конечно, | ||
+ | подстановки оболочки. Следующая команда установит со смонтированного CD-ROM | ||
+ | серию //«N»// целиком: | ||
< | < | ||
- | darkstar:~# installpkg / | + | darkstar:~# installpkg / |
- | + | </ | |
- | + | ||
- | At any given time, you can see what packages are installed on your | + | |
- | system by listing the contents of / | + | |
- | which lists not only every application on your system but also the | + | |
- | version number. Should you want to know what individual files were | + | |
- | installed as a part of that package, **// | + | |
- | the contents of the package: | + | |
+ | В любое время можно посмотреть список установленных пакетов, | ||
+ | файлов каталога / | ||
+ | приложения в системе, | ||
+ | установлены из этого пакета, | ||
+ | **// | ||
< | < | ||
- | + | darkstar: | |
- | darkstar: | + | |
</ | </ | ||
+ | Команда покажет размеры упакованного и распакованного пакета, | ||
+ | имя и расположение каждого файла в пакете. | ||
- | This will return everything from the size of the package, a | + | Удаление пакета даже проще установки. Команда удаления, как и ожидалось, |
- | description of what it does, and the name and location of every file | + | **// |
- | installed as a part of the package. | + | **// |
- | + | каталоги этого пакета с одной оговоркой. Если этот файл входит в несколько | |
- | + | установленных пакетов, он будет пропущен, | |
- | Removing a package is every bit as easy as installing one. As you | + | файлы, каталог будет оставлен на месте. Поэтому удаление пакетов дольше, |
- | might expect, the command to do this is | + | чем их установка. |
- | **// | + | |
- | packages to remove, and **// | + | |
- | check the contents of the package database and remove all the files | + | |
- | and directories for that package with one caveat. If that file is | + | |
- | included in multiple installed packages, it will be skipped and if a | + | |
- | directory has new files in it, the directory will be left in | + | |
- | place. Because of this, removing packages takes a good while longer | + | |
- | than installing them. | + | |
< | < | ||
Строка 105: | Строка 88: | ||
</ | </ | ||
- | + | Наконец, обновление пакета | |
- | Finally, upgrading is just as easy with (you guessed it), | + | **// |
- | **// | + | удаляет файлы |
- | package, then removes whatever files and directories are left-over from | + | одну важную вещь -- **// |
- | the old package. One important thing to remember is that | + | установленного пакета выше, чем у //«нового»//, поэтому подходит и для |
- | **// | + | установки предыдущих версий. |
- | previously installed package has a higher version number than the //" | + | |
- | package, so it can also be used to downgrade to older versions. | + | |
< | < | ||
Строка 134: | Строка 114: | ||
... | ... | ||
Package blackbox-0.65.0-x86_64-4 upgraded with new package | Package blackbox-0.65.0-x86_64-4 upgraded with new package | ||
- | ./ | + | ./ |
+ | </ | ||
+ | |||
+ | Всех эти инструменты принимают полезные параметры. Например, | ||
+ | позволяет **// | ||
+ | Параметр //< | ||
+ | предпринято, | ||
+ | информацией (как всегда) обратитесь к страницам руководств man. | ||
- | All of these tools have useful arguments. For example, the | + | ===== Форматы сжатия пакетов |
- | //--root// to **// | + | |
- | packages into an arbitrary directory. The // | + | |
- | will instruct **// | + | |
- | what it would attempt without actually making any changes to the | + | |
- | system. For complete details, you should (as always) refer to the man | + | |
- | pages. | + | |
- | ===== Package Compression Formats | + | |
- | In the past, all Slackware | + | В прошлом все пакеты |
- | **// | + | что было хорошим компромиссом между скоростью сжатия и размером. Позже были |
- | good compromise between compression speed and size.Recently, new | + | разработаны новые схемы сжатия, которые получили поддержку и в инструментах |
- | compression schemes have been added and the package management tools | + | управления пакетами. Сейчас официальные пакеты |
- | have been upgraded to handle these. Today, official | + | **// |
- | packages are compressed with the **//xz//** | + | ещё используют расширение |
- | utility and end with .txz extensions.Older packages | + | |
- | third party packages) still use the .tgz extension. | + | |
+ | Стоит подчеркнуть, | ||
+ | общеупотребительные неуникальные расширения для для сжатых файлов .tar. | ||
+ | В этом много преимуществ, | ||
+ | (многие другие форматы пакетов требуют специальных инструментов) и также | ||
+ | просто разобрать. | ||
- | It's worth emphasizing that .tgz and .txz (or, more succinctly, .t?z | + | Тем не менее, важно понимать, что хотя все пакеты Slackware **являются** |
- | files) are very standard, non-unique extensions for compressed | + | файлами |
- | files. This has many advantages; they' | + | Slackware. **// |
- | UNIX system (many other package formats require special toolchains), | + | произвольные файлы .t?z, только пакеты Slackware. |
- | and they' | + | |
- | However, it is also important to realize that just because all Slackware | ||
- | packages **are** .t?z files, not all .t?z files are | ||
- | Slackware packages. **// | ||
- | magically install just any .t?z file, only Slackware packages. | ||
==== slackpkg ==== | ==== slackpkg ==== | ||
- | **//Slackpkg//** is an automated tool for | + | **//slackpkg//** -- это автоматизированный инструмент для управления пакетами |
- | management of Slackware | + | Slackware. |
- | / | + | выпуска Slackware-12.2 поставляется в наборе |
- | of slackware-12.2 it has been included in the ap/ series of a | + | |
- | base installation. | + | |
+ | **// | ||
+ | установки также, как используете **// | ||
+ | Slackware из каталога /extra установочного диска. Это особенно полезно для | ||
+ | обновлений безопасности или важных обновлений приложений, | ||
+ | серверах Slackware, некоторые из которых вы можете захотеть использовать на | ||
+ | своей системе. | ||
- | Just as you are able to use **//installpkg//** to | + | Без |
- | install | + | - Обнаружить в журнале изменений |
- | the install media, you can use **//slackpkg//** | + | - Посмотреть на используемом зеркале Slackware ссылку для загрузки пакета. |
- | to pull packages from the Internet and install them. This is | + | - Загрузить пакет с зеркала Slackware на жёсткий диск. |
- | particularly useful for security updates or significant application | + | - Применить |
- | upgrades that are posted to the Slackware servers, some of which you | + | |
- | may want to start using on your own system. | + | |
+ | При помощи **// | ||
+ | - Обнаружить в журнале изменений Slackware выпуск обновления для **// | ||
+ | - **slackpkg** //install// foo | ||
- | Without **// | + | Очевидно, что это упрощает довольно распространённую задачу. |
- | - Notice in the Slackware changelog that an update has been released. | + | |
- | - Look on your local Slackware mirror to find a download link of the package. | + | |
- | - Download the package from a Slackware mirror to your hard drive. | + | |
- | - Use either **// | + | |
- | + | ||
- | With **// | + | |
- | + | ||
- | - Notice in the Slackware changelog that an update for **//foo//** has been released. | + | |
- | - **slackpkg** //install// foo | + | |
- | Clearly, this streamlines a fairly common task. | + | Для использования **// |
+ | Slackware, отредактировав от root ''/ | ||
+ | соответствующее версии и архитектуре Slackware, и раскомментируйте его. Этот | ||
+ | список зеркал предлагает доступ по HTTP и FTP, но раскомментированным должно | ||
+ | быть **только одно** зеркало. | ||
+ | После выбора зеркала обновите список файлов сервера командой | ||
+ | '' | ||
+ | (рекомендуется регулярная проверка журнала изменений Slackware, дополнительную | ||
+ | информацию см. в [[ru: | ||
+ | обновлений»]]). | ||
- | To use **//slackpkg//**, configure your system | + | Для поиска пакета используйте '' |
- | with a Slackware mirror by editing | + | '' |
- | '' | + | |
- | the mirror that is associated with your Slackware version and | + | |
- | architecture, | + | |
- | http access, but you must uncomment **only one** | + | |
- | mirror. | + | |
- | Once a mirror has been selected, update the list of remote files by | + | После установки пакета при помощи **// |
- | issuing the initial command '' | + | обновить при помощи **// |
- | should be done any time you notice that a new package has been | + | как описано в разделе «[[# |
- | posted (regularly checking in with the Slackware changelog is | + | удаление и обновление пакетов]]». |
- | recommended; | + | |
- | To search for a package, use '' | + | Дополнительную информацию смотрите на страницах руководств **//man//** |
- | and to install use '' | + | slackpkg(8) и slackpkg.conf(5), а также на вебсайте [[ |
+ | http:// | ||
- | Once a package has been installed with | ||
- | **// | ||
- | using **// | ||
- | management commands as detailed in[[# | ||
- | For more information see the **//man//** pages | ||
- | for slackpkg(8) and slackpkg.conf(5), | ||
- | http:// | ||
==== rpm2tgz ==== | ==== rpm2tgz ==== | ||
- | One of the most ubiquitous package formats for Linux software is | + | Одним из самых распространённых форматов пакетов программ для |
- | RPM; it's not uncommon to find a developer offering their | + | RPM; нередко разработчики предлагают свои приложения для загрузки только как |
- | application for download as either source code or an RPM file, and | + | исходный код или файл |
- | no more. In this case, you would have three options: | + | |
- | - Build your own Slackware | + | - Собрать собственный пакет |
- | - Compile and install directly from source code. | + | - Скомпилировать и установить прямо из исходного кода. |
- | - Convert and install from RPM. | + | - Сконвертировать установку из RPM. |
- | Building from source code or creating your own Slackware | + | Сборка из исходного кода или создание собственного пакета |
- | usually not as complex as you might think but installing directly from | + | не столь сложно, |
- | source code is generally discouraged because there is no easy way to | + | рекомендуется из-за отсутствия простого способа отслеживания того, что было |
- | track what has been installed on your system after issuing the | + | установлено в систему после выполнения команды |
- | '' | + | пакетов |
- | packages is outside the scope of this chapter. So this leaves us with | + | полезной утилиты |
- | the helpful tool **// | + | |
- | + | ||
- | **// | + | |
- | Slackware package that can then be installed via | + | |
- | **// | + | |
- | **// | + | |
- | create your own Slackware package but grants you the benefit of | + | |
- | being able to remove, update, and track what you've installed. | + | |
+ | **// | ||
+ | быть установлен при помощи **// | ||
+ | одной стороны, | ||
+ | -- предоставляет возможность удалять, | ||
<note warning> | <note warning> | ||
- | While a Slackware | + | Пакет |
- | an RPM package can by comparison be a maze of dependency listings | + | пакет |
- | and special instructions. Therefore, | + | Поэтому |
- | **// | + | приложениях, а также никогда не обрабатывает зависимости волшебным образом. |
- | especially on very complex applications, and it will never | + | |
- | magically resolve dependencies. | + | |
</ | </ | ||
- | To try **// | + | Чтобы попробовать |
- | a trusted source and convert it: | + | RPM и сконвертируйте его: |
< | < | ||
- | |||
rpm2tgz foo-x.x.xx.rpm | rpm2tgz foo-x.x.xx.rpm | ||
</ | </ | ||
+ | Результатом будет файл .tgz, поэтому оригинальный RPM после преобразования | ||
+ | может быть удалён. Для установки только что полученного пакета Slackware | ||
+ | используйте **// | ||
+ | пакетов, | ||
+ | |||
+ | |||
+ | ====== Навигация по главам ====== | ||
- | The result is a .tgz file, so after the conversion is finished, the | + | **Предыдущая глава: [[ru: |
- | original RPM can safely be discarded. Use | + | |
- | **// | + | |
- | package you've just created, provided that you' | + | |
- | installed all dependency code for the application to actually function. | + | |
- | ====== Chapter Navigation ====== | + | |
- | **Previous Chapter: [[slackbook: | + | **Следующая глава: [[ru:slackbook:tracking_updates|Отслеживание обновлений]]** |
- | **Next Chapter: [[slackbook:tracking_updates|Keeping Track of Updates]]** | + | ====== Источники ====== |
+ | | ||
+ | | ||
+ | | ||
- | ====== Sources ====== | + | {{tag> |
- | <!-- If you copy information from another source, then specify that source --> | + | |
- | * Original source: [[http:// | + | |
- | <!-- Authors are allowed to give credit to themselves! --> | + | |
- | * Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson | + | |
- | <!-- * Contrbutions by [[wiki: | + | |
- | <!-- Please do not modify anything below, except adding new tags.--> | ||
- | <!-- You must also remove the tag-word " | ||
- | {{tag> |