Now that su is installed and working, OpenBSDs functionality considerably expands with the installation of both the ports and the package collections. Installing new functionality on OpenBSD requires Root or pseudo (su) Root privileges. All of the following instructions require that you be logged in as the SuperUser (root).Issue the following commands to install several thousand program skeletons:
- ftp ftp://ftp.openbsd.org/pub/OpenBSD/3.6/ports.tar.gz
- mv ports.tar.gz /usr
- cd /usr
- tar -xzf ports.tar.gz
Pop back into your open root console:
1 |
TYPE: CTRL-ALT-F1 |
Notice that true root keeps track of all uses of su. Press ENTER to get your prompt back, and type login. Log in as the user you created. Type su, enter the root password, and voila!
Using Ports: Invoking the tcsh Shell
All of the ports work in a similar fashion. Navigate to the port directory you want and type make && make install within the port directory that includes the Makefile. For example, to install the tcsh shell:
- TYPE: cd /usr/ports/shells/tcsh.
- TYPE: make && make install.
And that is the basic formula for installing ports. Many ports, like tcsh, have special instructions that appear during or following the install. In this case:
- TYPE: vi /etc/shells.
- Add the line /bin/tcsh to this file.
- Save and quit (ESC, :wq).
At the root prompt, type /usr/local/bin/tcsh to invoke the tcsh shell. I like this shell for its up-arrow command history function (never type the same thing twice). You can perform subsequent invocations of this shell by typing tcsh at the command prompt. I suggest continuing to use the tcsh shell for the rest of the tutorial.
Packages Collection
The packages collection is the preferred way of installing software onto your OpenBSD system. Packages automagically install the required dependencies. As with the Ports system, you must be logged in as the SuperUser (root). You can browse the packages online. (Note: Intel architecture is i386.) Tell pkg_add where to find the packages via FTP. Do not attempt to install packages from an older or a newer release number of OpenBSD. Because this tutorial builds OpenBSD version 3.6, make sure you get the packages from the version 3.6 folder (setenv as seen below): TYPE setenv PKG_PATH ftp://ftp.openbsd.org/pub/OpenBSD/3.6/packages/i386/