Mindbend.org

Mindblog

Welcome to my Blog!

Techblog

Information should be free, accurate, and available. I will be updating this section most often, enjoy!

Portfolio

Various galleries of artwork and photography I have done over the last five years.

Scripts

Mini scripts I have written and decided to share. Mostly oneliners for managing network and system load.

Mindware

Software projects are in the works and will be here eventually!

Contact

You can contact me through various methods.

Installing FreeBSD Ports

This is to serve as a quick reference guide to installing FreeBSD ports. While there are many ways to do this, these work for me.


Personally I prefer to do a minimum installation when setting up a BSD server. This way I can configure ground up 100% of the services so I know what is installed and what is not. When going through such a route, you will need to setup the initial ports collection as it is not installed. You can set this up through your installation CDROM or you can download these off of the internet.

Initial Setup of Ports for Minimum Installations

It should be noted that csup will update the ports library if its is already installed, but will not rebuild the ports. For initial setup or update, run the following:

 csup -g -L 2 -h cvsup.FreeBSD.org /usr/share/examples/cvsup/ports-supfile

This command will install/update directly from FreeBSD's port collection. While it is easier to leave the default settings alone, you can actually create your own ports file containing only the ports you want. For example, you can #ports-all and remove the comment to only the lines belonging to what you need. If your running a webserver, in most cases there is no reason to have the X packages installed, therefore you can just leave those commented out.

Using portsnap to install and update

This will download a compressed snapshot of the ports collection and store it in /var/db/portsnap.

portsnap fetch

This will extract the downloaded snapshot and install into your ports collection.

portsnap extract

And of course, if you have already installed your ports collection you can run that to update the ports.

portsnap update

Installing Ports through sysinstall

If you are not familiar with sysinstall, it is the post configuration utility you used when installing your system. If you did not install your Operating System, it is a utility designed for installation and configuring of utilities and system services.


First type sysinstall then select Configure

sysinstall

+----------- FreeBSD/i386 7.1-RELEASE - sysinstall Main Menu -----------+
| Welcome to the FreeBSD installation and configuration tool.  Please   |
| select one of the options below by using the arrow keys or typing the |
| first character of the option name you're interested in.  Invoke an   |
| option with [SPACE] or [ENTER].  To exit, use [TAB] to move to Exit.  |
| +-------------------------------------------------------------------+ |
| |    Usage       Quick start - How to use this menu system          | |
| |   Standard     Begin a standard installation (recommended)        | |
| |   Express      Begin a quick installation (for experts)           | |
| |    Custom      Begin a custom installation (for experts)          | |
| |-->Configure    Do post-install configuration of FreeBSD<--        | |
| |   Doc          Installation instructions, README, etc.            | |
| |   Keymap       Select keyboard type                               | |
| |   Options      View/Set various installation options              | |
| |   Fixit        Repair mode with CDROM/DVD/floppy or start shell   | |
| |   Upgrade      Upgrade an existing system                         | |
| |   Load Config  Load default install configuration                 | |
| |   Index        Glossary of functions                              | |
| +-------------------------------------------------------------------+ |
+-----------------------------------------------------------------------+
|                        [ Select ]    X Exit Install                   |
+-----------------------------------------------------------------------+

Next select distributions

+---------------------- FreeBSD Configuration Menu -----------------------+
| If you've already installed FreeBSD, you may use this menu to customize |
| it somewhat to suit your particular configuration.  Most importantly,   |
| you can use the Packages utility to load extra "3rd party"              |
| software not provided in the base distributions.                        |
| +---------------------------------------------------------------------+ |
| | X Exit            Exit this menu (returning to previous)            | |
| |->Distributions    Install additional distribution sets<--           | |
| |  Packages         Install pre-packaged software for FreeBSD         | |
| |  Root Password    Set the system manager's password                 | |
| |  Fdisk            The disk Slice (PC-style partition) Editor        | |
| |  Label            The disk Label editor                             | |
| |  User Management  Add user and group information                    | |
| |  Console          Customize system console behavior                 | |
| |  Time Zone        Set which time zone you're in                     | |
| |  Media            Change the installation media type                | |
| |  Mouse            Configure your mouse                              | |
| |  Networking       Configure additional network services             | |
| |  Security         Configure system security options                 | |
| |  Startup          Configure system startup options                  | |
| |  TTYs             Configure system ttys.                            | |
| |  Options          View/Set various installation options             | |
| |  HTML Docs        Go to the HTML documentation menu (post-install)  | |
| |  Load KLD         Load a KLD from a floppy                          | |
| +---------------------------------------------------------------------+ |
+-------------------------------------------------------------------------+
|                         [  OK  ]       Cancel                           |
+-----------[ Press F1 for more information on these options ]------------+

Next scroll to ports and hit space to place the [x]

+----------- Select the distributions you wish to install. -----------+  
| Please check off the distributions you wish to install.  At the     |  
| very minimum, this should be "base".                                |  
| +-----------------------------------------------------------------+ |  
| | <<< X Exit     Exit this menu (returning to previous)           | |  
| |     All        All system sources, binaries and X Window System | |  
| |     Reset      Reset all of the below                           | |  
| | [ ]  base      Binary base distribution (required)              | |  
| | [ ]  kernels   Binary kernel distributions (required)           | |  
| | [ ]  dict      Spelling checker dictionary files                | |  
| | [ ]  doc       Miscellaneous FreeBSD online docs                | |  
| | [ ]  games     Games (non-commercial)                           | |  
| | [ ]  info      GNU info files                                   | |  
| | [ ]  man       System manual pages - recommended                | |  
| | [ ]  catman    Preformatted system manual pages                 | |  
| | [ ]  proflibs  Profiled versions of the libraries               | |  
| | [ ]  src       Sources for everything                           | |  
| | [X]  ports     The FreeBSD Ports collection                     | |  
| | [ ]  local     Local additions collection                       | |  
| | [ ]  X.Org     The X.Org distribution                           | |  
| +-----------------------------------------------------------------+ |  
+---------------------------------------------------------------------+  
|                       [  OK  ]       Cancel                         |  
+---------------------------------------------------------------------+ 

Next scroll back up to exit and press Enter

+----------- Select the distributions you wish to install. -----------+  
| Please check off the distributions you wish to install.  At the     |  
| very minimum, this should be "base".                                |  
| +-----------------------------------------------------------------+ |  
| | <<< X Exit     Exit this menu (returning to previous)<--        | |  
| |     All        All system sources, binaries and X Window System | |  
| |     Reset      Reset all of the below                           | |  
| | [ ]  base      Binary base distribution (required)              | |  
| | [ ]  kernels   Binary kernel distributions (required)           | |  
| | [ ]  dict      Spelling checker dictionary files                | |  
| | [ ]  doc       Miscellaneous FreeBSD online docs                | |  
| | [ ]  games     Games (non-commercial)                           | |  
| | [ ]  info      GNU info files                                   | |  
| | [ ]  man       System manual pages - recommended                | |  
| | [ ]  catman    Preformatted system manual pages                 | |  
| | [ ]  proflibs  Profiled versions of the libraries               | |  
| | [ ]  src       Sources for everything                           | |  
| | [X]  ports     The FreeBSD Ports collection                     | |  
| | [ ]  local     Local additions collection                       | |  
| | [ ]  X.Org     The X.Org distribution                           | |  
| +-----------------------------------------------------------------+ |  
+---------------------------------------------------------------------+  
|                       [  OK  ]       Cancel                         |  
+---------------------------------------------------------------------+ 

Next you will select your installation media

+----------------------- Choose Installation Media -----------------------+
| FreeBSD can be installed from a variety of different installation       |
| media, ranging from floppies to an Internet FTP server.  If you're      |
| installing FreeBSD from a supported CD/DVD drive then this is generally |
| the best media to use if you have no overriding reason for using other  |
| media.                                                                  |
| +---------------------------------------------------------------------+ |
| |   1 CD/DVD       Install from a FreeBSD CD/DVD                      | |
| |   2 FTP          Install from an FTP server                         | |
| |   3 FTP Passive  Install from an FTP server through a firewall      | |
| |   4 HTTP         Install from an FTP server through a http proxy    | |
| |   5 DOS          Install from a DOS partition                       | |
| |   6 NFS          Install over NFS                                   | |
| |   7 File System  Install from an existing filesystem                | |
| |   8 Floppy       Install from a floppy disk set                     | |
| |   9 Tape         Install from SCSI or QIC tape                      | |
| |   X Options      Go to the Options screen                           | |
| +---------------------------------------------------------------------+ |
+-------------------------------------------------------------------------+
|                         [  OK  ]       Cancel                           |
+------[ Press F1 for more information on the various media types ]-------+

The method for installation will be up to you. One thing to note here is that if your installing from any media other than directly through FreeBSD's mirrored servers, you could be installing out of date ports. If this is the case, it is generally good practice to run the 'portsnap update' utility when this has completed.

Installing FreeBSD Ports
Understanding Crontab Entries
Understanding UNIX Permissions
Written by:Robert Church
Published on:04-17-2009

Quick Byte

When the only tool you own is a hammer, every problem begins to
resemble a nail.
-- Abraham Maslow