1. Skip to Menu
  2. Skip to Content
  3. Skip to Footer>
Thursday May 2nd     12:09 PM PDT                                  

Updating Ports Collection

Written by Greg King Thursday, 02 July 2009 19:22

You can google all you want to learn more about the PORTS COLLECTION on FreeBSD.  Suffice it to say, it is like WINDOWS UPDATE on steroids, and you want to use it even if you don't think you do!

 

Let's get some ground rules out about our syntax here.  A line starting with # means it is to be entered from the root user prompt, which coincidently is a #. Text in blue should be copied and pasted (or typed) into the command prompt.  If the item isn't in blue, don't type or copy/paste it!

Let's see how well you read the above, eh?

 

Make sure the system clock is set to the correct date & time in CMOS or port installs will fail!

 

# cd /usr/ports/net/cvsup-without-gui
# make install clean
# cp /usr/share/examples/cvsup/ports-supfile /etc


Now we are going to Edit /etc/ports-supfile to include: *default host=cvsup12.FreeBSD.org

You will need to hunt down for the line that says *default host= and edit it to say cvsup12.FreeBSD.org

When you are done, hit the ESC key, chose A to leave editor and yes, you want to save your changes.  Ready?  Here we go!


# edit /etc/ports-supfile
# rehash

When we installed FreeBSD, we copied a snapshot of the ports collection database from the cd-rom.  The ports library is pretty dynamic and changes daily so we want to have the latest version before we continue installing our software.  This step updates the available ports database, and can take a few minutes to run.

# cvsup -g -L 2 /etc/ports-supfile


So far, so good.  Let's create a refuse file, so we don't waste our time in the future getting updates to stuff we don't care about.  For instance, we don't need updates to all those language files, and some of the mail updates might break our configuration, so we will set the ports updater to ignore (refuse) them.

# cat << EOF > /var/db/sup/refuse

You will now be looking at a ? prompt which is ok.  copy and paste the BLUE STUFF below all at one time and you will be fine!

src/etc/sendmail/freebsd.mc*

misc/freebsd-doc-zh*

misc/freebsd-doc-it*

misc/freebsd-doc-de*

misc/freebsd-doc-pl*

misc/freebsd-doc-tr*

misc/freebsd-doc-sr*

misc/freebsd-doc-ru*

misc/freebsd-doc-pt*

misc/freebsd-doc-pl*

misc/freebsd-doc-nl*

misc/freebsd-doc-mn*

misc/freebsd-doc-ja*

misc/freebsd-doc-hu*

misc/freebsd-doc-fr*

misc/freebsd-doc-es*

misc/freebsd-doc-el*

misc/freebsd-doc-da*

misc/freebsd-doc-bn*

doc/bn_*
doc/da_*
doc/de_*
doc/es_*
doc/el_*
doc/fr_*
doc/it_*
doc/ja_*
doc/nl_*
doc/no_*
doc/pl_*
doc/pt_*
doc/ru_*
doc/sr_*
doc/zh_*
ports/arabic
ports/astro
ports/audio
ports/biology
ports/cad
ports/chinese
ports/finance
ports/french
ports/games
ports/german
ports/hebrew
ports/hungarian
ports/irc
ports/japanese
ports/korean
ports/news
ports/palm
ports/polish
ports/portuguese
ports/russian
ports/science
ports/ukrainian
ports/vietnamese
EOF

the file should end and save itself when it see's the EOF line.


Install OPENSSL


Apparently portupgrade requires openssl to run so we install it first which is OK because we will eventually need it anyway.

 

NOTE:  It is generally ok to accept the defaults of the option dialogue boxes that pop-up during installation.  We will attempt to indicate when you need to turn on an item that was defaulted to off, but it won't happen much.

# cd /usr/ports/security/openssl
# make install clean
# cd /usr/ports/ports-mgmt/portupgrade

This next step could take a little while depending upon your system.  If you get any popups asking for configuration, accept the defaults.

# make install clean

# rehash
# pkgdb -F

This next step could take a long time, depending upon your system.  Basically, it is going to check every application already installed to see if there is an updated version.  If so, it will download, compile and install it for you.  Again, accept the defaults of any popup screens that might come your way!

# portupgrade -av

 

Ok, assuming you made it this far without giving up, the good news is, you are done with the basic configuration of the FREEBSD system.  We will now get into some application installation stuff in the next article!

  FreeBSD Configuration
eXTReMe Tracker
Content View Hits : 404989