Add a section about installing and managing packages with FreeBSD.
Submitted by: Chern Lee <chern.lee@windriver.com>
This commit is contained in:
parent
260b0331e7
commit
102238e343
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=9621
1 changed files with 132 additions and 16 deletions
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
The FreeBSD Documentation Project
|
||||
|
||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/ports/chapter.sgml,v 1.114 2001/04/12 07:36:08 nik Exp $
|
||||
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/ports/chapter.sgml,v 1.115 2001/04/17 01:37:32 dd Exp $
|
||||
-->
|
||||
|
||||
<chapter id="ports">
|
||||
|
@ -172,6 +172,8 @@
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>To keep track of updated ports, subscribe to
|
||||
<emphasis>freebsd-ports</emphasis>.</para>
|
||||
<para>The remainder of this chapter will explain how to use packages and
|
||||
ports to install and manage third party software on FreeBSD.</para>
|
||||
</sect1>
|
||||
|
@ -216,40 +218,154 @@
|
|||
</itemizedlist>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>* Using the Packages System</title>
|
||||
<sect1 id="packages-using">
|
||||
<title>Using the Packages System</title>
|
||||
<para><emphasis>Contributed by &a.chern;, April 30, 2001.</emphasis>
|
||||
</para>
|
||||
|
||||
<sect2>
|
||||
<title>Installing a Package</title>
|
||||
|
||||
<para>After you have decided which application you want to install you
|
||||
need to download the package file and install it.</para>
|
||||
|
||||
<para>There are several ways you can do this.</para>
|
||||
<para>You can use the &man.pkg.add.1; utility to install a
|
||||
FreeBSD software package from a local file or from a server on
|
||||
the network.</para>
|
||||
|
||||
<example>
|
||||
<title>Downloading and installing in multiple steps</title>
|
||||
<title>Downloading a package and then installing it locally</title>
|
||||
|
||||
<para></para>
|
||||
<screen>&prompt.root; <userinput>ftp <replaceable>ftp2.freebsd.org</replaceable></userinput>
|
||||
Connected to ftp2.freebsd.org.
|
||||
220 ftp2.freebsd.org FTP server (Version 6.00LS) ready.
|
||||
331 Guest login ok, send your email address as password.
|
||||
230-
|
||||
230- This machine is in Vienna, VA, USA, hosted by Verio.
|
||||
230- Questions? E-mail freebsd@vienna.verio.net.
|
||||
230-
|
||||
230-
|
||||
230 Guest login ok, access restrictions apply.
|
||||
Remote system type is UNIX.
|
||||
Using binary mode to transfer files.
|
||||
ftp> <userinput>cd /pub/FreeBSD/ports/packages/irc</userinput>
|
||||
250 CWD command successful.
|
||||
ftp> <userinput>get xchat-1.7.1.tgz</userinput>
|
||||
local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz
|
||||
150 Opening BINARY mode data connection for 'xchat-1.7.1.tgz' (471488 bytes).
|
||||
100% |**************************************************| 460 KB 00:00 ETA
|
||||
226 Transfer complete.
|
||||
471488 bytes received in 5.37 seconds (85.70 KB/s)
|
||||
ftp> <userinput>exit</userinput>
|
||||
&prompt.root; <userinput>pkg_add <replaceable>xchat-1.7.1.tgz</replaceable></userinput>
|
||||
&prompt.root;
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
<para>If you don't have a source of local packages (such as a
|
||||
FreeBSD CD-ROM set) then it will probably be easier to use the
|
||||
-r option to &man.pkg.add.1;. This will cause the utility to
|
||||
automatically determine the correct object format and release
|
||||
and then to fetch and install the package from an FTP site.
|
||||
</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_add -r <replaceable>xchat-1.7.1</replaceable></userinput>
|
||||
</screen>
|
||||
|
||||
<para>This would download the correct package and add it without
|
||||
any further user intervention.</para>
|
||||
|
||||
<para>Package files are distributed in .tgz format. You can
|
||||
find them at <ulink
|
||||
url="ftp://ftp.freebsd.org/ports/packages">ftp://ftp.freebsd.org/ports/packages</ulink>,
|
||||
or on the FreeBSD CD-ROM distribution. Every CD on the
|
||||
FreeBSD 4-CD set (and PowerPak, etc) contains packages in
|
||||
the <filename>/packages</filename> directory. The layout of
|
||||
the packages is similar to that of the
|
||||
<filename>/usr/ports</filename> tree. Each category has its
|
||||
own directory, and every package can be found within the
|
||||
<filename>All</filename> directory.
|
||||
</para>
|
||||
|
||||
<para>The directory structure of the package system is homologous
|
||||
to that of the ports; they work with each other to form the entire
|
||||
package/port system.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Deleting a Package</title>
|
||||
|
||||
<para></para>
|
||||
<screen>&prompt.root <userinput>pkg_delete <replaceable>xchat-1.7.1</replaceable></userinput>
|
||||
&prompt.root
|
||||
</screen>
|
||||
<para>&man.pkg.delete.1; is the utility for removing
|
||||
previously installed software package distributions.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Updating a Package</title>
|
||||
<title>Managing packages</title>
|
||||
|
||||
<para></para>
|
||||
<para>&man.pkg.info.1; a utility that lists and describes
|
||||
the various packages installed.
|
||||
</para>
|
||||
|
||||
<screen>&prompt.root <userinput>pkg_info</userinput>
|
||||
cvsup-bin-16.1 A general network file distribution system optimized for CV
|
||||
docbook-1.2 Meta-port for the different versions of the DocBook DTD
|
||||
...
|
||||
</screen>
|
||||
<para>&man.pkg.version.1; a utility that summarizes the
|
||||
versions of all installed packages. It compares the package
|
||||
version to the current version found in the ports tree.
|
||||
</para>
|
||||
<screen>&prompt.root <userinput>pkg_version</userinput>
|
||||
cvsup-bin =
|
||||
docbook =
|
||||
...
|
||||
</screen>
|
||||
|
||||
<para>The symbols in the second column indicate the relative age
|
||||
of the installed version and the version available in the local
|
||||
ports tree.</para>
|
||||
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>=</entry> <entry>The version of the
|
||||
installed package matches that of the one found in the
|
||||
local ports tree.</entry>
|
||||
</row>
|
||||
|
||||
<row><entry><</entry>
|
||||
<entry>The installed version is older then the one available
|
||||
in the ports tree.</entry>
|
||||
</row>
|
||||
|
||||
<row><entry>></entry><entry>The installed version is newer
|
||||
than the one found in the local ports tree. (local ports
|
||||
tree is probably out of date)</entry></row>
|
||||
|
||||
<row><entry>?</entry><entry>The installed package cannot be
|
||||
found in the ports index.</entry></row>
|
||||
|
||||
<row><entry>*</entry><entry>There are multiple versions of the
|
||||
package.</entry></row>
|
||||
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title></title>
|
||||
|
||||
<para></para>
|
||||
<title>Miscellaneous</title>
|
||||
<para>&man.pkg.add.1; &man.pkg.delete.1; &man.pkg.info.1;
|
||||
&man.pkg.version.1; &man.pkg.create.1;
|
||||
</para>
|
||||
<para>All package information is stored within the
|
||||
<filename>/var/db/pkg</filename> directory. The listing
|
||||
of contents and descriptions of each package can be found within
|
||||
files in this directory.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue