ports vs source

Matthew Seaman m.seaman at infracaninophile.co.uk
Fri Sep 3 07:57:03 PDT 2004

On Fri, Sep 03, 2004 at 05:26:11PM +0300, Cristi Tauber wrote:

>   Can anyone tell me which are the avantages of installing from ports
> rather than installing from tar balls ? I am kind of new to BSD, and I'm
> familiar with linux install from tar & stuff. I know to give the
> switches to configure to tune the source for installation ... but how i
> can find the parameters for port install ? I mean ... let's say i want
> to install php and i have to give the path to mysql, apache and others
> graphical libraries ... how can I do that with ports ? 
>    Any link or explications about this subject is appreciated.

FreeBSD ports /is/ installing from source.  Except that all of the
boring stuff like working out what dependencies you need, what flags
are required to find the appropriate shlibs, even where to download
the software from: all that stuff is handled automatically for you.

If you want to setup a webserver running PHP code against a MySQL
back-end database, on a virgin FreeBSD system you can just:

    # cd /usr/ports/www/mod_php4
    # make install
    # cd /usr/ports/databases/php4-mysql
    # make install 

And all of the PHP stuff, plus apache plus mysql will be installed for
you.  Well, in practice you'ld want to set a few variables on the make
command lines so that you got the right variant of apache (2.0.50 vs
1.3.31 vs 1.3.31+mod_ssl-2.8.19 amongst others) and the right version
of MySQL (choose from 3.23.58, 4.0.20, 4.1.4 or 5.0.0).

The other massive advantage of installing via ports is the packaging
system.  It keeps track of all of the files and directories
etc. installed by each port so that you can do things like create a
pkg tarball of the installed port as a backup or to install quickly
onto another machine.  You can also de-install ports cleanly, and in
conjunction with tools like portupgrade(1) the ports system makes
tasks like managing software updates a breeze.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040903/eb3030d6/attachment.bin

More information about the freebsd-questions mailing list