- Insert OpenBSD CD #1 (i386), and traverse to the packages directory.
$ mkdir -p /cdrom $ mount /dev/cd0a /cdrom/ $ cd /cdrom $ cd 3.9/packages/i386/
- You can list all of the packages available from the CD.
$ ls | more ... mod_perl-1.29p0.tgz mozilla-firefox-18.104.22.168.tgz mozilla-thunderbird-1.5p2.tgz mp3cddb-0.1.tgz mp3info-0.8.4.tgz mpeg_play-2.4.tgz mpg321-0.2.10p0.tgz mutt-1.4.2ip2.tgz mysql-client-5.0.18p0.tgz nano-1.2.5.tgznedit-5.5.tgz netpbm-9.24p3.tgz ...
- The pkg_add utility will install the requested application.
$ pkg_add mutt-1.4.2ip2.tgz
- The pkg_add utility does not require the application version. The following command will also install mutt.
$ pkg_add mutt
- The pkg_add utility will also install any dependencies (ex. python depends on bzip2).
$ pkg_add python-2.3.5p3.tgz python-2.3.5p3:bzip2-1.0.3: complete python-2.3.5p3: complete
- Here are some packages that I always install.
$ pkg_add python-2.3.5p3.tgz $ pkg_add mozilla-firefox-22.214.171.124.tgz $ pkg_add mutt-1.4.2ip2.tgz $ pkg_add emacs-21.4p0.tgz $ pkg_add nano-1.2.5.tgz $ pkg_add xpdf-3.01p1.tgz
- The pkg_info utility will list all of the packages that you installed. After a fresh install, there will be no packages listed. After installing python, firefox, mutt, emacs, nano, and their dependencies, the following packages should be listed.
$ pkg_info atk-1.10.3p1 bzip2-1.0.3 block-sorting file compressor, unencumbered cairo-1.0.2p0 vector graphics library emacs-21.4p0 GNU editor: extensible, customizable, self documenting esound-0.2.34p0 sound library for Enlightenment expat-1.95.6p1 XML 1.0 parser written in C gettext-0.14.5p1 GNU gettext glib2-2.8.4 general-purpose utility library glitz-0.4.4 OpenGL image compositing library gtk+2-2.6.10p1 multi-platform graphical toolkit jpeg-6bp3 IJG's JPEG compression utilities libaudiofile-0.2.6p0 SGI audiofile library clone libiconv-1.9.2p3 character set conversion library libungif-4.1.4 tools and library routines for working with GIF images mozilla-firefox-126.96.36.199 redesign of Mozilla's browser component mutt-1.4.2ip2 tty-based e-mail client nano-1.2.5 small, easy to use editor pango-1.10.2p0 library for layout and rendering of text png-1.2.8 library for manipulating PNG images python-2.3.5p3 interpreted object-oriented programming language tiff-3.7.3p0 tools and library routines for working with TIFF images
- The pkg_delete utility can delete all of the packages that you installed.
$ pkg_delete *
- If you delete a specific package using the pkg_delete utility, the packages that were installed as dependencies will not get automatically deleted. For example, python depends on bzip2, but when you delete the python package, the bzip2 package does not get deleted.
$ pkg_delete python-2.3.5p3.tgz
- Unmount and eject OpenBSD CD #1.
$ umount /cdrom/