5.5. pkgng ¤Ë¤è¤ë¥Ð¥¤¥Ê¥ê package ¤Î´ÉÍý

pkgng ¤Ï¡¢FreeBSD ¤Ë¤ª¤±¤ëÅÁÅýŪ¤Ê pkg_install package ´ÉÍý¥Ä¡¼¥ë¤ÎÃÖ¤­´¹¤¨¤Ç¤¢¤ê¡¢¥Ð¥¤¥Ê¥ê packages ¤ò¤è¤êÁ᤯¡¢ ¤è¤ê´Êñ¤Ë´ÉÍý¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë¿ô¿¤¯¤Îµ¡Ç½¤òÄ󶡤·¤Þ¤¹¡£ pkgng ¤ÎºÇ½é¤Î¥ê¥ê¡¼¥¹¤Ï 2012 ǯ 8 ·î¤Ë¹Ô¤ï¤ì¤Þ¤·¤¿¡£

pkgng ¤Ï ports-mgmt/portmaster ¤ä ports-mgmt/portupgrade ¤Ê¤É¤Î port ´ÉÍý¥Ä¡¼¥ë¤ÎÃÖ¤­´¹¤¨¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ports-mgmt/portmaster ¤ª¤è¤Ó ports-mgmt/portupgrade ¤Ï¡¢ ¥µ¡¼¥É¥Ñ¡¼¥Æ¥£À½¥½¥Õ¥È¥¦¥§¥¢¤ò¥Ð¥¤¥Ê¥ê packages ¤È Ports Collection ¤Îξ·Á¼°¤«¤é¥¤¥ó¥¹¥È¡¼¥ë¤Ç¤­¤Þ¤¹¤¬¡¢ pkgng ¤Ï¥Ð¥¤¥Ê¥ê packages ¤Î¤ß¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£

5.5.1. pkgng ÆþÌç

FreeBSD 9.1 °Ê¹ß¤Ç¤Ï¡¢ pkgng ¤Î¤¿¤á¤Î "¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×" ¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ ¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï pkgng ¤ò¥À¥¦¥ó¥í¡¼¥É¤·¡¢¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£

¥·¥¹¥Æ¥à¤ò¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¤¹¤ë¤¿¤á¤Ë¤Ï¡¢ °Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# /usr/sbin/pkg

¤³¤ì¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Î FreeBSD ¤Ç¤Ï¡¢Ports Collection ¤Þ¤¿¤Ï packages ¤òÍѤ¤¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£

pkgng port ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤Ë¤Ï°Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# cd /usr/ports/ports-mgmt/pkg
# make
# make install clean

package ¤«¤é¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤Ë¤Ï°Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg_add -r pkg

注意: pkgng package ´ÉÍý¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢ FreeBSD 7.X ¤ª¤è¤Ó FreeBSD 8.0 ¤Ë¤ÏÂбþ¤·¤Æ¤¤¤Þ¤»¤ó¡£

FreeBSD ¤Î¥¤¥ó¥¹¥È¡¼¥ë¤¬¤¹¤Ç¤Ë¹Ô¤ï¤ì¤Æ¤¤¤ë¤è¤¦¤Ê¥·¥¹¥Æ¥à¤Ç¤Ï¡¢ pkg_install package ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¿·¤·¤¤¥Õ¥©¡¼¥Þ¥Ã¥È¤ØÊÑ´¹¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ ÊÑ´¹¤ò¹Ô¤¦¤Ë¤Ï°Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg2ng

¤³¤Î¥¹¥Æ¥Ã¥×¤Ï¡¢ ¥µ¡¼¥É¥Ñ¡¼¥Æ¥£À½¥½¥Õ¥È¥¦¥§¥¢¤¬¤Þ¤À¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¤è¤¦¤Ê¡¢ ¿·¤·¤¯¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿Ä¾¸å¤Î¥·¥¹¥Æ¥à¤Ç¤ÏɬÍפ¢¤ê¤Þ¤»¤ó¡£

重要項目: ¤³¤Î¥¹¥Æ¥Ã¥×¤ÏÈó²ÄµÕ¤Ç¤¹¡£ °ìÅÙ package ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò pkgng ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ø¤ÈÊÑ´¹¤·¤¿¤é¡¢pkg_install ¥Ä¡¼¥ë¤ò»È¤¦¤Ù¤­¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£

注意: package ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÊÑ´¹¤¹¤ëºÝ¤Ë¤Ï¡¢ ¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Ø¤Î¥Ç¡¼¥¿ÊÑ´¹¤Ëȼ¤Ã¤¿¥¨¥é¡¼¤¬½ÐÎϤµ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ Ä̾¤³¤ì¤é¤Î¥¨¥é¡¼¤Ï̵»ë¤·¤Æ¹½¤¤¤Þ¤»¤ó¤¬¡¢ pkg2ng ½ªÎ»¸å¤Ëɽ¼¨¤µ¤ì¤ë¡¢ ÊÑ´¹¤Ë¼ºÇÔ¤·¤¿¥µ¡¼¥É¥Ñ¡¼¥Æ¥£À½¥½¥Õ¥È¥¦¥§¥¢¤Î°ìÍ÷¤Ë¤Ä¤¤¤Æ¤Ï¡¢ ¤³¤ì¤é¤Î¥½¥Õ¥È¥¦¥§¥¢¤ò¼êÆ°¤Ç½¤Àµ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£

FreeBSD ¤Î¥Ð¡¼¥¸¥ç¥ó¤¬ 10.X ¤è¤êÁ°¤Ç¤¢¤ì¤Ð¡¢ °Ê²¼¤Î¹Ô¤ò /etc/make.conf ¤ËÄɲ䷤ơ¢ FreeBSD Ports Collection ¤¬¥½¥Õ¥È¥¦¥§¥¢¤ÎÅÐÏ¿¤Ë¡¢ pkg_install ¤Ç¤Ï¤Ê¤¯ pkgng ¤òÍѤ¤¤ë¤è¤¦¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£

WITH_PKGNG=	yes

5.5.2. pkgng ´Ä¶­¤ÎÀßÄê

pkgng package ´ÉÍý¥·¥¹¥Æ¥à¤Ç¤Ï¡¢ ¤Û¤È¤ó¤É¤Î¥³¥Þ¥ó¥É¤ËÂФ·¤Æ package ¥ê¥Ý¥¸¥È¥ê¤ò»È¤¤¤Þ¤¹¡£ ¥Ç¥Õ¥©¥ë¥È¤Î package ¥ê¥Ý¥¸¥È¥ê¤Ï /usr/local/etc/pkg.conf ¤Þ¤¿¤Ï PACKAGESITE ´Ä¶­ÊÑ¿ô¤ÇÄêµÁ¤µ¤ì¤Þ¤¹¡£ ¤³¤Î´Ä¶­ÊÑ¿ô¤Ï¡¢ÀßÄê¥Õ¥¡¥¤¥ë¤ò¾å½ñ¤­¤·¤Þ¤¹¡£

¤½¤Î¾¤Î pkgng ¤ÎÀßÄꥪ¥×¥·¥ç¥ó¤Ï¡¢pkg.conf(5) ¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

5.5.3. ´ðËÜŪ¤Ê pkgng ¤ÎÁàºî

pkgng ¤ÎÍøÍѾðÊó¤Ï¡¢ man.pkg(8) ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ä¡¢ pkg ¤ò°ú¿ô¤Ê¤·¤Ë¼Â¹Ô¤¹¤ë¤Èɽ¼¨¤µ¤ì¤Þ¤¹¡£

³Æ pkgng ¥³¥Þ¥ó¥É¤Î°ú¿ô¤Ï¡¢ ¥³¥Þ¥ó¥É¤Ë¸ÇÍ­¤Ê¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢pkg install ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤òÆɤà¤Ë¤Ï¡¢ °Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg help install
# man pkg-install

5.5.3.1. pkgng ¤ò»È¤Ã¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿ package ¤Î¾ðÊó¤òÆÀ¤ë¤Ë¤Ï

pkg info ¤ò¼Â¹Ô¤¹¤ë¤È¡¢ ¥·¥¹¥Æ¥à¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë package ¾ðÊó¤¬ÆÀ¤é¤ì¤Þ¤¹¡£ pkg_info(1) ƱÍÍ¡¢¤¹¤Ù¤Æ¤Î package ¤Î¥Ð¡¼¥¸¥ç¥ó¡¢ ¤ª¤è¤ÓÀâÌÀ¤Î°ìÍ÷¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£

¤¢¤ëÆÃÄê¤Î package ¤Î¾ðÊó¤¬É¬ÍפǤ¢¤ì¤Ð¡¢ °Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg info packagename

¤¿¤È¤¨¤Ð¡¢¥·¥¹¥Æ¥à¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë pkgng ¤Î¾ðÊó¤òÄ´¤Ù¤ë¤Ë¤Ï¡¢ °Ê²¼¤Î¤è¤¦¤Ë¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg info pkg
pkg-1.0.2			New generation package manager

5.5.3.2. pkgng ¤òÍѤ¤¤¿ packages ¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Èºï½ü

Ä̾¤Û¤È¤ó¤É¤Î FreeBSD ¥æ¡¼¥¶¤Ï¡¢¥Ð¥¤¥Ê¥ê¥Ñ¥Ã¥±¡¼¥¸¤ò pkg install packagename ¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤³¤È¤Ç¤·¤ç¤¦¡£

# pkg install packagename

項5.5.2 ¤ÇÀâÌÀ¤·¤¿Ä̤ꡢ pkg install ¤Ï¥ê¥Ý¥¸¥È¥ê¥Ç¡¼¥¿¤ò»ÈÍѤ·¤Þ¤¹¡£ ¤³¤ì¤È¤ÏÈ¿ÂФˡ¢pkg-add(8) ¤Ï¥ê¥Ý¥¸¥È¥ê¥Ç¡¼¥¿¤òÍѤ¤¤Ê¤±¤ì¤Ð¡¢ ÄêµÁ¤µ¤ì¤Æ¤¤¤ë PACKAGESITE ¤â»È¤¤¤Þ¤»¤ó¡£ ¤½¤Î¤¿¤á¡¢°Í¸´Ø·¸¤ÏŬÀڤˤÏÄÉÀפµ¤ì¤º¡¢ ­¤ê¤Ê¤¤°Í¸¤Ë¤Ä¤¤¤Æ¤â¥ê¥â¡¼¥È¥Û¥¹¥È¤«¤é¥À¥¦¥ó¥í¡¼¥É¤µ¤ì¤Þ¤»¤ó¡£ ¤³¤ÎÀá¤Ç¤Ï pkg install ¤Î»ÈÍÑÊýË¡¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹¡£ pkg add ¤Î»ÈÍÑÊýË¡¤Ë¤Ä¤¤¤Æ¤Ï pkg-add(8) ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£

ÄɲäΥХ¤¥Ê¥ê package ¤Ï¡¢ pkg install ¤Ë¤è¤ê¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢ curl ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤Ë¤Ï°Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg install curl
Updating repository catalogue
Repository catalogue is up-to-date, no need to fetch fresh copy
The following packages will be installed:

	Installing ca_root_nss: 3.13.5
	Installing curl: 7.24.0

The installation will require 4 MB more space

1 MB to be downloaded

Proceed with installing packages [y/N]: y
ca_root_nss-3.13.5.txz		100%	255KB 	255.1KB/s 255.1KB/s	00:00
curl-7.24.0.txz			100%	1108KB	1.1MB/s	1.1MB/s		00:00
Checking integrity... done
Installing ca_root_nss-3.13.5... done
Installing curl-7.24.0... done

¿·¤·¤¤ package ¤È°Í¸´Ø·¸¤«¤éÄɲ䵤줿 package ¤Ï¡¢ ¥¤¥ó¥¹¥È¡¼¥ëºÑ¤ß package °ìÍ÷¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£

# pkg info
ca_root_nss-3.13.5	The root certificate bundle from the Mozilla Project
curl-7.24.0	Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
pkg-1.0.2	New generation package manager

ɬÍפΤʤ¯¤Ê¤Ã¤¿ packages ¤Ï¡¢ pkg delete ¤ò»È¤Ã¤Æºï½ü¤Ç¤­¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢curl ¤¬É¬Íפʤ¯¤Ê¤Ã¤¿¤é¡¢ °Ê²¼¤Î¤è¤¦¤Ë¤·¤Æºï½ü¤Ç¤­¤Þ¤¹¡£

# pkg delete curl
The following packages will be deleted:

	curl-7.24.0_1

The deletion will free 3 MB

Proceed with deleting packages [y/N]: y
Deleting curl-7.24.0_1... done

5.5.3.3. pkgng ¤Ë¤è¤ë package ¤Î¥¢¥Ã¥×¥°¥ì¡¼¥É

pkg version ¤òÍѤ¤¤Æ¸Å¤¯¤Ê¤Ã¤¿ packages ¤ò¸«¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¥í¡¼¥«¥ë¤Ë ports ¥Ä¥ê¡¼¤¬¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢ pkg-version(8) ¤Ï¡¢¥ê¥â¡¼¥È¥ê¥Ý¥¸¥È¥ê¤Î¥«¥¿¥í¥°¤òÍøÍѤ·¤Þ¤¹¡£ ¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢¥í¡¼¥«¥ë¤Î ports ¥Ä¥ê¡¼¤ò»È¤Ã¤Æ package ¤Î¥Ð¡¼¥¸¥ç¥ó¤òƱÄꤷ¤Þ¤¹¡£

pkgng ¤òÍѤ¤¤Æ package ¤ò¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Ë¥¢¥Ã¥×¥°¥ì¡¼¥É¤Ç¤­¤Þ¤¹¡£ curl ¤Î¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¥í¡¼¥«¥ë package ¤ò°Ê²¼¤Î¤è¤¦¤Ë¤·¤Æ¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Ë¥¢¥Ã¥×¥°¥ì¡¼¥É¤Ç¤­¤Þ¤¹¡£

# pkg upgrade
Updating repository catalogue
repo.txz		100%	297KB 296.5KB/s 296.5KB/s	00:00
The following packages will be upgraded:

	Upgrading curl: 7.24.0 -> 7.24.0_1

1 MB to be downloaded

Proceed with upgrading packages [y/N]: y
curl-7.24.0_1.txz	100% 1108KB	1.1MB/s	1.1MB/s		00:00
Checking integrity... done
Upgrading curl from 7.24.0 to 7.24.0_1... done

5.5.3.4. pkgng ¤Ë¤è¤ë package ¤Î¸¡¾Ú

»þÀÞ¡¢Ports Collection ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¥½¥Õ¥È¥¦¥§¥¢¤ËÀȼåÀ­¤¬¸«¤Ä¤«¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ pkgng ¤Ï¡¢ports-mgmt/portaudit package ƱÍͤθ¡¾Úµ¡Ç½¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£ ¥·¥¹¥Æ¥à¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¥½¥Õ¥È¥¦¥§¥¢¤ò¸¡¾Ú¤¹¤ë¤Ë¤Ï¡¢ °Ê²¼¤Î¤è¤¦¤Ë¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg audit -F

5.5.4. ¹âÅÙ¤Ê pkgng ¤ÎÍøÍÑ

5.5.4.1. pkgng ¤Ë¤è¤ë¥ê¡¼¥Õ°Í¸ ports ¤Î¼«Æ°ºï½ü

package ¤òºï½ü¤¹¤ë¤È¡¢ÉÔɬÍפʰ͸ ports¡¢¤¿¤È¤¨¤Ð¾å¤ÎÎã¤Ç¤Ï security/ca_root_nss ¤¬»Ä¤µ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ ¤³¤ì¤é¤Î packages ¤Ï¡¢ ¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿¤Þ¤Þ¤Ç¤É¤³¤«¤é¤â°Í¸¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ °Í¸¤Î¤¿¤á¤ËƳÆþ¤µ¤ì¡¢¸½ºß¤ÏÉÔɬÍפˤʤä¿ package ¤Ï¡¢ °Ê²¼¤Î¤è¤¦¤Ë¤¹¤ë¤È¼«Æ°Åª¤Ë¸¡½Ð¤µ¤ì¡¢ºï½ü¤µ¤ì¤Þ¤¹¡£

# pkg autoremove
Packages to be autoremoved:
	ca_root_nss-3.13.5

The autoremoval will free 723 kB

Proceed with autoremoval of packages [y/N]: y
Deinstalling ca_root_nss-3.13.5... done

5.5.4.2. pkgng package ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×

pkg_install package ´ÉÍý¥·¥¹¥Æ¥à¤È¤Ï°Û¤Ê¤ê¡¢ pkgng ¤Ë¤Ï package ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥Ð¥Ã¥¯¥¢¥Ã¥×¤¹¤ë¥á¥«¥Ë¥º¥à¤¬¤¢¤ê¤Þ¤¹¡£ package ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÆâÍƤò¼êÆ°¤Ç¥Ð¥Ã¥¯¥¢¥Ã¥×¤¹¤ë¤Ë¤Ï¡¢ °Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg backup -d pkgng.db

注意: ¥Õ¥¡¥¤¥ë̾¤Î pkgng.db ¤òŬÀڤʥե¡¥¤¥ë̾¤ËÃÖ¤­´¹¤¨¤Æ¤¯¤À¤µ¤¤¡£

¤µ¤é¤Ë¡¢pkgng ¤Ï package ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òËèÆü¼«Æ°Åª¤Ë¥Ð¥Ã¥¯¥¢¥Ã¥×¤¹¤ë periodic(8) ¥¹¥¯¥ê¥×¥È¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£ periodic.conf(5) ¤ÎÃæ¤Ç¡¢ daily_backup_pkgng_enable ¤ò YES ¤ËÀßÄꤹ¤ë¤È¥Ð¥Ã¥¯¥¢¥Ã¥×¤µ¤ì¤Þ¤¹¡£

ティップ: pkg_install ¤ÎÄê´üŪ¤Ê¥¹¥¯¥ê¥×¥È¤¬¡¢ package ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òƱÍͤ˥Х寥¢¥Ã¥×¤¹¤ë¤³¤È¤òÈò¤±¤ë¤¿¤á¤Ë¤Ï¡¢ periodic.conf(5) ¤ÎÃæ¤Ç¡¢ daily_backup_pkgdb_enable ¤ò NO ¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£

²áµî¤Ë¥Ð¥Ã¥¯¥¢¥Ã¥×¤·¤¿ package ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÃæ¿È¤ò¥ê¥¹¥È¥¢¤¹¤ë¤Ë¤Ï¡¢°Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg backup -r /path/to/pkgng.db

5.5.4.3. ¸Å¤¯¤Ê¤Ã¤¿ pkgng package ¤Îºï½ü

¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢pkgng ¤Ï¥­¥ã¥Ã¥·¥å¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥Ð¥¤¥Ê¥ê packages ¤òÊݸ¤·¤Þ¤¹¡£ ¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢pkg.conf(5) ¤Î PKG_CACHEDIR ÊÑ¿ô¤ÇÄêµÁ¤µ¤ì¤Þ¤¹¡£ pkg upgrade ¤ò»È¤Ã¤Æ packages ¤ò¥¢¥Ã¥×¥°¥ì¡¼¥É¤¹¤ëºÝ¤Ë¤Ï¡¢ ¥¢¥Ã¥×¥°¥ì¡¼¥É¤µ¤ì¤¿ package ¤Î¸Å¤¤¥Ð¡¼¥¸¥ç¥ó¤Ï¼«Æ°Åª¤Ë¤Ïºï½ü¤µ¤ì¤Þ¤»¤ó¡£

¥·¥¹¥Æ¥à¤«¤é¸Å¤¤¥Ð¥¤¥Ê¥ê package ¤òºï½ü¤¹¤ë¤Ë¤Ï¡¢ °Ê²¼¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg clean

5.5.4.4. pkgng package ¥á¥¿¥Ç¡¼¥¿¤ÎÊѹ¹

Îò»ËŪ¤Ë FreeBSD Ports Collection ¤Ï¡¢¥á¥¸¥ã¡¼¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤ÎÊѹ¹¤ËÂбþ¤Ç¤­¤Þ¤¹¡£ pkg_install ¤È¤Ï°Û¤Ê¤ê¡¢ pkgng ¤Ë¤Ï¡¢ package ¤Î¾ðÊó¤ò¥¢¥Ã¥×¥Ç¡¼¥È¤¹¤ë¥³¥Þ¥ó¥É¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢lang/php5 ¤Î¥Ð¡¼¥¸¥ç¥ó¤¬¡¢¤â¤È¤â¤È¤Ï 5.3 ¤Ç¡¢5.4 ¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤³¤È¤Ëȼ¤¤ lang/php53 ¤Ø¤È̾Á°¤¬Êѹ¹¤µ¤ì¤ë¾ì¹ç¡¢ pkg_install ¤Ç¤Ï¡¢ package ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¡¢ ¤É¤Î port ¤¬¥¤¥ó¥¹¥È¡¼¥ë¸µ¤Ç¤¢¤Ã¤¿¤«¤È¤¤¤¦¾ðÊó¤òÊѹ¹¤¹¤ë¤¿¤á¤Ë ports-mgmt/portmaster ¤Î¤è¤¦¤ÊÊ̤Υ½¥Õ¥È¥¦¥§¥¢¤òɬÍפȤ·¤Þ¤¹¡£

ports-mgmt/portmaster ¤ª¤è¤Ó ports-mgmt/portupgrade ports ¤È¤Ï°Û¤Ê¤ê¡¢°ú¿ô¤ËÍ¿¤¨¤ë¥Ð¡¼¥¸¥ç¥ó¤Î¿·¡¢µì¤Î½çÈ֤ϰۤʤê¤Þ¤¹¡£ pkgng ¤Ç¤Î¹½Ê¸¤Ï¡¢pkg set -o category/oldport:category/newport ¤È¤Ê¤ê¤Þ¤¹¡£

¤¿¤È¤¨¤Ð¡¢¾åµ­¤ÎÎã¤Î package ¤Î¾ðÊó¤òÊѹ¹¤¹¤ë¤Ë¤Ï¡¢ °Ê²¼¤Î¤è¤¦¤Ë¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg set -o lang/php5:lang/php53

Ê̤ÎÎã¤È¤·¤Æ¡¢lang/ruby18 ¤ò lang/ruby19 ¤Ë¥¢¥Ã¥×¥Ç¡¼¥È¤¹¤ë¤Ë¤Ï¡¢ °Ê²¼¤Î¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg set -o lang/ruby18:lang/ruby19

ºÇ¸å¤ÎÎã¤È¤·¤Æ¡¢ libglut ¶¦Í­¥é¥¤¥Ö¥é¥ê¤Î¾ðÊó¤ò graphics/libglut ¤«¤é graphics/freeglut ¤Ø¤ÈÊѹ¹¤¹¤ë¤Ë¤Ï¡¢ °Ê²¼¤Î¤è¤¦¤Ë¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg set -o graphics/libglut:graphics/freeglut

注意: package ¤Î¾ðÊó¤òÊѹ¹¤·¤¿¤é¡¢Â¿¤¯¤Î¾ì¹ç¡¢ ¾ðÊó¤¬Êѹ¹¤µ¤ì¤¿ package ¤Ë°Í¸¤·¤Æ¤¤¤ë packages ¤òºÆ¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤³¤È¤¬½ÅÍפȤʤê¤Þ¤¹¡£ °Í¸ packages ¤òºÆ¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤Ë¤Ï¡¢ °Ê²¼¤Î¤è¤¦¤Ë¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£

# pkg install -Rf graphics/freeglut

ËÜʸ½ñ¡¢¤ª¤è¤Ó¾¤Îʸ½ñ¤Ï ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/ ¤«¤é¥À¥¦¥ó¥í¡¼¥É¤Ç¤­¤Þ¤¹¡£

FreeBSD ¤Ë´Ø¤¹¤ë¼ÁÌ䤬¤¢¤ë¾ì¹ç¤Ë¤Ï¡¢¥É¥­¥å¥á¥ó¥È ¤òÆɤó¤À¾å¤Ç <questions@FreeBSD.org> ¤Þ¤Ç (±Ñ¸ì¤Ç) Ï¢Íí¤·¤Æ¤¯¤À¤µ¤¤¡£
ËÜʸ½ñ¤Ë´Ø¤¹¤ë¼ÁÌä¤Ë¤Ä¤¤¤Æ¤Ï¡¢<doc@FreeBSD.org> ¤Þ¤ÇÅŻҥ᡼¥ë¤ò (±Ñ¸ì¤Ç) Á÷¤Ã¤Æ¤¯¤À¤µ¤¤¡£