Proper FreeBSD installation practices

Kevin Kinsey kdk at
Wed Feb 1 11:54:56 PST 2006

Alvaro J. Gurdián wrote:

> I looked at the sysinstall and pkg_add man files and noticed
> that at  least in pkg_add it was looking for updates at
> Latest/.
> I made my way over to that address and noticed indeed  bind9-9.3.1
> was the newest available, then after some browsing I found 
> where the was a bind9-9.3.2.
> So assumed that both pkg_add and sysinstall were looking up
> the same  location.
> I tried to tell sysinstall to search a different location:
> sysinstall  
> _ftpPath= 
> stable/dns/ mediaSetFTP configPackages
> But it just ignored my input and used the same ftp address as it had  
> before.
> However with pkg_add I had a little further, after setting the 
> environment variable PACKAGEROOT to 
> I 
> was able to type, pkg_add -r bind9-9.3.2,  and successfully install.  
> Or at least so I thought.
> To make sure, I went to /var/db/pkg and saw bind9-9.3.2 listed.
> Unfortunately when I tried named -v, it replied: version  
> 9.3.1........what?  How?
> By now now I am terrible confused.

Keep in mind that FreeBSD has a "base system" which includes BIND.  It is
likely that your search path has "/usr/sbin" listed prior to 
"/usr/local/sbin" ...
this is the default. Here is proof from my machine, your is probably 

[1009] Wed 01.Feb.2006 13:38:41
[kadmin at archangel][~]
# echo $PATH

So, when you issue `named -v`, you are really saying `/usr/sbin/named 
-v`, and
the "base system" named is answering correctly.  Try 
`/usr/local/sbin/named -v`,
and see if you get the response you expect.

> What is the difference between
> Latest/
> and
> I thought release was the newest version of stable, and therefore
> these  two directories should point to the same info.  Or at least,
> will they  merge some time in the future?

RELEASE is the last "officially RELEASED version" of -STABLE, but
-STABLE continues in development, therefore, at any given time
except the exact moment that a RELEASE is tagged, -STABLE is
newer.  -STABLE and RELEASE will never again "merge"; if you will,
RELEASE "emerged" from -STABLE as of the date of the RELEASE
and is only supported with security fixes and major bug fixes (if any)
for a specified period of time.  -STABLE will "continue on" until such
time as FreeBSD 7 becomes STABLE ...

 ... have I made it difficult enough yet??

As far as ports/packages go, the "STABLE" ports/packages would
be newer than those in 6.0-RELEASE, because 6.0-RELEASE was
tagged and the packages built in November.

> Also, I believe I actually installed bind9-9.3.2, if so where is it?  
> If not, how can I?

As I said above, it's under /usr/local/sbin.  You can set

       named_program = "/usr/local/sbin/named"

in /etc/rc.conf, and the system should use the port instead
of the base system named.  See /etc/defaults/rc.conf for more

> There must be some logical aspect of FreeBSD that I do not
> understand,  because installing a package or a port has never been so 
> hard.

Well, the trick is that you installed a port which is a duplicate of
base system functionality, and haven't yet told FreeBSD that you
prefer something other than the base system's named(8).

> Having to set environment variables every time I want to get
> the newest  version of a program should not be the standard
> way to operate, I am  sure it isn't.

You are quite right.  Keeping the ports tree (/usr/ports) up to
date using cvsup is something of a "standard way to operate".
This, in conjuction with portupgrade or portmanager, helps
keep packages/ports "current".  See handbook chapter 20
for other tips on "the Cutting Edge."

> Thanks.
You're welcome.

Kevin D. Kinsey

Tart words make no friends; a spoonful of honey
will catch more flies than a gallon of vinegar.
		-- Ben Franklin

More information about the freebsd-questions mailing list