使用NetBSD的pkgsrc安装软件非常简单.
一.如何取得pkgsrc:
方法一:
下载:
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc-current.tar.gz
注:http://www.netbsd.org/Documentation/software/packages.html
解压:
# cd /usr# gzip -c -d pkgsrc-current.tar.gz | tar -xpf -
方法二:
# setenv CVSROOT :pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot# cvs -d $CVSROOT login
# 密码:anoncvs# cd /usr# cvs checkout pkgsrc
二.安装软件:
一.pkgfind--find packages in pkgsrc.
# cd /usr/pkgsrc/pkgtools/pkgfind# make install clean clean-depends
简单用法:pkgfind keyword,(e.g. pkgfind wget).
二.pkglint--a verifier for pkgsrc directories.
# cd /usr/pkgsrc/pkgtools/pkglint# make install clean clean-depends
lintpkgsrc--verifier for the pkgsrc tree.
简单用法: lintpkgsrc -i
三.pkgsrc编译安装下载所的ftp感觉一般,下面用wget代替.
1.安装wget:
# cd /usr/pkgsrc/net/wget# make install clean clean-depends
2.设置:
echo 'FETCH_CMD=/usr/pkg/bin/wget -cT 10' >> /etc/mk.conf
四.packages
除了使用pkgsrc编译安装之外,还可以使用已编译好的二进制包安装.
1.Packages can be installed either by downloading a package and its prerequisites to a local disk and running:
# pkg_add <package>
2.or directly by specifying the full URL as in:
# pkg_add ftp://ftp.NetBSD.org/pub/NetBSD/packages/<os_release>/<arch>/<type>/<package