« Microsoft Windows Vista Beta 1 发布 | Main | Squid version 2.4 与 2.4 2.5 在FreeBSD上的表现 »
July 29, 2005
FreeBSD 的包管理之package pkg_*
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。 https://windtear.net/archives/2005/07/29/000729.html http://windtear.net/archives/2005/07/29/000729.html 这里提一下 FreeBSD 的 package pkg_* 包管理 pkg_add pkg_check pkg_create pkg_delete pkg_info pkg_sign pkg_update pkg_version (Solaris 等也用pkg_* 进行包管理 谁让老祖宗都一样呢) export PACKAGEROOT=ftp://192.168.1.1 pkg_add -r wget Fetching ftp://192.168.1.1/pub/FreeBSD/ports/i386/packages-4.11-release/Latest/wget.tgz... Done. Fetching ftp://192.168.1.1/pub/FreeBSD/ports/i386/packages-4.11-release/All/libiconv-1.9.2_1.tgz... Done. Fetching ftp://192.168.1.1/pub/FreeBSD/ports/i386/packages-4.11-release/All/expat-1.95.8_3.tgz... Done. Fetching ftp://192.168.1.1/pub/FreeBSD/ports/i386/packages-4.11-release/All/gettext-0.14.5.tgz... Done. cd /usr/share/examples/cvsup/ vi ports-supfile pkg_add -r cvsup-without-gui cvsup -h 192.168.1.1 -g -L 2 ports-supfile NAME pkg_add -- a utility for installing software package distributions SYNOPSIS pkg_add [-vInfrRMS] [-t template] [-p prefix] [-C chrootdir] pkg-name [pkg-name ...] DESCRIPTION The pkg_add command is used to extract packages that have been previously created with the pkg_create(1) command. ENVIRONMENT The value of the PKG_PATH is used if a given package can't be found. The environment variable should be a series of entries separated by colons. Each entry consists of a directory name. The current directory may be indicated implicitly by an empty directory name, or explicitly by a sin- gle period. The environment variable PKG_DBDIR specifies an alternative location for the installed package database, default location is /var/db/pkg. The environment variables PKG_TMPDIR and TMPDIR, in that order, are taken to name temporary directories where pkg_add will attempt to create its staging area in. If these variables are not present or if the directo- ries named lack sufficient space, then pkg_add will use the first of /var/tmp, /tmp or /usr/tmp with sufficient space. The environment variable PACKAGEROOT specifies an alternate location for pkg_add to fetch from. The fetch URL is built using this environment variable and the automatic directory logic that pkg_add uses when the -r option is invoked. An example setting would be "ftp://ftp3.FreeBSD.org". The environment variable PACKAGESITE specifies an alternate location for pkg_add to fetch from. This variable subverts the automatic directory logic that pkg_add uses when the -r option is invoked. Thus it should be a complete URL to the remote package file(s). FILES /var/tmp Temporary directory for creating the staging area, if envi- ronmental variables PKG_TMPDIR or TMPDIR do not point to a suitable directory. /tmp Next choice if /var/tmp does not exist or has insufficient space. /usr/tmp Last choice if /var/tmp and /tmp are not suitable for creat- ing the staging area. /var/db/pkg Default location of the installed package database. SEE ALSO pkg_create(1), pkg_delete(1), pkg_info(1), pkg_update(1), pkg_version(1), mktemp(3), sysconf(3), mtree(8) |
Posted by windtear at July 29, 2005 8:25 PM