使用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:[email protected]:/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