Install Squid on FBSD with different configure options?

Michael Powell nightrecon at
Fri Feb 18 19:49:31 UTC 2011

Ed Flecko wrote:

> Hi folks,
> I want to install squid from the ports package (i.e.,
> /usr/ports/www/squid) instead of installing from source (which, it's
> my understanding, would force me to create a squid user, squid group,
> etc. manually).
> However, I want squid to be installed with the ability to restrict end
> users internet access based upon their PCs MAC address, which means I
> need the --enable-arp-acl option when installing squid.
> I have modified the Makefile (/usr/ports/www/squid/Makefile) to
> include this option, but now I'm a little confused - if I use the
> standard pkg_add squid command, won't that just fetch the package from
> the internet?

There are two ways to install software in FreeBSD. pkg_add will download and 
install a binary that has been previously compiled using the ports system, 
just it is prebuilt. You will not be able to change build-time parameters, 
e.g the Makefile changes above will have no effect on a package.

The other way is to utilize the ports system to compile from source locally. 
This allows for build-time config changes, such as your Makefile edit. 
Generally, most of the time, most of these options already exist and make 
config will give you a menu to choose them. In this case, you will download 
the source code tarball and not a prebuilt package.

> How do I install squid from the ports package that's on my hard drive?

As per instructions in other email.

There is not a ports 'package' on your hard drive. There is a 'ports 
system', which is a build system for compiling applications locally. It is 
this same build system which is used to generate the binary packages for use 
with pkg_add. Please read the pertinent sections in the Handbook for more 
detailed information. Pay attention to something referred to as 'updating 
the ports tree' as this is usually something newcomers stumble over. 

Hint: the ports tree is responsible for dependency tracking/resolution. So 
anytime before installing or updating software you should update your ports 
tree first. There are sections in the Handbook which cover this. 
> I am correct in that when I install the package from my local hard
> drive, it will automatically create the necessary users/groups for me,
> right?



More information about the freebsd-questions mailing list