Installing packages using ports in FreeBSD

Suppose you want to install package lsof

# cd /usr/ports/sysutils/lsof 

Once inside the lsof directory, you need to compile, or “build”, the port. This is done by simply typing make at the prompt. Once you have done so, you should see something like this:

# make
[extraction output snipped]
>> Checksum OK for lsof_4.57D.freebsd.tar.gz.
===> Patching for lsof-4.57
===> Applying FreeBSD patches for lsof-4.57
===> Configuring for lsof-4.57
[configure output snipped]
===> Building for lsof-4.57
[compilation output snipped]

The next step is to install the port. In order to install it, you simply fire the make command

# make install
===> Installing for lsof-4.57
[installation output snipped]
===> Generating temporary packing list
===> Compressing manual pages for lsof-4.57
===> Registering installation for lsof-4.57
This port has installed the following binaries
which execute with increased privileges.

You are done :)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: