Introduction

Today you will be compiling open source software from the source code.
FreeBSD makes this easier with a system it calls 'Ports', a collection of specially crafted 'Makefile's, that automate the process of downloading, untaring, patching, configuring, building, installing and tracking applications. FreeBSD has another system for installing software, called 'Packages'. Packages are faster to install, because they have already been compiled ahead of time, by either yourself, or someone at the FreeBSD Project. However, they lack the ability to change their major compile-time options. This is where the 'Ports' system comes in, when you compile the software your self, you get to choose the compile-time options. You can then roll these compiled files into your own package, for distribution to multiple machines

Warnings and Notes for this Lab:

See the FreeBSD Handbook Section on Ports
You will work in groups of three, one person will be the server, and the other two will be the clients.
The server will require that the ports collection is installed. You can do this through sysinstall, under 'configure' -> 'distributions'
If networking is not working, run: ifconfig lnc0 down; ifconfig lnc0 up; dhclient lnc0
The 'ports' collection automatically installs the man pages for the new programs you install
remember you will have to run the 'rehash' command before newly installed programs will work

Steps

Setting up NFS Server:

       You can use sysinstall to configure the nfs server. 
Once you run sysinstall the daemons will be automatically started.
Sysinstall will also open the /etc/exports for editing.
 Using sysinstall ensures that the deamons are started in the correct
order.
 

Setting up NFS Client: (in /etc/rc.conf)

	nfs_client_enable="YES"

On The Client:

Mount an NFS Exported Directory

	mount <host or ip of server>:<exported directory> <local mount point>
(examples)
mount 10.100.1.50:/usr/shared /media
mount freebie:/cdrom /cdrom

On The Server:

The ports collection is organized into categories, such as www, ftp, net, editors, archivers, math, games, and sysutils.
inside each of these directories under the root of the ports tree, are the directories for individual programs. Sometimes a program will appear more than once, if there are multiple major versions of it.

Search the Ports Collection for a specific program:

	cd /usr/ports
or in categories
cd /usr/ports/editors

On Both:

Last updated: 2010-02-16
Updated by: Cheri Weaver

Written by: Cheri Weaver