Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

第 2 章 Packages System

目錄

2.1. Using the Packages System
2.1.1. PACKAGESROOT / PKG_PATH 環境變數
2.1.2. Installing a Package
2.1.3. Managing Packages
2.1.4. Deleting a Package
2.2. Updating and Upgrading FreeBSD
2.2.1. update
2.2.2. upgrade
2.3. ports
2.3.1. update ports
2.3.2. install
2.3.3. remove
2.3.4. config menu
2.4. PKGNG - Pkgng is the Next Generation package management tool for FreeBSD.
2.4.1. 安裝 pkgng
2.4.2. 轉換資料庫
2.4.3. install
2.4.4. delete
2.4.5. info
2.4.6. query
2.4.7. upgrade
2.5. FAQ
2.5.1. Shared object "libarchive.so.5" not found, required by "pkg"
2.5.2. pkg: PACKAGESITE in pkg.conf is deprecated. Please create a repository configuration file

2.1. Using the Packages System

2.1.1. PACKAGESROOT / PKG_PATH 環境變數

setenv PACKAGESROOT ftp://ftp.freebsdchina.org
pkg_add -r libxml2 gmake autoconf262


export PKG_PATH=ftp://ftp.freebsd.org/pub/FreeBSD/8.2/packages/i386/
pkg_add mysql-server php5-fastcgi php5-gd-5.2.6-no_x11 lighttpd-1.4.19p3 nginx pecl-APC
			

2.1.2. Installing a Package

# pkg_add -r lsof
			

2.1.3. Managing Packages

# pkg_info
libiconv-1.13.1_1   A character set conversion library
libxml2-2.7.7       XML parser library for GNOME
lighttpd-1.4.26_3   A secure, fast, compliant, and very flexible Web Server
pcre-8.02           Perl Compatible Regular Expressions library
php5-5.3.2_1        PHP Scripting Language
pkg-config-0.23_1   A utility to retrieve information about installed libraries
spawn-fcgi-1.6.3    spawn-fcgi is used to spawn fastcgi applications
			
freebsd0# pkg_version
libiconv                            =
libxml2                             =
lighttpd                            =
pcre                                =
php5                                =
pkg-config                          =
spawn-fcgi                          =


#  pkg_version -v
libiconv-1.13.1_1                   =   up-to-date with port
libxml2-2.7.7                       =   up-to-date with port
lighttpd-1.4.26_3                   =   up-to-date with port
pcre-8.02                           =   up-to-date with port
php5-5.3.2_1                        =   up-to-date with port
php5-ctype-5.3.2_1                  =   up-to-date with port
php5-dom-5.3.2_1                    =   up-to-date with port
php5-extensions-1.4                 =   up-to-date with port
php5-filter-5.3.2_1                 =   up-to-date with port
php5-hash-5.3.2_1                   =   up-to-date with port
php5-iconv-5.3.2_1                  =   up-to-date with port
php5-json-5.3.2_1                   =   up-to-date with port
php5-pdo-5.3.2_1                    =   up-to-date with port
php5-pdo_sqlite-5.3.2_1             =   up-to-date with port
php5-posix-5.3.2_1                  =   up-to-date with port
php5-session-5.3.2_1                =   up-to-date with port
php5-simplexml-5.3.2_1              =   up-to-date with port
php5-sqlite-5.3.2_1                 =   up-to-date with port
php5-tokenizer-5.3.2_1              =   up-to-date with port
php5-xml-5.3.2_1                    =   up-to-date with port
php5-xmlreader-5.3.2_1              =   up-to-date with port
php5-xmlwriter-5.3.2_1              =   up-to-date with port
pkg-config-0.23_1                   =   up-to-date with port
spawn-fcgi-1.6.3                    =   up-to-date with port
sqlite3-3.6.23.1_1                  =   up-to-date with port

			

2.1.4. Deleting a Package

# pkg_delete php5-5.3.2_1