Merge branch 'master' of github.com:tLDP/LDP

This commit is contained in:
Martin A. Brown 2016-03-22 05:51:48 -07:00
commit 17f7749536
34 changed files with 3933 additions and 7603 deletions

View File

@ -0,0 +1,279 @@
= Package Management Basics: apt, yum, dnf, zypper, and pkg
==== Abstract
This guide is intended as a quick reference for the fundamentals of finding, installing, and upgrading packages on a variety of distributions, and should help you translate that knowledge between systems.
==== Audience
For those new to Linux who need a basic understanding of package management.
==== Original version of this doc
The original version of this guide can be found at https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg[Digital Ocean].
==== Revision History
[cols="^,^,^",]
|=============================================================================
|15.1.2016 |v1.0 Converted and edited for TLDP |Jason Evans
|15.2.2016 |v1.1 Changed format to asciidoc and made corrections |Jason Evans
|=============================================================================
==== Contributions
* https://www.digitalocean.com/community/users/bpb[Brennen Bearnes]
(original author).
* http://wiki.tldp.org/Jason%20Evans[Jason Evans] (editor and maintainer for TLDP)
==== Feedback
Missing information, missing links, missing characters? Mail it to the maintainer of this document: jsevans _at_ youvegotthe.info
==== Copyright information
This work is licensed under a https://creativecommons.org/licenses/by-nc-sa/4.0/[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License].
== Introduction
=== Why was this document written?
Most modern Unix-like operating systems offer a centralized mechanism for finding and installing software. Software is usually distributed in the form of packages, kept in repositories. Working with packages is known as package management. Packages provide the basic components of an operating system, along with shared libraries, applications, services, and documentation.
A package management system does much more than one-time installation of software. It also provides tools for upgrading already-installed packages. Package repositories help to ensure that code has been vetted for use on your system, and that the installed versions of software have been approved by developers and package maintainers.
When configuring servers or development environments, it's often necessary look beyond official repositories. Packages in the stable release of a distribution may be out of date, especially where new or rapidly-changing software is concerned. Nevertheless, package management is a vital skill for system administrators and developers, and the wealth of packaged software for major distributions is a tremendous
resource.
=== What do you need?
This guide covers Debian, Ubuntu, CentOS, Fedora, SuSE, and FreeBSD and will require one of those distributions to be installed.
NOTE: All of the commands in this guide assume that the user is running the commands as root or with `sudo`.
=== Package Management Systems: A Brief Overview
In a Windows environment, programs are packaged in .exe or .msi installers which will then install most of the files needed to run the program. If your computer doesn't have some dependant applications, then the program that you are trying to run will either not install or not run properly. You will then have to scour the internet in order to find the missing required applications or libraries. For example in CentOS 7, in order to install the VIM text editor, I need to add the following packages:
....
gpm-libs x86_64 1.20.7-5.el7 base 32 k
groff-base x86_64 1.22.2-8.el7 base 942 k
perl x86_64 4:5.16.3-286.el7 base 8.0 M
perl-Carp noarch 1.26-244.el7 base 19 k
perl-Encode x86_64 2.51-7.el7 base 1.5 M
perl-Exporter noarch 5.68-3.el7 base 28 k
perl-File-Path noarch 2.09-2.el7 base 26 k
perl-File-Temp noarch 0.23.01-3.el7 base 56 k
perl-Filter x86_64 1.49-3.el7 base 76 k
perl-Getopt-Long noarch 2.40-2.el7 base 56 k
perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k
perl-PathTools x86_64 3.40-5.el7 base 82 k
perl-Pod-Escapes noarch 1:1.04-286.el7 base 50 k
perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k
perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k
perl-Pod-Usage noarch 1.63-3.el7 base 27 k
perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k
perl-Socket x86_64 2.010-3.el7 base 49 k
perl-Storable x86_64 2.45-3.el7 base 77 k
perl-Text-ParseWords noarch 3.29-4.el7 base 14 k
perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k
perl-Time-Local noarch 1.2300-2.el7 base 24 k
perl-constant noarch 1.27-2.el7 base 19 k
perl-libs x86_64 4:5.16.3-286.el7 base 687 k
perl-macros x86_64 4:5.16.3-286.el7 base 43 k
perl-parent noarch 1:0.225-244.el7 base 12 k
perl-podlators noarch 2.5.1-3.el7 base 112 k
perl-threads x86_64 1.87-4.el7 base 49 k
perl-threads-shared x86_64 1.43-6.el7 base 39 k
vim-common x86_64 2:7.4.160-1.el7 base 5.9 M
vim-filesystem x86_64 2:7.4.160-1.el7 base 9.6 k
which x86_64 2.20-7.el7 base 41 k
....
Imagine trying to manually install all of these programs one at a time just to be able to install a text editor! In the early days of Linux, we faced these kinds of problems, however this problem is fixed with package management systems such as apt, yum, and others. Package managers simplify everything. They look at the package that you want to install such as VIM, LibreOffice, etc., then look at what other package it depends upon, the dependencies of those packages, and so on; then it downloads them all and installs them. For example, in order to install VIM in CentOS 7 today, I simply have to run `yum install vim`.
==== Some different package management systems:
While their functionality and benefits are broadly similar, packaging formats and tools vary by platform:
[cols="^,<,^",options="header",]
|===========================================
|Operating System |Format |Tool(s)
|Debian |.deb |apt, apt-cache, apt-get, dpkg
|Ubuntu |.deb |apt, apt-cache, apt-get, dpkg
|CentOS |.rpm |yum
|Fedora |.rpm |dnf
|SuSE |.rpm |zypper
|FreeBSD |Ports, .txz |make, pkg
|===========================================
In Debian and systems based on it, like Ubuntu, Linux Mint, and Raspbian, the package format is the .debfile. APT, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.
Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been supplanted by dnf, a modernized fork which retains most of yum's interface.
SuSE also uses RPM files. However, the package management software is known as zypper. Zypper's command line interface is very similar to yum and YasT can be access from a graphical mode or from the command line.
FreeBSD's binary package system is administered with the pkg command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. It's usually much more convenient to use pkg, but occasionally a pre-compiled package is unavailable, or syou may need to change compile-time options.
==== Update Package Lists
Most systems keep a local database of the packages available from remote repositories. It's best to update this database before installing or upgrading packages. As a partial exception to this pattern, yum and dnf will check for updates before performing some operations, but you can ask them at any time whether updates are available.
[cols="^,^",options="header",]
|=========================================
|System |Command
|Debian / Ubuntu |`apt-get update`
|CentOS |`yum check-update`
|Fedora |`dnf check-update`
|SuSE |`zypper refresh`
|FreeBSD Packages |`pkg update`
|FreeBSD Ports |`portsnap fetch update`
|=========================================
==== Upgrade Installed Packages
Making sure that all of the installed software on a machine stays up to date would be an enormous undertaking without a package system. You would have to track upstream changes and security alerts for hundreds of different packages. While a package manager doesn't solve every problem you'll encounter when upgrading software, it does enable you to maintain most system components with a few commands.
On FreeBSD, upgrading installed ports can introduce breaking changes or require manual configuration steps. It's best to read /usr/ports/UPDATING before upgrading with portmaster.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-get upgrade` |Only upgrades installed packages, where possible.
| |`apt-get dist-upgrade` |May add or remove packages to satisfy new dependencies.
|CentOS |`yum update` |
|Fedora |`dnf upgrade` |
|SuSE |`zypper update` |
|FreeBSD Packages |`pkg upgrade` |
|FreeBSD Ports |`less /usr/ports/UPDATING` |Uses less to view update notes for ports (use arrow keys to scroll, pressq to quit).
| |`cd /usr/ports/ports-mgmt/portmaster && make install && portmaster -a` |Installs portmaster and uses it to update installed ports.
|=======================================================================
Find a Package
~~~~~~~~~~~~~~
Most distributions offer a graphical or menu-driven front end to package
collections. These can be a good way to browse by category and discover
new software. Often, however, the quickest and most effective way to
locate a package is to search with command-line tools.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-cache search` |
|CentOS |`yum search` |
| |`yum search all` |Searches all fields, including description.
|Fedora |`dnf search` |
| |`dnf search all` |Searches all fields, including description.
|SuSE |`zypper se` |
|FreeBSD Packages |`pkg search` |Searches by name.
| |`pkg search -f` |Searches by name, returning full descriptions.
| |`pkg search -D` |Searches description.
|FreeBSD Ports |`cd /usr/ports && make search name=package` |Searches by name.
| |`cd /usr/ports && make search key=` |Searches comments, descriptions, and dependencies.
|=======================================================================
View Info About a Specific Package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When deciding what to install, it's often helpful to read detailed descriptions of packages. Along with human-readable text, these often include metadata like version numbers and a list of the package's dependencies.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-cache show package` |Shows locally-cached info about a package.
| |`dpkg -s package` |Shows the current installed status of a package.
|CentOS |`yum info package` |
| |`yum deplist package` |Lists dependencies for a package.
|Fedora |`dnf info package` |
| |`dnf repoquery -\/-requires package` |Lists dependencies for a package.
|SuSE |`zypper info search string` |Lists dependencies for a package.
|FreeBSD Packages |`pkg info package` |Shows info for an installed package.
|FreeBSD Ports |`cd /usr/ports/category/port && cat pkg-descr` |
|=======================================================================
Install a Package from Repositories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Once you know the name of a package, you can usually install it and its dependencies with a single command. In general, you can supply multiple packages to install simply by listing them all.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-get install package` |
| |`apt-get install package1 package2` |Installs all listed packages.
| |`apt-get install -y package` |Assumes "yes" where apt would usually prompt to continue.
|CentOS |`yum install package` |
| |`yum install package1 package2` |Installs all listed packages.
| |`yum install -y package` |Assumes "yes" where yum would usually prompt to continue.
|Fedora |`dnf install package` |
| |`dnf install package1 package2` |Installs all listed packages.
| |`dnf install -y package` |Assumes "yes" where dnf would usually prompt to continue.
|SuSE |`zypper install` |
|FreeBSD Packages |`pkg install package` |
| |`pkg install package1 package2` |Installs all listed packages.
|FreeBSD Ports |`cd /usr/ports/category/port && make install` |Builds and installs a port from source.
|=======================================================================
Install a Package from the Local Filesystem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sometimes, even though software isn't officially packaged for a given operating system, a developer or vendor will offer package files for download. You can usually retrieve these with your web browser, or viacurl on the command line. Once a package is on the target system, it can often be installed with a single command.
On Debian-derived systems, dpkg handles individual package files. If a package has unmet dependencies, gdebi can often be used to retrieve them from official repositories.
On CentOS and Fedora systems, yum and dnf are used to install individual files, and will also handle needed dependencies.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`dpkg -i package.deb` |
| |`apt-get install -yg debi && gdebi package.deb` |Installs and uses gdebi to install package.deb and retrieve any missing dependencies.
|CentOS |`yum install package.rpm` |
|Fedora |`dnf install package.rpm` |
|SuSE|`zypper install package.rpm`|
|FreeBSD Packages |`pkg add package.txz` |
| |`pkg add -f package.txz` |Installs package even if already installed.
|=======================================================================
Remove One or More Installed Packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since a package manager knows what files are provided by a given package, it can usually remove them cleanly from a system if the software is no longer needed.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-get remove package` |yum remove package
| |`apt-get autoremove` |Removes unneeded packages.
|CentOS |`yum remove package` |
|Fedora |`dnf erase package` |
|FreeBSD Packages |`pkg delete package` |
| |`pkg autoremove` |Removes unneeded packages.
|SuSE |`zypper rm package` |Removes unneeded packages.
|FreeBSD Ports |`pkg delete package` |
| |`cd /usr/ports/path_to_port && make deinstall` |De-installs an installed port.
|=======================================================================
Get Help
~~~~~~~~
In addition to web-based documentation, keep in mind that Unix manual pages (usually referred to as man pages) are available for most commands from the shell. To read a page, use the `man` command. For example, `man yum` will give you a brief manual on how to use yum.
Conclusion and Further Reading
------------------------------
This guide provides an overview of basic operations that can be
cross-referenced between systems, but only scratches the surface of a
complex topic. For greater detail on a given system, you can consult the
following resources:
1. https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials[This
guide] covers Ubuntu and Debian package management in detail.
2. There's an https://www.centos.org/docs/5/html/yum/[official CentOS guide to managing software with yum].
3. There's a https://fedoraproject.org/wiki/Dnf[Fedora wiki page about dnf], and an https://dnf.readthedocs.org/en/latest/index.html[official manual for dnf itself]
4. https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg[This guide] covers FreeBSD package management using pkg.
5. The https://www.freebsd.org/doc/handbook/[FreeBSD Handbook] contains
a https://www.freebsd.org/doc/handbook/ports-using.html[section on using
the Ports Collection].
6. http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.sw_cl.html[OpenSuSE documentation for Zypper] and http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.onlineupdate.you.html[YaST].

View File

@ -1,532 +1,659 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!-- XML file was created by LyX 2.1.4
See http://www.lyx.org/ for more information -->
<article lang="en_US">
<articleinfo>
<title>Package Management Basics: apt, yum, dnf, pkg</title>
</articleinfo><sect1>
<title>Introduction</title>
<sect2>
<title>Why was this document written?</title>
<para>Most modern Unix-like operating systems offer a centralized mechanism for finding and installing software. Software is usually distributed in the form of;packages, kept in;repositories. Working with packages is known as;package management. Packages provide the basic components of an operating system, along with shared libraries, applications, services, and documentation.</para>
<para>A package management system does much more than one-time installation of software. It also provides tools for upgrading already-installed packages. Package repositories help to ensure that code has been vetted for use on your system, and that the installed versions of software have been approved by developers and package maintainers.</para>
<para>When configuring servers or development environments, it's often necessary look beyond official repositories. Packages in the stable release of a distribution may be out of date, especially where new or rapidly-changing software is concerned. Nevertheless, package management is a vital skill for system administrators and developers, and the wealth of packaged software for major distributions is a tremendous resource.</para>
<para>This guide is intended as a quick reference for the fundamentals of finding, installing, and upgrading packages on a variety of distributions, and should help you translate that knowledge between systems.</para></sect2><sect2>
<?asciidoc-toc?>
<?asciidoc-numbered?>
<article xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
<info>
<title>Package Management Basics</title>
<subtitle>apt, yum, dnf, zypper, and pkg</subtitle>
<date>2016-03-21</date>
</info>
<section xml:id="_abstract">
<title>Abstract</title>
<simpara>This guide is intended as a quick reference for the fundamentals of finding, installing, and upgrading packages on a variety of distributions, and should help you translate that knowledge between systems.</simpara>
</section>
<section xml:id="_audience">
<title>Audience</title>
<para>For those new to Linux who need a basic understanding of package management.</para></sect2><sect2>
<simpara>For those new to Linux who need a basic understanding of package management.</simpara>
</section>
<section xml:id="_original_version_of_this_doc">
<title>Original version of this doc</title>
<para>The original version of this guide can be found at <ulink url="https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg">Digital Ocean</ulink>.</para></sect2><sect2>
<simpara>The original version of this guide can be found at <link xl:href="https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg">Digital Ocean</link>.</simpara>
</section>
<section xml:id="_revision_history">
<title>Revision History</title>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="center"/>
<colspec colname="col2" align="center"/>
<informaltable frame="all" rowsep="1" colsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<tbody>
<row>
<entry align="center" valign="top">15.1.2016</entry>
<entry align="center" valign="top">v1.0 converted and edited for TLDP</entry>
<entry align="center" valign="top">Jason Evans</entry>
<entry align="center" valign="top"><simpara>15.1.2016</simpara></entry>
<entry align="center" valign="top"><simpara>v1.0 Converted and edited for TLDP</simpara></entry>
<entry align="center" valign="top"><simpara>Jason Evans</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>15.2.2016</simpara></entry>
<entry align="center" valign="top"><simpara>v1.1 Changed format to asciidoc and made corrections</simpara></entry>
<entry align="center" valign="top"><simpara>Jason Evans</simpara></entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
</tgroup>
</informaltable>
</section>
<section xml:id="_contributions">
<title>Contributions</title>
<itemizedlist>
<listitem><para><ulink url="https://www.digitalocean.com/community/users/bpb">Brennen Bearnes</ulink> (original author).</para></listitem><listitem><para><ulink url="http://wiki.tldp.org/Jason%20Evans">Jason Evans</ulink> (editor and maintainer for TLDP)</para></listitem></itemizedlist></sect2><sect2>
<listitem>
<simpara><link xl:href="https://www.digitalocean.com/community/users/bpb">Brennen Bearnes</link>
(original author).</simpara>
</listitem>
<listitem>
<simpara><link xl:href="http://wiki.tldp.org/Jason%20Evans">Jason Evans</link> (editor and maintainer for TLDP)</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="_feedback">
<title>Feedback</title>
<para>Missing information, missing links, missing characters? Mail it to the maintainer of this document: <ulink url="mailto://jsevans at youvegotthe.info">jsevans at youvegotthe.info</ulink></para></sect2><sect2>
<simpara>Missing information, missing links, missing characters? Mail it to the maintainer of this document: jsevans <emphasis>at</emphasis> youvegotthe.info</simpara>
</section>
<section xml:id="_copyright_information">
<title>Copyright information</title>
<para>This work is licensed under a <ulink url="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</ulink>.</para></sect2><sect2>
<simpara>This work is licensed under a <link xl:href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</link>.</simpara>
</section>
<section xml:id="_introduction">
<title>Introduction</title>
<section xml:id="_why_was_this_document_written">
<title>Why was this document written?</title>
<simpara>Most modern Unix-like operating systems offer a centralized mechanism for finding and installing software. Software is usually distributed in the form of packages, kept in repositories. Working with packages is known as package management. Packages provide the basic components of an operating system, along with shared libraries, applications, services, and documentation.</simpara>
<simpara>A package management system does much more than one-time installation of software. It also provides tools for upgrading already-installed packages. Package repositories help to ensure that code has been vetted for use on your system, and that the installed versions of software have been approved by developers and package maintainers.</simpara>
<simpara>When configuring servers or development environments, it&#8217;s often necessary look beyond official repositories. Packages in the stable release of a distribution may be out of date, especially where new or rapidly-changing software is concerned. Nevertheless, package management is a vital skill for system administrators and developers, and the wealth of packaged software for major distributions is a tremendous
resource.</simpara>
</section>
<section xml:id="_what_do_you_need">
<title>What do you need?</title>
<para>This guide covers Debian, Ubuntu, CentOS, Fedora, and FreeBSD and will require one of those distributions to be installed</para></sect2></sect1><sect1>
<simpara>This guide covers Debian, Ubuntu, CentOS, Fedora, SuSE, and FreeBSD and will require one of those distributions to be installed.</simpara>
<note>
<simpara>All of the commands in this guide assume that the user is running the commands as root or with <literal>sudo</literal>.</simpara>
</note>
</section>
<section xml:id="_package_management_systems_a_brief_overview">
<title>Package Management Systems: A Brief Overview</title>
<para>Most package systems are built around collections of package files. A package file is usually an archive which contains compiled binaries and other resources making up the software, along with installation scripts. Packages also contain valuable metadata, including their;dependencies, a list of other packages required to install and run them.</para>
<para>While their functionality and benefits are broadly similar, packaging formats and tools vary by platform:</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<simpara>In a Windows environment, programs are packaged in .exe or .msi installers which will then install most of the files needed to run the program. If your computer doesn&#8217;t have some dependant applications, then the program that you are trying to run will either not install or not run properly. You will then have to scour the internet in order to find the missing required applications or libraries. For example in CentOS 7, in order to install the VIM text editor, I need to add the following packages:</simpara>
<literallayout class="monospaced"> gpm-libs x86_64 1.20.7-5.el7 base 32 k
groff-base x86_64 1.22.2-8.el7 base 942 k
perl x86_64 4:5.16.3-286.el7 base 8.0 M
perl-Carp noarch 1.26-244.el7 base 19 k
perl-Encode x86_64 2.51-7.el7 base 1.5 M
perl-Exporter noarch 5.68-3.el7 base 28 k
perl-File-Path noarch 2.09-2.el7 base 26 k
perl-File-Temp noarch 0.23.01-3.el7 base 56 k
perl-Filter x86_64 1.49-3.el7 base 76 k
perl-Getopt-Long noarch 2.40-2.el7 base 56 k
perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k
perl-PathTools x86_64 3.40-5.el7 base 82 k
perl-Pod-Escapes noarch 1:1.04-286.el7 base 50 k
perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k
perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k
perl-Pod-Usage noarch 1.63-3.el7 base 27 k
perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k
perl-Socket x86_64 2.010-3.el7 base 49 k
perl-Storable x86_64 2.45-3.el7 base 77 k
perl-Text-ParseWords noarch 3.29-4.el7 base 14 k
perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k
perl-Time-Local noarch 1.2300-2.el7 base 24 k
perl-constant noarch 1.27-2.el7 base 19 k
perl-libs x86_64 4:5.16.3-286.el7 base 687 k
perl-macros x86_64 4:5.16.3-286.el7 base 43 k
perl-parent noarch 1:0.225-244.el7 base 12 k
perl-podlators noarch 2.5.1-3.el7 base 112 k
perl-threads x86_64 1.87-4.el7 base 49 k
perl-threads-shared x86_64 1.43-6.el7 base 39 k
vim-common x86_64 2:7.4.160-1.el7 base 5.9 M
vim-filesystem x86_64 2:7.4.160-1.el7 base 9.6 k
which x86_64 2.20-7.el7 base 41 k</literallayout>
<simpara>Imagine trying to manually install all of these programs one at a time just to be able to install a text editor! In the early days of Linux, we faced these kinds of problems, however this problem is fixed with package management systems such as apt, yum, and others. Package managers simplify everything. They look at the package that you want to install such as VIM, LibreOffice, etc., then look at what other package it depends upon, the dependencies of those packages, and so on; then it downloads them all and installs them. For example, in order to install VIM in CentOS 7 today, I simply have to run <literal>yum install vim</literal>.</simpara>
<section xml:id="_some_different_package_management_systems">
<title>Some different package management systems:</title>
<simpara>While their functionality and benefits are broadly similar, packaging formats and tools vary by platform:</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<thead>
<row>
<entry align="center" valign="top">Operating System </entry>
<entry align="left" valign="top">Format </entry>
<entry align="center" valign="top">Operating System</entry>
<entry align="left" valign="top">Format</entry>
<entry align="center" valign="top">Tool(s)</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian </entry>
<entry align="left" valign="top">.deb </entry>
<entry align="center" valign="top">apt, apt-cache, apt-get, dpkg</entry>
<entry align="center" valign="top"><simpara>Debian</simpara></entry>
<entry align="left" valign="top"><simpara>.deb</simpara></entry>
<entry align="center" valign="top"><simpara>apt, apt-cache, apt-get, dpkg</simpara></entry>
</row>
<row>
<entry align="center" valign="top">Ubuntu </entry>
<entry align="left" valign="top">.deb </entry>
<entry align="center" valign="top">apt, apt-cache, apt-get, dpkg</entry>
<entry align="center" valign="top"><simpara>Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara>.deb</simpara></entry>
<entry align="center" valign="top"><simpara>apt, apt-cache, apt-get, dpkg</simpara></entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">.rpm </entry>
<entry align="center" valign="top">yum</entry>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara>.rpm</simpara></entry>
<entry align="center" valign="top"><simpara>yum</simpara></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">.rpm </entry>
<entry align="center" valign="top">dnf</entry>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara>.rpm</simpara></entry>
<entry align="center" valign="top"><simpara>dnf</simpara></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD </entry>
<entry align="left" valign="top">Ports,;.txz </entry>
<entry align="center" valign="top">make, pkg</entry>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara>.rpm</simpara></entry>
<entry align="center" valign="top"><simpara>zypper</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD</simpara></entry>
<entry align="left" valign="top"><simpara>Ports, .txz</simpara></entry>
<entry align="center" valign="top"><simpara>make, pkg</simpara></entry>
</row>
</tbody>
</tgroup></informaltable>
<para>In Debian and systems based on it, like Ubuntu, Linux Mint, and Raspbian, the package format is the;.debfile. APT, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level;dpkg;utility, which handles the installation of individual;.deb;files on the local system, and is sometimes invoked directly.</para>
<para>CentOS, Fedora, and other members of the Red Hat family use RPM files. In CentOS,;yum;is used to interact with both individual package files and repositories.</para>
<para>In recent versions of Fedora,;yum;has been supplanted by;dnf, a modernized fork which retains most ofyum's interface.</para>
<para>FreeBSD's binary package system is administered with the;pkg;command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. It's usually much more convenient to use;pkg, but occasionally a pre-compiled package is unavailable, or you may need to change compile-time options.</para><sect2>
</tgroup>
</informaltable>
<simpara>In Debian and systems based on it, like Ubuntu, Linux Mint, and Raspbian, the package format is the .debfile. APT, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.</simpara>
<simpara>Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been supplanted by dnf, a modernized fork which retains most of yum&#8217;s interface.</simpara>
<simpara>SuSE also uses RPM files. However, the package management software is known as zypper. Zypper&#8217;s command line interface is very similar to yum and YasT can be access from a graphical mode or from the command line.</simpara>
<simpara>FreeBSD&#8217;s binary package system is administered with the pkg command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. It&#8217;s usually much more convenient to use pkg, but occasionally a pre-compiled package is unavailable, or syou may need to change compile-time options.</simpara>
</section>
<section xml:id="_update_package_lists">
<title>Update Package Lists</title>
<para>Most systems keep a local database of the packages available from remote repositories. It's best to update this database before installing or upgrading packages. As a partial exception to this pattern,;yumand;dnf;will check for updates before performing some operations, but you can ask them at any time whether updates are available.</para>
<informaltable><tgroup cols="2" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="center"/>
<simpara>Most systems keep a local database of the packages available from remote repositories. It&#8217;s best to update this database before installing or upgrading packages. As a partial exception to this pattern, yum and dnf will check for updates before performing some operations, but you can ask them at any time whether updates are available.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<tgroup cols="2">
<colspec colname="col_1" colwidth="50*"/>
<colspec colname="col_2" colwidth="50*"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="center" valign="top">System</entry>
<entry align="center" valign="top">Command</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="center" valign="top">sudo apt-get update</entry>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="center" valign="top"><simpara><literal>apt-get update</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="center" valign="top">yum check-update</entry>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="center" valign="top"><simpara><literal>yum check-update</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="center" valign="top">dnf check-update</entry>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="center" valign="top"><simpara><literal>dnf check-update</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="center" valign="top">sudo pkg update</entry>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="center" valign="top"><simpara><literal>zypper refresh</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="center" valign="top">sudo portsnap fetch update</entry>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="center" valign="top"><simpara><literal>pkg update</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="center" valign="top"><simpara><literal>portsnap fetch update</literal></simpara></entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
</tgroup>
</informaltable>
</section>
<section xml:id="_upgrade_installed_packages">
<title>Upgrade Installed Packages</title>
<para>Making sure that all of the installed software on a machine stays up to date would be an enormous undertaking without a package system. You would have to track upstream changes and security alerts for hundreds of different packages. While a package manager doesn't solve every problem you'll encounter when upgrading software, it does enable you to maintain most system components with a few commands.</para>
<para>On FreeBSD, upgrading installed ports can introduce breaking changes or require manual configuration steps. It's best to read;/usr/ports/UPDATING;before upgrading with;portmaster.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<simpara>Making sure that all of the installed software on a machine stays up to date would be an enormous undertaking without a package system. You would have to track upstream changes and security alerts for hundreds of different packages. While a package manager doesn&#8217;t solve every problem you&#8217;ll encounter when upgrading software, it does enable you to maintain most system components with a few commands.</simpara>
<simpara>On FreeBSD, upgrading installed ports can introduce breaking changes or require manual configuration steps. It&#8217;s best to read /usr/ports/UPDATING before upgrading with portmaster.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">sudo apt-get upgrade </entry>
<entry align="center" valign="top">Only upgrades installed packages, where possible.</entry>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-get upgrade</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Only upgrades installed packages, where possible.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get dist-upgrade </entry>
<entry align="center" valign="top">May add or remove packages to satisfy new dependencies.</entry>
<entry align="left" valign="top"><simpara><literal>apt-get dist-upgrade</literal></simpara></entry>
<entry align="center" valign="top"><simpara>May add or remove packages to satisfy new dependencies.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">sudo yum update </entry>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum update</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">sudo dnf upgrade </entry>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf upgrade</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">sudo pkg upgrade </entry>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper update</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">less /usr/ports/UPDATING </entry>
<entry align="center" valign="top">Uses;less;to view update notes for ports (use arrow keys to scroll, pressq;to quit).</entry>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg upgrade</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>less /usr/ports/UPDATING</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Uses less to view update notes for ports (use arrow keys to scroll, pressq to quit).</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">cd /usr/ports/ports-mgmt/portmaster &amp;&amp; sudo make install &amp;&amp; sudo portmaster -a </entry>
<entry align="center" valign="top">Installs;portmaster;and uses it to update installed ports.</entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/ports-mgmt/portmaster &amp;&amp; make install &amp;&amp; portmaster -a</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs portmaster and uses it to update installed ports.</simpara></entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
</tgroup>
</informaltable>
</section>
</section>
<section xml:id="_find_a_package">
<title>Find a Package</title>
<para>Most distributions offer a graphical or menu-driven front end to package collections. These can be a good way to browse by category and discover new software. Often, however, the quickest and most effective way to locate a package is to search with command-line tools.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<simpara>Most distributions offer a graphical or menu-driven front end to package
collections. These can be a good way to browse by category and discover
new software. Often, however, the quickest and most effective way to
locate a package is to search with command-line tools.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">apt-cache search;search_string </entry>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-cache search</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">yum search;search_string </entry>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum search</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">yum search all;search_string </entry>
<entry align="center" valign="top">Searches all fields, including description.</entry>
<entry align="left" valign="top"><simpara><literal>yum search all</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches all fields, including description.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">dnf search;search_string </entry>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf search</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">dnf search all;search_string </entry>
<entry align="center" valign="top">Searches all fields, including description.</entry>
<entry align="left" valign="top"><simpara><literal>dnf search all</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches all fields, including description.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">pkg search;search_string </entry>
<entry align="center" valign="top">Searches by name.</entry>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper se</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg search</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches by name.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">pkg search -f;search_string </entry>
<entry align="center" valign="top">Searches by name, returning full descriptions.</entry>
<entry align="left" valign="top"><simpara><literal>pkg search -f</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches by name, returning full descriptions.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">pkg search -D;search_string </entry>
<entry align="center" valign="top">Searches description.</entry>
<entry align="left" valign="top"><simpara><literal>pkg search -D</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches description.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">cd /usr/ports &amp;&amp; make search name=package </entry>
<entry align="center" valign="top">Searches by name.</entry>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports &amp;&amp; make search name=package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches by name.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">cd /usr/ports &amp;&amp; make search key=search_string </entry>
<entry align="center" valign="top">Searches comments, descriptions, and dependencies.</entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports &amp;&amp; make search key=</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches comments, descriptions, and dependencies.</simpara></entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
</tgroup>
</informaltable>
</section>
<section xml:id="_view_info_about_a_specific_package">
<title>View Info About a Specific Package</title>
<para>When deciding what to install, it's often helpful to read detailed descriptions of packages. Along with human-readable text, these often include metadata like version numbers and a list of the package's dependencies.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<simpara>When deciding what to install, it&#8217;s often helpful to read detailed descriptions of packages. Along with human-readable text, these often include metadata like version numbers and a list of the package&#8217;s dependencies.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">apt-cache show;package </entry>
<entry align="center" valign="top">Shows locally-cached info about a package.</entry>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-cache show package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Shows locally-cached info about a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">dpkg -s;package </entry>
<entry align="center" valign="top">Shows the current installed status of a package.</entry>
<entry align="left" valign="top"><simpara><literal>dpkg -s package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Shows the current installed status of a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">yum info;package </entry>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum info package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">yum deplist;package </entry>
<entry align="center" valign="top">Lists dependencies for a package.</entry>
<entry align="left" valign="top"><simpara><literal>yum deplist package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Lists dependencies for a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">dnf info;package </entry>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf info package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">dnf repoquery -\/-requires;package </entry>
<entry align="center" valign="top">Lists dependencies for a package.</entry>
<entry align="left" valign="top"><simpara><literal>dnf repoquery -\/-requires package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Lists dependencies for a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">pkg info;package </entry>
<entry align="center" valign="top">Shows info for an installed package.</entry>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper info search string</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Lists dependencies for a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">cd /usr/ports/category/port;&amp;&amp; cat pkg-descr </entry>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg info package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Shows info for an installed package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/category/port &amp;&amp; cat pkg-descr</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
</tgroup>
</informaltable>
</section>
<section xml:id="_install_a_package_from_repositories">
<title>Install a Package from Repositories</title>
<para>Once you know the name of a package, you can usually install it and its dependencies with a single command. In general, you can supply multiple packages to install simply by listing them all.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<simpara>Once you know the name of a package, you can usually install it and its dependencies with a single command. In general, you can supply multiple packages to install simply by listing them all.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">sudo apt-get install;package </entry>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-get install package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get install;package1 package2 ... </entry>
<entry align="center" valign="top">Installs all listed packages.</entry>
<entry align="left" valign="top"><simpara><literal>apt-get install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get install -y;package </entry>
<entry align="center" valign="top">Assumes "yes" where;apt;would usually prompt to continue.</entry>
<entry align="left" valign="top"><simpara><literal>apt-get install -y package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Assumes "yes" where apt would usually prompt to continue.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">sudo yum install;package </entry>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum install package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo yum install;package1 package2 ... </entry>
<entry align="center" valign="top">Installs all listed packages.</entry>
<entry align="left" valign="top"><simpara><literal>yum install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo yum install -y;package </entry>
<entry align="center" valign="top">Assumes "yes" where;yum;would usually prompt to continue.</entry>
<entry align="left" valign="top"><simpara><literal>yum install -y package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Assumes "yes" where yum would usually prompt to continue.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">sudo dnf install;package </entry>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf install package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo dnf install;package1 package2 ... </entry>
<entry align="center" valign="top">Installs all listed packages.</entry>
<entry align="left" valign="top"><simpara><literal>dnf install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo dnf install -y;package </entry>
<entry align="center" valign="top">Assumes "yes" where;dnf;would usually prompt to continue.</entry>
<entry align="left" valign="top"><simpara><literal>dnf install -y package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Assumes "yes" where dnf would usually prompt to continue.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">sudo pkg install;package </entry>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper install</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg install package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo pkg install;package1 package2 ... </entry>
<entry align="center" valign="top">Installs all listed packages.</entry>
<entry align="left" valign="top"><simpara><literal>pkg install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">cd /usr/ports/category/port;&amp;&amp; sudo make install </entry>
<entry align="center" valign="top">Builds and installs a port from source.</entry>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/category/port &amp;&amp; make install</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Builds and installs a port from source.</simpara></entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
</tgroup>
</informaltable>
</section>
<section xml:id="_install_a_package_from_the_local_filesystem">
<title>Install a Package from the Local Filesystem</title>
<para>Sometimes, even though software isn't officially packaged for a given operating system, a developer or vendor will offer package files for download. You can usually retrieve these with your web browser, or viacurl;on the command line. Once a package is on the target system, it can often be installed with a single command.</para>
<para>On Debian-derived systems,;dpkg;handles individual package files. If a package has unmet dependencies,;gdebi;can often be used to retrieve them from official repositories.</para>
<para>On CentOS and Fedora systems,;yum;and;dnf;are used to install individual files, and will also handle needed dependencies.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<simpara>Sometimes, even though software isn&#8217;t officially packaged for a given operating system, a developer or vendor will offer package files for download. You can usually retrieve these with your web browser, or viacurl on the command line. Once a package is on the target system, it can often be installed with a single command.</simpara>
<simpara>On Debian-derived systems, dpkg handles individual package files. If a package has unmet dependencies, gdebi can often be used to retrieve them from official repositories.</simpara>
<simpara>On CentOS and Fedora systems, yum and dnf are used to install individual files, and will also handle needed dependencies.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">sudo dpkg -i;package.deb </entry>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dpkg -i package.deb</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get install -ygdebi &amp;&amp; sudo gdebipackage.deb </entry>
<entry align="center" valign="top">Installs and uses gdebi to install package.deb and retrieve any missing dependencies.</entry>
<entry align="left" valign="top"><simpara><literal>apt-get install -yg debi &amp;&amp; gdebi package.deb</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs and uses gdebi to install package.deb and retrieve any missing dependencies.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">sudo yum install;package.rpm </entry>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum install package.rpm</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">sudo dnf install;package.rpm </entry>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf install package.rpm</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">sudo pkg add;package.txz </entry>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper install package.rpm</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg add package.txz</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo pkg add -f;package.txz </entry>
<entry align="center" valign="top">Installs package even if already installed.</entry>
<entry align="left" valign="top"><simpara><literal>pkg add -f package.txz</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs package even if already installed.</simpara></entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
</tgroup>
</informaltable>
</section>
<section xml:id="_remove_one_or_more_installed_packages">
<title>Remove One or More Installed Packages</title>
<para>Since a package manager knows what files are provided by a given package, it can usually remove them cleanly from a system if the software is no longer needed.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<simpara>Since a package manager knows what files are provided by a given package, it can usually remove them cleanly from a system if the software is no longer needed.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">sudo apt-get remove;package </entry>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-get remove package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>yum remove package</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top"><simpara><literal>apt-get autoremove</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Removes unneeded packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum remove package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf erase package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg delete package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get autoremove </entry>
<entry align="center" valign="top">Removes unneeded packages.</entry>
<entry align="left" valign="top"><simpara><literal>pkg autoremove</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Removes unneeded packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">sudo yum remove;package </entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper rm package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Removes unneeded packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">sudo dnf erase;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">sudo pkg delete;package </entry>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg delete package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo pkg autoremove </entry>
<entry align="center" valign="top">Removes unneeded packages.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">sudo pkg delete;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">cd /usr/ports/path_to_port;&amp;&amp; make deinstall </entry>
<entry align="center" valign="top">De-installs an installed port.</entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/path_to_port &amp;&amp; make deinstall</literal></simpara></entry>
<entry align="center" valign="top"><simpara>De-installs an installed port.</simpara></entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
</tgroup>
</informaltable>
</section>
<section xml:id="_get_help">
<title>Get Help</title>
<para>In addition to web-based documentation, keep in mind that Unix manual pages (usually referred to as;man pages) are available for most commands from the shell. To read a page, use man:</para><screen>
<![CDATA[$ man page
]]></screen><para>In man, you can navigate with the arrow keys. Press / to search for text within the page, and q to quit.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">man apt-get </entry>
<entry align="center" valign="top">Updating the local package database and working with packages.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">man apt-cache </entry>
<entry align="center" valign="top">Querying the local package database.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">man dpkg </entry>
<entry align="center" valign="top">Working with individual package files and querying installed packages.</entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">man yum </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">man dnf </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">man pkg </entry>
<entry align="center" valign="top">Working with pre-compiled binary packages.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">man ports </entry>
<entry align="center" valign="top">Working with the Ports Collection.</entry>
</row>
</tbody>
</tgroup></informaltable></sect2></sect1><sect1>
<simpara>In addition to web-based documentation, keep in mind that Unix manual pages (usually referred to as man pages) are available for most commands from the shell. To read a page, use the <literal>man</literal> command. For example, <literal>man yum</literal> will give you a brief manual on how to use yum.</simpara>
</section>
</section>
<section xml:id="_conclusion_and_further_reading">
<title>Conclusion and Further Reading</title>
<para>This guide provides an overview of basic operations that can be cross-referenced between systems, but only scratches the surface of a complex topic. For greater detail on a given system, you can consult the following resources:</para><orderedlist>
<listitem><para><ulink url="https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials">This guide</ulink> covers Ubuntu and Debian package management in detail. </para></listitem><listitem><para>There's an <ulink url="https://www.centos.org/docs/5/html/yum/">official CentOS guide to managing software with~</ulink><ulink url="https://www.centos.org/docs/5/html/yum/">yum</ulink>. </para></listitem><listitem><para>There's a <ulink url="https://fedoraproject.org/wiki/Dnf">Fedora wiki page about~</ulink><ulink url="https://fedoraproject.org/wiki/Dnf">dnf</ulink>, and an <ulink url="https://dnf.readthedocs.org/en/latest/index.html">official manual for~</ulink><ulink url="https://dnf.readthedocs.org/en/latest/index.html">dnf</ulink><ulink url="https://dnf.readthedocs.org/en/latest/index.html">~itself</ulink>. </para></listitem><listitem><para><ulink url="https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg">This guide</ulink> covers FreeBSD package management using pkg. </para></listitem><listitem><para>The <ulink url="https://www.freebsd.org/doc/handbook/">FreeBSD Handbook</ulink>;contains a;<ulink url="https://www.freebsd.org/doc/handbook/ports-using.html">section on using the Ports Collection</ulink>. </para></listitem></orderedlist></sect1></article>
<simpara>This guide provides an overview of basic operations that can be
cross-referenced between systems, but only scratches the surface of a
complex topic. For greater detail on a given system, you can consult the
following resources:</simpara>
<orderedlist numeration="arabic">
<listitem>
<simpara><link xl:href="https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials">This
guide</link> covers Ubuntu and Debian package management in detail.</simpara>
</listitem>
<listitem>
<simpara>There&#8217;s an <link xl:href="https://www.centos.org/docs/5/html/yum/">official CentOS guide to managing software with yum</link>.</simpara>
</listitem>
<listitem>
<simpara>There&#8217;s a <link xl:href="https://fedoraproject.org/wiki/Dnf">Fedora wiki page about dnf</link>, and an <link xl:href="https://dnf.readthedocs.org/en/latest/index.html">official manual for dnf itself</link></simpara>
</listitem>
<listitem>
<simpara><link xl:href="https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg">This guide</link> covers FreeBSD package management using pkg.</simpara>
</listitem>
<listitem>
<simpara>The <link xl:href="https://www.freebsd.org/doc/handbook/">FreeBSD Handbook</link> contains
a <link xl:href="https://www.freebsd.org/doc/handbook/ports-using.html">section on using
the Ports Collection</link>.</simpara>
</listitem>
<listitem>
<simpara><link xl:href="http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.sw_cl.html">OpenSuSE documentation for Zypper</link> and <link xl:href="http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.onlineupdate.you.html">YaST</link>.</simpara>
</listitem>
</orderedlist>
</section>
</article>

View File

@ -1,309 +0,0 @@
#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 474
\begin_document
\begin_header
\textclass docbook
\use_default_options false
\maintain_unincluded_children false
\language english
\language_package none
\inputencoding auto
\fontencoding default
\font_roman default
\font_sans default
\font_typewriter default
\font_math auto
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 0
\use_package cancel 0
\use_package esint 1
\use_package mathdots 0
\use_package mathtools 0
\use_package mhchem 0
\use_package stackrel 0
\use_package stmaryrd 0
\use_package undertilde 0
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Section
About this document
\end_layout
\begin_layout Subsection
Copyright and License
\end_layout
\begin_layout Standard
This work is licensed under the
\begin_inset CommandInset href
LatexCommand href
name "Creative Commons Attribution-ShareAlike 4.0 International License"
target "http://creativecommons.org/licenses/by-sa/4.0/"
\end_inset
\end_layout
\begin_layout Subsection
Revision History
\end_layout
\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="1" columns="3">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
17.1.2016
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
v1.0 First draft written
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Jason Evans
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\begin_layout Subsection
Contributions
\end_layout
\begin_layout Itemize
\begin_inset CommandInset href
LatexCommand href
name "Jason Evans"
target "http://wiki.tldp.org/Jason%20Evans"
\end_inset
(Original author and maintainer for TLDP)
\end_layout
\begin_layout Subsection
Feedback
\end_layout
\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
name "feedback"
\end_inset
\end_layout
\begin_layout Standard
Find something wrong with this document? (Or perhaps something right?) I
would love to hear from you.
Please email me at
\begin_inset CommandInset href
LatexCommand href
name "jsevans_at_youvegotthe.info"
target "jsevans_at_youvegotthe.info"
type "mailto:"
\end_inset
.
\end_layout
\begin_layout Section
About My Topic
\end_layout
\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
name "about"
\end_inset
\end_layout
\begin_layout Standard
In the past, The Linux Documentation Project used CVS as a version control
system, however a few years ago it was moved to GitHub but there was no
accompanying documentation for adding new material to TLDP
\end_layout
\begin_layout Section
Basic Terminology and Commands
\end_layout
\begin_layout Standard
Push
\end_layout
\begin_layout Standard
Pull
\end_layout
\begin_layout Standard
Commit
\end_layout
\begin_layout Standard
Branch
\end_layout
\begin_layout Standard
Repository
\end_layout
\begin_layout Standard
Fork
\end_layout
\begin_layout Standard
Clone
\end_layout
\begin_layout Standard
Diff
\end_layout
\begin_layout Standard
Fetch
\end_layout
\begin_layout Section
What is Git and GutHub?
\end_layout
\begin_layout Subsection
What is Git?
\end_layout
\begin_layout Subsection
What does GitHub do?
\end_layout
\begin_layout Section
Installing Git
\end_layout
\begin_layout Subsection
From Ubuntu or Debian
\end_layout
\begin_layout Code
$ sudo apt-get install git
\end_layout
\begin_layout Subsection
From Fedora, CentOS, or RHEL
\end_layout
\begin_layout Code
$ sudo yum install git
\end_layout
\begin_layout Subsection
From Fedora 23 or later
\end_layout
\begin_layout Code
$ sudo dnf install git
\end_layout
\begin_layout Subsection
From OpenSuSE or SLES
\end_layout
\begin_layout Code
$ sudo zypper install git
\end_layout
\begin_layout Section
Finding TLDP on GitHub
\end_layout
\begin_layout Standard
TLDP's main GitHub url is
\begin_inset CommandInset href
LatexCommand href
target "https://github.com/tLDP/LDP"
\end_inset
.
Anyone can download the documents in TLDP anonymously, but an acount on
github.com is required to upload
\end_layout
\end_body
\end_document

View File

@ -0,0 +1,33 @@
#!/bin/bash
####################################
#
# Backup to NFS mount script.
#
####################################
# What to backup.
backup_files="/home /var/www /etc "
# Where to backup to.
dest="/mnt/backup"
# Create archive filename.
day=$(date +%A)
hostname=$(hostname -s)
archive_file="$hostname-$day.tgz"
# Print start status message.
echo "Backing up $backup_files to $dest/$archive_file"
date
echo
# Backup the files using tar.
tar czf $dest/$archive_file $backup_files
# Print end status message.
echo
echo "Backup finished"
date
# Long listing of files in $dest to check file sizes.
ls -lh $dest

View File

@ -0,0 +1,147 @@
= How to Perform at Backup of a Simple LAMP Server.
Outline:
* What Do we need to back up?
** /home
** /etc
** /var/www
** MySQL/MariaDB
* How to we back it up?
** Network Storage and Cloud
** Physical Media
** Scripts
** Bakula
* How do we restore from backup?
* How do we automate the process?
** Crontabs
== Revision History
[cols="<,<,<,<",options="header",]
|==========================================================================================================================================================
|Revision |Date |Person |Note
|Revision 1.0 |2016-02-24 |Revised by: Jason Evans | Initial writing and compiling
|==========================================================================================================================================================
== Introduction
Losing data is no laughing matter. Disks fails, servers crash, and sometimes mistakes happen. How do we avoid catastrophic losses of data? We make backups! This guide is an attempt to show the Linux newbie how to back up a simple web server, but it's not limited to that. Using the techniques in this quide, you can back up your LAMP server to network, cloud, or physical storage. While it's written for a LAMP server specifically, this guide is meant to be more than just a dry howto for a specific type of server. Linux is flexible and easy to adapt to a number of uses. Where you learn one skill, you can apply it to a thousand other issues.
== License Information
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.
== Disclaimers
No liability for the contents of this documents can be accepted by the author, the http://www.tldp.org/[Linux Documentation Project] or anyone else. Use the concepts, examples and other content at your own risk. There may be errors and inaccuracies that may have unexpected results. Proceed with caution and although errors are unlikely, the author take no responsibility for them.
You are strongly recommended to take a backup of your system before major installation and backups at regular intervals. In addition, you are strongly recommended to use a sacrificial VM when experimenting.
== Credits
Thanks to Larisa Alekseeva for your support and to the http://trilug.org[Triangle Linux Users Group] for helping me get a foothold in Linux.
Thanks to http://www.charlescurley.com/[Charles Curley] for creating the original http://tldp.org/HOWTO/Linux-Complete-Backup-and-Recovery-HOWTO/index.html[Linux Complete Backup and Recovery HOWTO]
Thanks to Ubuntu for the https://help.ubuntu.com/lts/serverguide/backup-shellscripts.html[tar script].
== Feedback
Feedback is most certainly welcome for this document. Without your corrections, suggestions and other input, this document wouldn't exist. Please send your additions, comments and criticisms to me at: jason.s.evans@gmail.com
== Translations
Volunteers are welcome.
== Overview
== Preparation
In order to You will need a computer or server running CentOS or Ubuntu in a LAMP (Linux, Apache, MySQL, PHP) configuration. You may apply the strategies discussed to many other distributions such as Red Hat Enterprise Linux, Fedora, Debian, or one of their derivatives. This guide touches on physical servers and VM's (virtual machines).
Note:
Do your normal backups on their regular schedule. This HOWTO is useless if you don't do that.
=== How can I replicate backup the examples:
All examples in this HOWTO will be performed on fresh installations of https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-7[CentOS 7] and https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04[Ubuntu 14.04 LTS]. You can use the linked HOWTO's to bring your test system up to the same level if you wish. I will also create a small MySQL database using steps from https://codex.wordpress.org/Installing_WordPress#Using_the_MySQL_Client[Wordpress] in order to show how to backup and restore it.
== Where do we begin?
=== What do I need to back up?
There are three directories that absolutely must be backed up: `/home`, `/var/www`, and `/etc` as well as the MySQL database.
==== Files to be backed up.
The following shell script uses tar to create an archive file on a remotely mounted NFS file system. The archive filename is determined using additional command line utilities.
[source,bash]
----
#!/bin/bash
####################################
#
# Compress files script
#
####################################
# What to backup.
backup_files="/home /var/spool/mail /etc /root /boot /opt" // <1>
# Where to backup to.
dest="/mnt/backup" // <2>
# Create archive filename.
day=$(date +%A)
hostname=$(hostname -s)
archive_file="$hostname-$day.tgz"
# Print start status message.
echo "Backing up $backup_files to $dest/$archive_file"
date
echo
# Backup the files using tar.
tar czf $dest/$archive_file $backup_files
# Print end status message.
echo
echo "Backup finished"
date
# Long listing of files in $dest to check file sizes.
ls -lh $dest
----
<1> The directories listed here will be backed up by this script recursively.
<2> This is the directory where the backup file will be placed at the end.
==== Backing up MySQL.
This step assumes that you already have administrative access to the database that you want to backup. The following command has three parts, the `username`, the `database_to_backup`, and the name of the file to backup.
----
mysqldump -u username -p database_to_backup > backup_name.sql
----
In the following example, the owner is `root` and the database is called `wordpress`.
----
jsevans@26599ca1e943:~$ mysqldump -u root -p wordpress > wordpress.sql
Enter password:
jsevans@26599ca1e943:~$ ls -l wordpress.sql
-rw-rw-r-- 1 jsevans jsevans 1864993 Mar 3 13:28 wordpress.sql
----
After the backup is completed, we can the compress it like we did with the other files.
----
tar czf backup_name.tgz backup_name.sql
----
Now that we have a backup of our website and other important files, where should we keep them?
== Backup storage
"Where should I keep my backups?", is a questions with a lot of different possible answers. It is best to keep a few of the latest backups in an easy to reach place in case they are needed soon.

File diff suppressed because it is too large Load Diff

View File

@ -1,532 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!-- XML file was created by LyX 2.1.4
See http://www.lyx.org/ for more information -->
<article lang="en_US">
<articleinfo>
<title>Package Management Basics: apt, yum, dnf, pkg</title>
</articleinfo><sect1>
<title>Introduction</title>
<sect2>
<title>Why was this document written?</title>
<para>Most modern Unix-like operating systems offer a centralized mechanism for finding and installing software. Software is usually distributed in the form of;packages, kept in;repositories. Working with packages is known as;package management. Packages provide the basic components of an operating system, along with shared libraries, applications, services, and documentation.</para>
<para>A package management system does much more than one-time installation of software. It also provides tools for upgrading already-installed packages. Package repositories help to ensure that code has been vetted for use on your system, and that the installed versions of software have been approved by developers and package maintainers.</para>
<para>When configuring servers or development environments, it's often necessary look beyond official repositories. Packages in the stable release of a distribution may be out of date, especially where new or rapidly-changing software is concerned. Nevertheless, package management is a vital skill for system administrators and developers, and the wealth of packaged software for major distributions is a tremendous resource.</para>
<para>This guide is intended as a quick reference for the fundamentals of finding, installing, and upgrading packages on a variety of distributions, and should help you translate that knowledge between systems.</para></sect2><sect2>
<title>Audience</title>
<para>For those new to Linux who need a basic understanding of package management.</para></sect2><sect2>
<title>Original version of this doc</title>
<para>The original version of this guide can be found at <ulink url="https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg">Digital Ocean</ulink>.</para></sect2><sect2>
<title>Revision History</title>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="center"/>
<colspec colname="col2" align="center"/>
<tbody>
<row>
<entry align="center" valign="top">15.1.2016</entry>
<entry align="center" valign="top">v1.0 converted and edited for TLDP</entry>
<entry align="center" valign="top">Jason Evans</entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
<title>Contributions</title>
<itemizedlist>
<listitem><para><ulink url="https://www.digitalocean.com/community/users/bpb">Brennen Bearnes</ulink> (original author).</para></listitem><listitem><para><ulink url="http://wiki.tldp.org/Jason%20Evans">Jason Evans</ulink> (editor and maintainer for TLDP)</para></listitem></itemizedlist></sect2><sect2>
<title>Feedback</title>
<para>Missing information, missing links, missing characters? Mail it to the maintainer of this document: <ulink url="mailto://jsevans at youvegotthe.info">jsevans at youvegotthe.info</ulink></para></sect2><sect2>
<title>Copyright information</title>
<para>This work is licensed under a <ulink url="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</ulink>.</para></sect2><sect2>
<title>What do you need?</title>
<para>This guide covers Debian, Ubuntu, CentOS, Fedora, and FreeBSD and will require one of those distributions to be installed</para></sect2></sect1><sect1>
<title>Package Management Systems: A Brief Overview</title>
<para>Most package systems are built around collections of package files. A package file is usually an archive which contains compiled binaries and other resources making up the software, along with installation scripts. Packages also contain valuable metadata, including their;dependencies, a list of other packages required to install and run them.</para>
<para>While their functionality and benefits are broadly similar, packaging formats and tools vary by platform:</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<thead>
<row>
<entry align="center" valign="top">Operating System </entry>
<entry align="left" valign="top">Format </entry>
<entry align="center" valign="top">Tool(s)</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian </entry>
<entry align="left" valign="top">.deb </entry>
<entry align="center" valign="top">apt, apt-cache, apt-get, dpkg</entry>
</row>
<row>
<entry align="center" valign="top">Ubuntu </entry>
<entry align="left" valign="top">.deb </entry>
<entry align="center" valign="top">apt, apt-cache, apt-get, dpkg</entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">.rpm </entry>
<entry align="center" valign="top">yum</entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">.rpm </entry>
<entry align="center" valign="top">dnf</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD </entry>
<entry align="left" valign="top">Ports,;.txz </entry>
<entry align="center" valign="top">make, pkg</entry>
</row>
</tbody>
</tgroup></informaltable>
<para>In Debian and systems based on it, like Ubuntu, Linux Mint, and Raspbian, the package format is the;.debfile. APT, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level;dpkg;utility, which handles the installation of individual;.deb;files on the local system, and is sometimes invoked directly.</para>
<para>CentOS, Fedora, and other members of the Red Hat family use RPM files. In CentOS,;yum;is used to interact with both individual package files and repositories.</para>
<para>In recent versions of Fedora,;yum;has been supplanted by;dnf, a modernized fork which retains most ofyum's interface.</para>
<para>FreeBSD's binary package system is administered with the;pkg;command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. It's usually much more convenient to use;pkg, but occasionally a pre-compiled package is unavailable, or you may need to change compile-time options.</para><sect2>
<title>Update Package Lists</title>
<para>Most systems keep a local database of the packages available from remote repositories. It's best to update this database before installing or upgrading packages. As a partial exception to this pattern,;yumand;dnf;will check for updates before performing some operations, but you can ask them at any time whether updates are available.</para>
<informaltable><tgroup cols="2" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="center"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="center" valign="top">Command</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="center" valign="top">sudo apt-get update</entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="center" valign="top">yum check-update</entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="center" valign="top">dnf check-update</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="center" valign="top">sudo pkg update</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="center" valign="top">sudo portsnap fetch update</entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
<title>Upgrade Installed Packages</title>
<para>Making sure that all of the installed software on a machine stays up to date would be an enormous undertaking without a package system. You would have to track upstream changes and security alerts for hundreds of different packages. While a package manager doesn't solve every problem you'll encounter when upgrading software, it does enable you to maintain most system components with a few commands.</para>
<para>On FreeBSD, upgrading installed ports can introduce breaking changes or require manual configuration steps. It's best to read;/usr/ports/UPDATING;before upgrading with;portmaster.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">sudo apt-get upgrade </entry>
<entry align="center" valign="top">Only upgrades installed packages, where possible.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get dist-upgrade </entry>
<entry align="center" valign="top">May add or remove packages to satisfy new dependencies.</entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">sudo yum update </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">sudo dnf upgrade </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">sudo pkg upgrade </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">less /usr/ports/UPDATING </entry>
<entry align="center" valign="top">Uses;less;to view update notes for ports (use arrow keys to scroll, pressq;to quit).</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">cd /usr/ports/ports-mgmt/portmaster &amp;&amp; sudo make install &amp;&amp; sudo portmaster -a </entry>
<entry align="center" valign="top">Installs;portmaster;and uses it to update installed ports.</entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
<title>Find a Package</title>
<para>Most distributions offer a graphical or menu-driven front end to package collections. These can be a good way to browse by category and discover new software. Often, however, the quickest and most effective way to locate a package is to search with command-line tools.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">apt-cache search;search_string </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">yum search;search_string </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">yum search all;search_string </entry>
<entry align="center" valign="top">Searches all fields, including description.</entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">dnf search;search_string </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">dnf search all;search_string </entry>
<entry align="center" valign="top">Searches all fields, including description.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">pkg search;search_string </entry>
<entry align="center" valign="top">Searches by name.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">pkg search -f;search_string </entry>
<entry align="center" valign="top">Searches by name, returning full descriptions.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">pkg search -D;search_string </entry>
<entry align="center" valign="top">Searches description.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">cd /usr/ports &amp;&amp; make search name=package </entry>
<entry align="center" valign="top">Searches by name.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">cd /usr/ports &amp;&amp; make search key=search_string </entry>
<entry align="center" valign="top">Searches comments, descriptions, and dependencies.</entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
<title>View Info About a Specific Package</title>
<para>When deciding what to install, it's often helpful to read detailed descriptions of packages. Along with human-readable text, these often include metadata like version numbers and a list of the package's dependencies.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">apt-cache show;package </entry>
<entry align="center" valign="top">Shows locally-cached info about a package.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">dpkg -s;package </entry>
<entry align="center" valign="top">Shows the current installed status of a package.</entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">yum info;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">yum deplist;package </entry>
<entry align="center" valign="top">Lists dependencies for a package.</entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">dnf info;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">dnf repoquery -\/-requires;package </entry>
<entry align="center" valign="top">Lists dependencies for a package.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">pkg info;package </entry>
<entry align="center" valign="top">Shows info for an installed package.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">cd /usr/ports/category/port;&amp;&amp; cat pkg-descr </entry>
<entry align="center" valign="top"></entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
<title>Install a Package from Repositories</title>
<para>Once you know the name of a package, you can usually install it and its dependencies with a single command. In general, you can supply multiple packages to install simply by listing them all.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">sudo apt-get install;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get install;package1 package2 ... </entry>
<entry align="center" valign="top">Installs all listed packages.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get install -y;package </entry>
<entry align="center" valign="top">Assumes "yes" where;apt;would usually prompt to continue.</entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">sudo yum install;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo yum install;package1 package2 ... </entry>
<entry align="center" valign="top">Installs all listed packages.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo yum install -y;package </entry>
<entry align="center" valign="top">Assumes "yes" where;yum;would usually prompt to continue.</entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">sudo dnf install;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo dnf install;package1 package2 ... </entry>
<entry align="center" valign="top">Installs all listed packages.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo dnf install -y;package </entry>
<entry align="center" valign="top">Assumes "yes" where;dnf;would usually prompt to continue.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">sudo pkg install;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo pkg install;package1 package2 ... </entry>
<entry align="center" valign="top">Installs all listed packages.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">cd /usr/ports/category/port;&amp;&amp; sudo make install </entry>
<entry align="center" valign="top">Builds and installs a port from source.</entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
<title>Install a Package from the Local Filesystem</title>
<para>Sometimes, even though software isn't officially packaged for a given operating system, a developer or vendor will offer package files for download. You can usually retrieve these with your web browser, or viacurl;on the command line. Once a package is on the target system, it can often be installed with a single command.</para>
<para>On Debian-derived systems,;dpkg;handles individual package files. If a package has unmet dependencies,;gdebi;can often be used to retrieve them from official repositories.</para>
<para>On CentOS and Fedora systems,;yum;and;dnf;are used to install individual files, and will also handle needed dependencies.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">sudo dpkg -i;package.deb </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get install -ygdebi &amp;&amp; sudo gdebipackage.deb </entry>
<entry align="center" valign="top">Installs and uses gdebi to install package.deb and retrieve any missing dependencies.</entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">sudo yum install;package.rpm </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">sudo dnf install;package.rpm </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">sudo pkg add;package.txz </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo pkg add -f;package.txz </entry>
<entry align="center" valign="top">Installs package even if already installed.</entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
<title>Remove One or More Installed Packages</title>
<para>Since a package manager knows what files are provided by a given package, it can usually remove them cleanly from a system if the software is no longer needed.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">sudo apt-get remove;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo apt-get autoremove </entry>
<entry align="center" valign="top">Removes unneeded packages.</entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">sudo yum remove;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">sudo dnf erase;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">sudo pkg delete;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">sudo pkg autoremove </entry>
<entry align="center" valign="top">Removes unneeded packages.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">sudo pkg delete;package </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">cd /usr/ports/path_to_port;&amp;&amp; make deinstall </entry>
<entry align="center" valign="top">De-installs an installed port.</entry>
</row>
</tbody>
</tgroup></informaltable></sect2><sect2>
<title>Get Help</title>
<para>In addition to web-based documentation, keep in mind that Unix manual pages (usually referred to as;man pages) are available for most commands from the shell. To read a page, use man:</para><screen>
<![CDATA[$ man page
]]></screen><para>In man, you can navigate with the arrow keys. Press / to search for text within the page, and q to quit.</para>
<informaltable><tgroup cols="3" colsep="1" rowsep="1">
<colspec colname="col0" align="center"/>
<colspec colname="col1" align="left"/>
<colspec colname="col2" align="center"/>
<thead>
<row>
<entry align="center" valign="top">System </entry>
<entry align="left" valign="top">Command </entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top">Debian / Ubuntu </entry>
<entry align="left" valign="top">man apt-get </entry>
<entry align="center" valign="top">Updating the local package database and working with packages.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">man apt-cache </entry>
<entry align="center" valign="top">Querying the local package database.</entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="left" valign="top">man dpkg </entry>
<entry align="center" valign="top">Working with individual package files and querying installed packages.</entry>
</row>
<row>
<entry align="center" valign="top">CentOS </entry>
<entry align="left" valign="top">man yum </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">Fedora </entry>
<entry align="left" valign="top">man dnf </entry>
<entry align="center" valign="top"></entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Packages </entry>
<entry align="left" valign="top">man pkg </entry>
<entry align="center" valign="top">Working with pre-compiled binary packages.</entry>
</row>
<row>
<entry align="center" valign="top">FreeBSD Ports </entry>
<entry align="left" valign="top">man ports </entry>
<entry align="center" valign="top">Working with the Ports Collection.</entry>
</row>
</tbody>
</tgroup></informaltable></sect2></sect1><sect1>
<title>Conclusion and Further Reading</title>
<para>This guide provides an overview of basic operations that can be cross-referenced between systems, but only scratches the surface of a complex topic. For greater detail on a given system, you can consult the following resources:</para><orderedlist>
<listitem><para><ulink url="https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials">This guide</ulink> covers Ubuntu and Debian package management in detail. </para></listitem><listitem><para>There's an <ulink url="https://www.centos.org/docs/5/html/yum/">official CentOS guide to managing software with~</ulink><ulink url="https://www.centos.org/docs/5/html/yum/">yum</ulink>. </para></listitem><listitem><para>There's a <ulink url="https://fedoraproject.org/wiki/Dnf">Fedora wiki page about~</ulink><ulink url="https://fedoraproject.org/wiki/Dnf">dnf</ulink>, and an <ulink url="https://dnf.readthedocs.org/en/latest/index.html">official manual for~</ulink><ulink url="https://dnf.readthedocs.org/en/latest/index.html">dnf</ulink><ulink url="https://dnf.readthedocs.org/en/latest/index.html">~itself</ulink>. </para></listitem><listitem><para><ulink url="https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg">This guide</ulink> covers FreeBSD package management using pkg. </para></listitem><listitem><para>The <ulink url="https://www.freebsd.org/doc/handbook/">FreeBSD Handbook</ulink>;contains a;<ulink url="https://www.freebsd.org/doc/handbook/ports-using.html">section on using the Ports Collection</ulink>. </para></listitem></orderedlist></sect1></article>

View File

@ -0,0 +1,279 @@
= Package Management Basics: apt, yum, dnf, zypper, and pkg
==== Abstract
This guide is intended as a quick reference for the fundamentals of finding, installing, and upgrading packages on a variety of distributions, and should help you translate that knowledge between systems.
==== Audience
For those new to Linux who need a basic understanding of package management.
==== Original version of this doc
The original version of this guide can be found at https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg[Digital Ocean].
==== Revision History
[cols="^,^,^",]
|=============================================================================
|15.1.2016 |v1.0 Converted and edited for TLDP |Jason Evans
|15.2.2016 |v1.1 Changed format to asciidoc and made corrections |Jason Evans
|=============================================================================
==== Contributions
* https://www.digitalocean.com/community/users/bpb[Brennen Bearnes]
(original author).
* http://wiki.tldp.org/Jason%20Evans[Jason Evans] (editor and maintainer for TLDP)
==== Feedback
Missing information, missing links, missing characters? Mail it to the maintainer of this document: jsevans _at_ youvegotthe.info
==== Copyright information
This work is licensed under a https://creativecommons.org/licenses/by-nc-sa/4.0/[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License].
== Introduction
=== Why was this document written?
Most modern Unix-like operating systems offer a centralized mechanism for finding and installing software. Software is usually distributed in the form of packages, kept in repositories. Working with packages is known as package management. Packages provide the basic components of an operating system, along with shared libraries, applications, services, and documentation.
A package management system does much more than one-time installation of software. It also provides tools for upgrading already-installed packages. Package repositories help to ensure that code has been vetted for use on your system, and that the installed versions of software have been approved by developers and package maintainers.
When configuring servers or development environments, it's often necessary look beyond official repositories. Packages in the stable release of a distribution may be out of date, especially where new or rapidly-changing software is concerned. Nevertheless, package management is a vital skill for system administrators and developers, and the wealth of packaged software for major distributions is a tremendous
resource.
=== What do you need?
This guide covers Debian, Ubuntu, CentOS, Fedora, SuSE, and FreeBSD and will require one of those distributions to be installed.
NOTE: All of the commands in this guide assume that the user is running the commands as root or with `sudo`.
=== Package Management Systems: A Brief Overview
In a Windows environment, programs are packaged in .exe or .msi installers which will then install most of the files needed to run the program. If your computer doesn't have some dependant applications, then the program that you are trying to run will either not install or not run properly. You will then have to scour the internet in order to find the missing required applications or libraries. For example in CentOS 7, in order to install the VIM text editor, I need to add the following packages:
....
gpm-libs x86_64 1.20.7-5.el7 base 32 k
groff-base x86_64 1.22.2-8.el7 base 942 k
perl x86_64 4:5.16.3-286.el7 base 8.0 M
perl-Carp noarch 1.26-244.el7 base 19 k
perl-Encode x86_64 2.51-7.el7 base 1.5 M
perl-Exporter noarch 5.68-3.el7 base 28 k
perl-File-Path noarch 2.09-2.el7 base 26 k
perl-File-Temp noarch 0.23.01-3.el7 base 56 k
perl-Filter x86_64 1.49-3.el7 base 76 k
perl-Getopt-Long noarch 2.40-2.el7 base 56 k
perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k
perl-PathTools x86_64 3.40-5.el7 base 82 k
perl-Pod-Escapes noarch 1:1.04-286.el7 base 50 k
perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k
perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k
perl-Pod-Usage noarch 1.63-3.el7 base 27 k
perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k
perl-Socket x86_64 2.010-3.el7 base 49 k
perl-Storable x86_64 2.45-3.el7 base 77 k
perl-Text-ParseWords noarch 3.29-4.el7 base 14 k
perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k
perl-Time-Local noarch 1.2300-2.el7 base 24 k
perl-constant noarch 1.27-2.el7 base 19 k
perl-libs x86_64 4:5.16.3-286.el7 base 687 k
perl-macros x86_64 4:5.16.3-286.el7 base 43 k
perl-parent noarch 1:0.225-244.el7 base 12 k
perl-podlators noarch 2.5.1-3.el7 base 112 k
perl-threads x86_64 1.87-4.el7 base 49 k
perl-threads-shared x86_64 1.43-6.el7 base 39 k
vim-common x86_64 2:7.4.160-1.el7 base 5.9 M
vim-filesystem x86_64 2:7.4.160-1.el7 base 9.6 k
which x86_64 2.20-7.el7 base 41 k
....
Imagine trying to manually install all of these programs one at a time just to be able to install a text editor! In the early days of Linux, we faced these kinds of problems, however this problem is fixed with package management systems such as apt, yum, and others. Package managers simplify everything. They look at the package that you want to install such as VIM, LibreOffice, etc., then look at what other package it depends upon, the dependencies of those packages, and so on; then it downloads them all and installs them. For example, in order to install VIM in CentOS 7 today, I simply have to run `yum install vim`.
==== Some different package management systems:
While their functionality and benefits are broadly similar, packaging formats and tools vary by platform:
[cols="^,<,^",options="header",]
|===========================================
|Operating System |Format |Tool(s)
|Debian |.deb |apt, apt-cache, apt-get, dpkg
|Ubuntu |.deb |apt, apt-cache, apt-get, dpkg
|CentOS |.rpm |yum
|Fedora |.rpm |dnf
|SuSE |.rpm |zypper
|FreeBSD |Ports, .txz |make, pkg
|===========================================
In Debian and systems based on it, like Ubuntu, Linux Mint, and Raspbian, the package format is the .debfile. APT, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.
Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been supplanted by dnf, a modernized fork which retains most of yum's interface.
SuSE also uses RPM files. However, the package management software is known as zypper. Zypper's command line interface is very similar to yum and YasT can be access from a graphical mode or from the command line.
FreeBSD's binary package system is administered with the pkg command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. It's usually much more convenient to use pkg, but occasionally a pre-compiled package is unavailable, or syou may need to change compile-time options.
==== Update Package Lists
Most systems keep a local database of the packages available from remote repositories. It's best to update this database before installing or upgrading packages. As a partial exception to this pattern, yum and dnf will check for updates before performing some operations, but you can ask them at any time whether updates are available.
[cols="^,^",options="header",]
|=========================================
|System |Command
|Debian / Ubuntu |`apt-get update`
|CentOS |`yum check-update`
|Fedora |`dnf check-update`
|SuSE |`zypper refresh`
|FreeBSD Packages |`pkg update`
|FreeBSD Ports |`portsnap fetch update`
|=========================================
==== Upgrade Installed Packages
Making sure that all of the installed software on a machine stays up to date would be an enormous undertaking without a package system. You would have to track upstream changes and security alerts for hundreds of different packages. While a package manager doesn't solve every problem you'll encounter when upgrading software, it does enable you to maintain most system components with a few commands.
On FreeBSD, upgrading installed ports can introduce breaking changes or require manual configuration steps. It's best to read /usr/ports/UPDATING before upgrading with portmaster.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-get upgrade` |Only upgrades installed packages, where possible.
| |`apt-get dist-upgrade` |May add or remove packages to satisfy new dependencies.
|CentOS |`yum update` |
|Fedora |`dnf upgrade` |
|SuSE |`zypper update` |
|FreeBSD Packages |`pkg upgrade` |
|FreeBSD Ports |`less /usr/ports/UPDATING` |Uses less to view update notes for ports (use arrow keys to scroll, pressq to quit).
| |`cd /usr/ports/ports-mgmt/portmaster && make install && portmaster -a` |Installs portmaster and uses it to update installed ports.
|=======================================================================
Find a Package
~~~~~~~~~~~~~~
Most distributions offer a graphical or menu-driven front end to package
collections. These can be a good way to browse by category and discover
new software. Often, however, the quickest and most effective way to
locate a package is to search with command-line tools.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-cache search` |
|CentOS |`yum search` |
| |`yum search all` |Searches all fields, including description.
|Fedora |`dnf search` |
| |`dnf search all` |Searches all fields, including description.
|SuSE |`zypper se` |
|FreeBSD Packages |`pkg search` |Searches by name.
| |`pkg search -f` |Searches by name, returning full descriptions.
| |`pkg search -D` |Searches description.
|FreeBSD Ports |`cd /usr/ports && make search name=package` |Searches by name.
| |`cd /usr/ports && make search key=` |Searches comments, descriptions, and dependencies.
|=======================================================================
View Info About a Specific Package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When deciding what to install, it's often helpful to read detailed descriptions of packages. Along with human-readable text, these often include metadata like version numbers and a list of the package's dependencies.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-cache show package` |Shows locally-cached info about a package.
| |`dpkg -s package` |Shows the current installed status of a package.
|CentOS |`yum info package` |
| |`yum deplist package` |Lists dependencies for a package.
|Fedora |`dnf info package` |
| |`dnf repoquery -\/-requires package` |Lists dependencies for a package.
|SuSE |`zypper info search string` |Lists dependencies for a package.
|FreeBSD Packages |`pkg info package` |Shows info for an installed package.
|FreeBSD Ports |`cd /usr/ports/category/port && cat pkg-descr` |
|=======================================================================
Install a Package from Repositories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Once you know the name of a package, you can usually install it and its dependencies with a single command. In general, you can supply multiple packages to install simply by listing them all.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-get install package` |
| |`apt-get install package1 package2` |Installs all listed packages.
| |`apt-get install -y package` |Assumes "yes" where apt would usually prompt to continue.
|CentOS |`yum install package` |
| |`yum install package1 package2` |Installs all listed packages.
| |`yum install -y package` |Assumes "yes" where yum would usually prompt to continue.
|Fedora |`dnf install package` |
| |`dnf install package1 package2` |Installs all listed packages.
| |`dnf install -y package` |Assumes "yes" where dnf would usually prompt to continue.
|SuSE |`zypper install` |
|FreeBSD Packages |`pkg install package` |
| |`pkg install package1 package2` |Installs all listed packages.
|FreeBSD Ports |`cd /usr/ports/category/port && make install` |Builds and installs a port from source.
|=======================================================================
Install a Package from the Local Filesystem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sometimes, even though software isn't officially packaged for a given operating system, a developer or vendor will offer package files for download. You can usually retrieve these with your web browser, or viacurl on the command line. Once a package is on the target system, it can often be installed with a single command.
On Debian-derived systems, dpkg handles individual package files. If a package has unmet dependencies, gdebi can often be used to retrieve them from official repositories.
On CentOS and Fedora systems, yum and dnf are used to install individual files, and will also handle needed dependencies.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`dpkg -i package.deb` |
| |`apt-get install -yg debi && gdebi package.deb` |Installs and uses gdebi to install package.deb and retrieve any missing dependencies.
|CentOS |`yum install package.rpm` |
|Fedora |`dnf install package.rpm` |
|SuSE|`zypper install package.rpm`|
|FreeBSD Packages |`pkg add package.txz` |
| |`pkg add -f package.txz` |Installs package even if already installed.
|=======================================================================
Remove One or More Installed Packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since a package manager knows what files are provided by a given package, it can usually remove them cleanly from a system if the software is no longer needed.
[cols="^,<,^",options="header",]
|=======================================================================
|System |Command |Notes
|Debian / Ubuntu |`apt-get remove package` |yum remove package
| |`apt-get autoremove` |Removes unneeded packages.
|CentOS |`yum remove package` |
|Fedora |`dnf erase package` |
|FreeBSD Packages |`pkg delete package` |
| |`pkg autoremove` |Removes unneeded packages.
|SuSE |`zypper rm package` |Removes unneeded packages.
|FreeBSD Ports |`pkg delete package` |
| |`cd /usr/ports/path_to_port && make deinstall` |De-installs an installed port.
|=======================================================================
Get Help
~~~~~~~~
In addition to web-based documentation, keep in mind that Unix manual pages (usually referred to as man pages) are available for most commands from the shell. To read a page, use the `man` command. For example, `man yum` will give you a brief manual on how to use yum.
Conclusion and Further Reading
------------------------------
This guide provides an overview of basic operations that can be
cross-referenced between systems, but only scratches the surface of a
complex topic. For greater detail on a given system, you can consult the
following resources:
1. https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials[This
guide] covers Ubuntu and Debian package management in detail.
2. There's an https://www.centos.org/docs/5/html/yum/[official CentOS guide to managing software with yum].
3. There's a https://fedoraproject.org/wiki/Dnf[Fedora wiki page about dnf], and an https://dnf.readthedocs.org/en/latest/index.html[official manual for dnf itself]
4. https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg[This guide] covers FreeBSD package management using pkg.
5. The https://www.freebsd.org/doc/handbook/[FreeBSD Handbook] contains
a https://www.freebsd.org/doc/handbook/ports-using.html[section on using
the Ports Collection].
6. http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.sw_cl.html[OpenSuSE documentation for Zypper] and http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.onlineupdate.you.html[YaST].

View File

@ -1,6 +0,0 @@
The Linux Documentation Project :: FAQ DocBook Template
-------------------------------------------------------
The following document is provided as a template for your own FAQ.
We hope you found it useful.
Please send suggestions to: feedback@tldp.org.

View File

@ -0,0 +1,15 @@
**Q:** question 1
**A:** answer 1
**Q:** question 2
**A:** answer 2
**Q:** question 3
**A:** answer 3
**Q:** question 4
**A:** answer 4

View File

@ -1,39 +0,0 @@
The Linux Documentation Project :: Guide Template
-------------------------------------------------
The following documents are provided as templates for your own Guide
(book-length document). You are not required to use all of the templates
provided in this package for your document. They are only a suggestion of
what you might need based on the many documents we have reviewed and
accepted in our collection over the years. We hope you find them useful.
These files are all in DocBook XML version 4.2. If you would prefer to use
LinuxDoc, please download the LinuxDoc templates. If you are writing your
document in a different format, please follow the instructions in the
Author Guide on how to transform your document into DocBook before
submitting it to the collection.
http://www.tldp.org/LDP/LDP-Author-Guide/html/x2docbook.html
Please send suggestions to: feedback@tldp.org.
ldp-appendix.xml
A sample appendix. Typically used for the full text of your document's
license and additional instructions that are not part of the "core" of
your document.
ldp-bibliography.xml
A sample bibliography with sections.
ldp-glossary.xml
A sample glossary.
ldp-guide-chap1.xml and ldp-guide-chap2.xml
Two sample chapters with common DocBook markup.
ldp-guide-main.xml
The main file that refers to each of the additional XML files. When the
file is transformed from XML to another format, this file is the master
outline that informs the processing tool where each of the components
are.
If you are writing a shorter HOWTO, please use the ldp-howto.zip package
instead.

View File

@ -0,0 +1,24 @@
[[app1]]
Appendix one title
------------------
_______________________________________________________________________
Says what this appendix is about, for instance further info on the web.
_______________________________________________________________________
further info
------------
about this subject
~~~~~~~~~~~~~~~~~~
* http://useful.org[]: about this and that.
* http://related.org[]: about other related stuff.
* http://other.org[]: more stuff.
about other subject
~~~~~~~~~~~~~~~~~~~
* http://useful2.org[]: about this and that.
* http://related2.org[]: about other related stuff.
* http://other2.org[]: more stuff.

View File

@ -0,0 +1,35 @@
[[bibliography]]
References and Resources
------------------------
[[ref-howto]]
HOWTOs
------
link:URL[]
link:URL 2[]
[[ref-installreports]]
Hardware-specific Install Reports and Info
------------------------------------------
link:URL 3[]
link:URL 4[]
[[ref-mailinglist]]
Mailing List Threads
--------------------
link:URL 5[]
[[ref-software]]
Packages and related software
-----------------------------
http://www.kernel.org[]
_____________________________________________________________________
Remember to choose "F" for full when you download your kernel source.
_____________________________________________________________________

View File

@ -0,0 +1,31 @@
[[glossary]]
Glossary
--------
___________________
This is a glossary.
___________________
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
And so on, for all the letters in the alphabet and all the items you
want in the list.

View File

@ -0,0 +1,61 @@
[[chap_01]]
Title of first chapter
----------------------
________________________________
What we will do in this chapter:
* stuff
* more stuff
* talk about other stuff
* play with stuff
________________________________
[[sect_01_01]]
Section1 title
--------------
[[sect_01_01_01]]
Section2 title
~~~~~~~~~~~~~~
Usually some introduction
on all the aspects of stuff.
[[sect_01_01_02]]
Section2 title
~~~~~~~~~~~~~~
In-depth discussion
Explain concepts.
[[sect_01_01_03]]
Section2 title
~~~~~~~~~~~~~~
Maybe some examples
And a hint to the next section of the chapter.
[[sect_01_02]]
Section1 title
--------------
[[sect_01_02_01]]
Section2 title
~~~~~~~~~~~~~~
More stuff
More stuff
[[sect_01_02_02]]
Section2 title
~~~~~~~~~~~~~~
This is the second subsection of the second section of the first
chapter.
Add as many sections and subsections as you want.

View File

@ -0,0 +1,86 @@
[[chap_02]]
Title of second chapter
-----------------------
________________________________
What we will do in this chapter:
* stuff
* more stuff
* talk about other stuff
* play with stuff
________________________________
[[sect_02_01]]
Section1 title
--------------
[[sect_02_01_01]]
Section2 title
~~~~~~~~~~~~~~
[[sect_02_01_01_01]]
Section3 title
^^^^^^^^^^^^^^
Intro
1. Summing up a few things
2. in a list
3. where items are numbered
Explanations
[[sect_02_01_01_01]]
Section3 title
^^^^^^^^^^^^^^
Other explanation
* Summing up a few things
* in a list
* where items are not numbered
And discussion
[[sect_02_01_02]]
Section2 title
~~~~~~~~~~~~~~
Showing a picture in text:
image:your_images_dir/image.eps[image]
PNG is for on-line browsing, EPS for printing. `gimp` and/or `convert`
will do the trick, starting from about any source format.
[[sect_02_02]]
Section1 title
--------------
[[sect_02_02_01]]
Section2 title
~~~~~~~~~~~~~~
This is a table with two colums:
.Table title
[cols=",",options="header",]
|=======================================
|first colum header |second colum header
|item |meaning
|item |meaning
|item |meaning
|=======================================
[[sect_02_02_02]]
Section2 title
~~~~~~~~~~~~~~
This is a link to the first section of the first chapter:
link:#sect_01_01[???].
This is an external link: http://www.somewhere.org[].
This is also http://www.somewhere.org[an external link], only here you
don't see the URL.

View File

@ -0,0 +1,137 @@
Introduction
------------
[[intro_01]]
Why was this document written?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some explanations.
[[intro_02]]
Audience
~~~~~~~~
Explain for whom it has been written.
[[intro_03]]
New versions of this doc
~~~~~~~~~~~~~~~~~~~~~~~~
Point to http://somewhere.org[the latest version] of this document.
[[intro_04]]
Revision History
~~~~~~~~~~~~~~~~
* 1.2 2003-02-28 MG More stuff you changed.
* 1.1 2003-01-22 MG Stuff you changed.
* 1.0 2002-12-29 MG Initial release for TLDP
[[intro_05]]
Contributions
~~~~~~~~~~~~~
Thank people who helped realizing this doc.
[[intro_06]]
Feedback
~~~~~~~~
Missing information, missing links, missing characters? Mail it to the
maintainer of this document: you@your.domain
[[intro_07]]
Copyright information
~~~~~~~~~~~~~~~~~~~~~
Copyright 2002 Your_first_name Your_last_name.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts and no Back-Cover Texts. A
copy of the license is included in link:#app4[???] entitled ``GNU Free
Documentation License''.
Read http://www.fsf.org/gnu/manifesto.html[The GNU Manifesto] if you
want to know why this license was chosen for this book.
The author and publisher have made every effort in the preparation of
this book to ensure the accuracy of the information. However, the
information contained in this book is offered without warranty, either
express or implied. Neither the author nor the publisher nor any dealer
or distributor will be held liable for any damages caused or alleged to
be caused either directly or indirectly by this book.
The logos, trademarks and symbols used in this book are the properties
of their respective owners.
[[intro_08]]
What do you need?
~~~~~~~~~~~~~~~~~
List requirements: materials, knowledge.
[[intro_09]]
Conventions used in this document
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following typographic and usage conventions occur in this text:
.Typographic and usage conventions
[cols=",",options="header",]
|=======================================================================
|Text type |Meaning
|``Quoted text'' |Quotes from people, quoted computer output.
a|
-------------
terminal view
-------------
|Literal computer input and output captured from the terminal, usually rendered with a light grey background.
|`command` |Name of a command that can be entered on the command line.
|`VARIABLE` |Name of a variable or pointer to content of a variable, as in `$VARNAME`.
|`option` |Option to a command, as in ``the `-a` option to the `ls` command''.
|`argument` |Argument to a command, as in ``read `man ls`''.
|`command options
arguments` |Command synopsis or general usage, on a separated line.
|`filename` |Name of a file or directory, for example ``Change to the
`/usr/bin` directory.''
|Key |Keys to hit on the keyboard, such as ``type Q to quit''.
|Button |Graphical button to click, like the OK button.
|Menu > Choice |Choice to select from a graphical menu, for instance:
``Select Help > About Mozilla in your browser.''
|_Terminology_ |Important term or concept: ``The Linux _kernel_ is the
heart of the system.''
|See link:#chap_01[???] |link to related subject within this guide.
|http://tille.soti.org[The author] |Clickable link to an external web
resource.
|=======================================================================
[[intro_10]]
Organization of this document
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
List chapters (and optionally, appendices) with a short content for each
(only for longer docs).
* link:#chap_01[???]: short description.
* link:#chap_02[???]: short description.
* link:#chap_03[???]: short description.
* link:#chap_04[???]: short description.
* link:#chap_05[???]: short description.
CHAP1 CHAP2 APP1 GLOSS

View File

@ -0,0 +1,24 @@
[[app1]]
Appendix one title
------------------
_______________________________________________________________________
Says what this appendix is about, for instance further info on the web.
_______________________________________________________________________
further info
------------
about this subject
~~~~~~~~~~~~~~~~~~
* http://useful.org[]: about this and that.
* http://related.org[]: about other related stuff.
* http://other.org[]: more stuff.
about other subject
~~~~~~~~~~~~~~~~~~~
* http://useful2.org[]: about this and that.
* http://related2.org[]: about other related stuff.
* http://other2.org[]: more stuff.

View File

@ -0,0 +1,35 @@
[[bibliography]]
References and Resources
------------------------
[[ref-howto]]
HOWTOs
------
link:URL[]
link:URL 2[]
[[ref-installreports]]
Hardware-specific Install Reports and Info
------------------------------------------
link:URL 3[]
link:URL 4[]
[[ref-mailinglist]]
Mailing List Threads
--------------------
link:URL 5[]
[[ref-software]]
Packages and related software
-----------------------------
http://www.kernel.org[]
_____________________________________________________________________
Remember to choose "F" for full when you download your kernel source.
_____________________________________________________________________

View File

@ -0,0 +1,31 @@
[[glossary]]
Glossary
--------
___________________
This is a glossary.
___________________
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
entryname::
definition
And so on, for all the letters in the alphabet and all the items you
want in the list.

View File

@ -0,0 +1,495 @@
[[about]]
About this document
-------------------
[[copyright]]
Copyright and License
~~~~~~~~~~~~~~~~~~~~~
Copyright (c) YEAR by YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and with no Back-Cover Texts.
A copy of the license is included in link:#gfdl[appendix_title].
[[translations]]
Translations
~~~~~~~~~~~~
If you know of any translations for this document, or you are interested
in translating it, please email me mailto:YOUR EMAIL[YOUR EMAIL].
[[preface]]
Preface
~~~~~~~
Tell us why you decided to write this document.
[[thanks]]
Acknowledgments
~~~~~~~~~~~~~~~
No one ever writes documentation by themselves. Please take the time to
thank the people who have helped you.
[[feedback]]
Feedback
~~~~~~~~
Find something wrong with this document? (Or perhaps something right?) I
would love to hear from you. Please email me at
mailto:YOUR EMAIL[YOUR EMAIL].
[[conventions]]
Conventions used in this document
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following typographic and usage conventions occur in this text:
.Typographic and usage conventions
[cols=",",options="header",]
|=======================================================================
|Text type |Meaning
|``Quoted text'' |Quotes from people, quoted computer output.
a|
-------------
terminal view
-------------
|Literal computer input and output captured from the terminal.
|`command` |Name of a command that can be entered on the command line.
|`option` |Option to a command, as in ``the `-a` option to the `ls`
command''.
|`parameter` |Parameter to a command, as in ``read `man ls`''.
|`command options
arguments` |Command synopsis or general usage, on a separated line.
|`filename` |Name of a file or directory, for example ``Change to the
`/usr/bin` directory.''
|Menu > Choice |Choice to select from a graphical menu, for instance:
``Select Help > About Mozilla in your browser.''
|http://www.xtrinsic.com[The author] |Click-able link to an external web
resource.
|=======================================================================
Thanks to Machtelt ``Tille'' Garrels for this list of conventions.
[[about]]
About My Topic
--------------
Start by explaining the basics of your topic. Is a brief history lesson
in order?
[[distro-news]]
Distribution News
~~~~~~~~~~~~~~~~~
If there is any news specific to each of the distrobutions of Linux, you
can include it here.
[[install]]
Installing from scratch
-----------------------
Write down each of the steps on how to install any necessary
packages/software/etc. Do you need to recompile the kernel to activate
new options?
If there are any step-by-step instructions, you may want to include them
in an example so that they can be easily referred to later.
1. Step One.
2. Step Two.
3. Step Three.
[[using-softwarepackage]]
Using SOFTWARE
--------------
Finally! Now you can describe how to use your system/software/package.
APPENDIX
[[gfdl]]
GNU Free Documentation License
------------------------------
GNU Free Documentation License
------------------------------
Version 1.1, March 2000
______________________________________________________________________________________________________________________________________________________________________________________________________________________________
Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple Place, Suite
330, Boston, MA 02111-1307 USA Everyone is permitted to copy and
distribute verbatim copies of this license document, but changing it is
not allowed.
______________________________________________________________________________________________________________________________________________________________________________________________________________________________
[[gfdl-0]]
PREAMBLE
--------
The purpose of this License is to make a manual, textbook, or other
written document "free" in the sense of freedom: to assure everyone the
effective freedom to copy and redistribute it, with or without modifying
it, either commercially or noncommercially. Secondarily, this License
preserves for the author and publisher a way to get credit for their
work, while not being considered responsible for modifications made by
others.
This License is a kind of "copyleft", which means that derivative works
of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft license
designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free program
should come with manuals providing the same freedoms that the software
does. But this License is not limited to software manuals; it can be
used for any textual work, regardless of subject matter or whether it is
published as a printed book. We recommend this License principally for
works whose purpose is instruction or reference.
[[gfdl-1]]
APPLICABILITY AND DEFINITIONS
-----------------------------
This License applies to any manual or other work that contains a notice
placed by the copyright holder saying it can be distributed under the
terms of this License. The "Document", below, refers to any such manual
or work. Any member of the public is a licensee, and is addressed as
"you".
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (For example, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding them.
The "Invariant Sections" are certain Secondary Sections whose titles are
designated, as being those of Invariant Sections, in the notice that
says that the Document is released under this License.
The "Cover Texts" are certain short passages of text that are listed, as
Front-Cover Texts or Back-Cover Texts, in the notice that says that the
Document is released under this License.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the general
public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or for
automatic translation to a variety of formats suitable for input to text
formatters. A copy made in an otherwise Transparent file format whose
markup has been designed to thwart or discourage subsequent modification
by readers is not Transparent. A copy that is not "Transparent" is
called "Opaque".
Examples of suitable formats for Transparent copies include plain ASCII
without markup, Texinfo input format, LaTeX input format, SGML or XML
using a publicly available DTD, and standard-conforming simple HTML
designed for human modification. Opaque formats include PostScript, PDF,
proprietary formats that can be read and edited only by proprietary word
processors, SGML or XML for which the DTD and/or processing tools are
not generally available, and the machine-generated HTML produced by some
word processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself, plus
such following pages as are needed to hold, legibly, the material this
License requires to appear in the title page. For works in formats which
do not have any title page as such, "Title Page" means the text near the
most prominent appearance of the work's title, preceding the beginning
of the body of the text.
[[gfdl-2]]
VERBATIM COPYING
----------------
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies to
the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further copying
of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
[[gfdl-3]]
COPYING IN QUANTITY
-------------------
If you publish printed copies of the Document numbering more than 100,
and the Document's license notice requires Cover Texts, you must enclose
the copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the
back cover. Both covers must also clearly and legibly identify you as
the publisher of these copies. The front cover must present the full
title with all words of the title equally prominent and visible. You may
add other material on the covers in addition. Copying with changes
limited to the covers, as long as they preserve the title of the
Document and satisfy these conditions, can be treated as verbatim
copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy a
publicly-accessible computer-network location containing a complete
Transparent copy of the Document, free of added material, which the
general network-using public has access to download anonymously at no
charge using public-standard network protocols. If you use the latter
option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
[[gfdl-4]]
MODIFICATIONS
-------------
You may copy and distribute a Modified Version of the Document under the
conditions of sections 2 and 3 above, provided that you release the
Modified Version under precisely this License, with the Modified Version
filling the role of the Document, thus licensing distribution and
modification of the Modified Version to whoever possesses a copy of it.
In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions (which
should, if there were any, be listed in the History section of the
Document). You may use the same title as a previous version if the
original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified Version,
together with at least five of the principal authors of the Document
(all of its principal authors, if it has less than five).
C. State on the Title page the name of the publisher of the Modified
Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications adjacent
to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the terms
of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section entitled "History", and its title, and add to
it an item stating at least the title, year, new authors, and publisher
of the Modified Version as given on the Title Page. If there is no
section entitled "History" in the Document, create one stating the
title, year, authors, and publisher of the Document as given on its
Title Page, then add an item describing the Modified Version as stated
in the previous sentence.
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise the
network locations given in the Document for previous versions it was
based on. These may be placed in the "History" section. You may omit a
network location for a work that was published at least four years
before the Document itself, or if the original publisher of the version
it refers to gives permission.
K. In any section entitled "Acknowledgements" or "Dedications",
preserve the section's title, and preserve in the section all the
substance and tone of each of the contributor acknowledgements and/or
dedications given therein.
L. Preserve all the Invariant Sections of the Document, unaltered in
their text and in their titles. Section numbers or the equivalent are
not considered part of the section titles.
M. Delete any section entitled "Endorsements". Such a section may not
be included in the Modified Version.
N. Do not retitle any existing section as "Endorsements" or to conflict
in title with any Invariant Section.
If the Modified Version includes new front-matter sections or appendices
that qualify as Secondary Sections and contain no material copied from
the Document, you may at your option designate some or all of these
sections as invariant. To do this, add their titles to the list of
Invariant Sections in the Modified Version's license notice. These
titles must be distinct from any other section titles.
You may add a section entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of Front-Cover
Text and one of Back-Cover Text may be added by (or through arrangements
made by) any one entity. If the Document already includes a cover text
for the same cover, previously added by you or by arrangement made by
the same entity you are acting on behalf of, you may not add another;
but you may replace the old one, on explicit permission from the
previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
[[gfdl-5]]
COMBINING DOCUMENTS
-------------------
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its license
notice.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by adding
at the end of it, in parentheses, the name of the original author or
publisher of that section if known, or else a unique number. Make the
same adjustment to the section titles in the list of Invariant Sections
in the license notice of the combined work.
In the combination, you must combine any sections entitled "History" in
the various original documents, forming one section entitled "History";
likewise combine any sections entitled "Acknowledgements", and any
sections entitled "Dedications". You must delete all sections entitled
"Endorsements."
[[gfdl-6]]
COLLECTIONS OF DOCUMENTS
------------------------
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
[[gfdl-7]]
AGGREGATION WITH INDEPENDENT WORKS
----------------------------------
A compilation of the Document or its derivatives with other separate and
independent documents or works, in or on a volume of a storage or
distribution medium, does not as a whole count as a Modified Version of
the Document, provided no compilation copyright is claimed for the
compilation. Such a compilation is called an "aggregate", and this
License does not apply to the other self-contained works thus compiled
with the Document, on account of their being thus compiled, if they are
not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these copies
of the Document, then if the Document is less than one quarter of the
entire aggregate, the Document's Cover Texts may be placed on covers
that surround only the Document within the aggregate. Otherwise they
must appear on covers around the whole aggregate.
[[gfdl-8]]
TRANSLATION
-----------
Translation is considered a kind of modification, so you may distribute
translations of the Document under the terms of section 4. Replacing
Invariant Sections with translations requires special permission from
their copyright holders, but you may include translations of some or all
Invariant Sections in addition to the original versions of these
Invariant Sections. You may include a translation of this License
provided that you also include the original English version of this
License. In case of a disagreement between the translation and the
original English version of this License, the original English version
will prevail.
[[gfdl-9]]
TERMINATION
-----------
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to copy,
modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However, parties
who have received copies, or rights, from you under this License will
not have their licenses terminated so long as such parties remain in
full compliance.
[[gfdl-10]]
FUTURE REVISIONS OF THIS LICENSE
--------------------------------
The Free Software Foundation may publish new, revised versions of the
GNU Free Documentation License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. See http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If
the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
[[gfdl-11]]
How to use this License for your documents
------------------------------------------
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
notices just after the title page:
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute
and/or modify this document under the terms of the GNU Free
Documentation License, Version 1.1 or any later version published by the
Free Software Foundation; with the Invariant Sections being LIST THEIR
TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover
Texts being LIST. A copy of the license is included in the section
entitled "GNU Free Documentation License".
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
If you have no Invariant Sections, write "with no Invariant Sections"
instead of saying which ones are invariant. If you have no Front-Cover
Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
LIST"; likewise for Back-Cover Texts.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.