﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sam's Geek Log &#187; FreeBSD &#8212; General</title>
	<atom:link href="http://blog.agitatorsltd.com/category/unix/freebsd-2/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.agitatorsltd.com</link>
	<description>My Problems, Observations and Solutions with IT</description>
	<lastBuildDate>Tue, 29 Mar 2011 18:41:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Updating FreeBSD 8.1</title>
		<link>http://blog.agitatorsltd.com/unix/freebsd-2/?p=130</link>
		<comments>http://blog.agitatorsltd.com/unix/freebsd-2/?p=130#comments</comments>
		<pubDate>Sun, 12 Dec 2010 07:40:18 +0000</pubDate>
		<dc:creator>scoker3</dc:creator>
				<category><![CDATA[FreeBSD -- General]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://blog.agitatorsltd.com/?p=130</guid>
		<description><![CDATA[After the box that was hosting the old FreeBSD box (version 6.x) finally gave up the ghost and knowing that I wanted to skip 7.x, I just finished a fresh install of 8.1. After setting up my accounts the next &#8230; <a href="http://blog.agitatorsltd.com/unix/freebsd-2/?p=130">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After the box that was hosting the old FreeBSD box (version 6.x) finally gave up the ghost and knowing that I wanted to skip 7.x, I just finished a fresh install of 8.1.  After setting up my accounts the next step is updating and patching.  All material comes from the <a href="http://www.freebsd.org/doc/handbook">FreeBSD Handbook</a>.</p>
<p><strong>FreeBSD Update</strong><br />
This updates source, world and kernel.</p>
<ul>
<li>I choose to use the defaults in <code>/etc/freebsd-update.conf</code></li>
<li>Fetch the updates <code>freebsd-update fetch</code></li>
<li>Apply the updates <code>freebsd-update install</code></li>
<li>Reboot the systems <code>shutdown -r now</code></li>
</ul>
<p>If a rollback is needed the <code>freebsd-update rollback</code></p>
<p><strong>Updating Ports Collections</strong></p>
<ul>
<li>Download updated ports <code>portsnap fetch</code></li>
<li>The first time <code>portsnap</code> is executed, you have to use extract to install the downloaded files. <code>portsnap extract</code></li>
<li>Rest of the time <code>portsnap update</code> is OK.</li>
</ul>
<p><strong>Upgrading Ports</strong><br />
<code>pkgdb -aF</code><br />
<code>portupgrade -ay</code></p>
<p><strong>Updating Documentation Sources</strong><br />
<code>cvsup -h cvsup1.us.FreeBSD.org -g -L 2 /usr/share/examples/cvsup/doc-supfile</code></p>
<p><strong>Cleaning up Obsolete files, Directories and Libraries</strong></p>
<ul>
<li>check for obsolete files and libraries<br />
	<code>cd /usr/src<br />
	make check-old<br />
	make check-old-libs</code></li>
<li>If any obsolete files are found, deleted<br />
	<code>make delete-old<br />
	make delete-old-libs</code></li>
<li><code>portsclean -D</code> will purge old distfiles.</li>
<li><code>portsclean -C</code> will clean all &#8216;work&#8217; directories.</li>
<li><code>portsclean -L</code> will clean up unused libraries in /usr/local/lib/compat/pkg.</li>
<li><code>portsclean -P</code> will clean up outdated packages.</li>
</ul>
<p><map name='google_ad_map_130_90bb51bbd79c7857'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/130?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_130_90bb51bbd79c7857' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=130&amp;url= http%3A%2F%2Fblog.agitatorsltd.com%2Funix%2Ffreebsd-2%2F%3Fp%3D130' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.agitatorsltd.com/unix/freebsd-2/?p=130/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating FreeBSD 6.2</title>
		<link>http://blog.agitatorsltd.com/unix/freebsd-2/?p=22</link>
		<comments>http://blog.agitatorsltd.com/unix/freebsd-2/?p=22#comments</comments>
		<pubDate>Thu, 06 Dec 2007 03:02:10 +0000</pubDate>
		<dc:creator>scoker3</dc:creator>
				<category><![CDATA[FreeBSD -- General]]></category>
		<category><![CDATA[6.2]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[updating]]></category>

		<guid isPermaLink="false">http://blog.agitatorsltd.com/?p=22</guid>
		<description><![CDATA[Ah good old FreeBSD sometimes you forget that you actually have to patch it. While I am fairly good about keeping my release current, this is one of the few times that I have had to update because of an &#8230; <a href="http://blog.agitatorsltd.com/unix/freebsd-2/?p=22">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ah good old FreeBSD sometimes you forget that you actually have to patch it.  While I am fairly good about keeping my release current, this is one of the few times that I have had to update because of an exploit that concerned me enough that I patched because of it.  <a href="http://security.freebsd.org/advisories/FreeBSD-SA-07:09.random.asc">FreeBSD-SA-07:09.random.asc</a></p>
<p>Seeing this I also noticed my documentation on updating was out of date, especially in light of a few FreeBSD ports that now make it easier.  This is the quick and dirty way of updating a 6.2 FreeBSD System</p>
<p><em>Dependencies:  portmanager,  portsnap, pkg_version</em></p>
<h3>Applying Binary Security  Patches</h3>
<p></p>
<ol>
<li>Grab the latest binary updates<br />
<blockquote><p># freebsd-update fetch </p></blockquote>
</li>
<li>Install the updates<br />
<blockquote><p># freebsd-update install</p></blockquote>
</li>
<li>Check OS Level<br />
<blockquote><p># uname -a</p></blockquote>
</li>
<li>Reboot the System<br />
<blockquote><p># shutdown -r now</p></blockquote>
</li>
<li>Confirm Update<br />
<blockquote><p># uname -a</p></blockquote>
</li>
</ol>
<h3>Updating Software &#038; Applications</h3>
<p></p>
<ol>
<li>Update your ports tree<br />
<blockquote><p># portsnap fetch</p></blockquote>
<p>     If you are running Portsnap for the first time, extract the snapshot into /usr/ports:</p>
<blockquote><p># portsnap extract</p></blockquote>
<p>     If you already have a populated /usr/ports and you are just updating, run the following command instead:</p>
<blockquote><p># portsnap update</p></blockquote>
</li>
<li>Display ports that need updating<br />
<blockquote><p># pkg_version -vIL=</p></blockquote>
</li>
<li>upgrade installed ports:<br />
<blockquote><p># portmanager -u</p></blockquote>
</li>
</ol>
<p><map name='google_ad_map_22_90bb51bbd79c7857'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/22?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_22_90bb51bbd79c7857' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=22&amp;url= http%3A%2F%2Fblog.agitatorsltd.com%2Funix%2Ffreebsd-2%2F%3Fp%3D22' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.agitatorsltd.com/unix/freebsd-2/?p=22/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Certificate Authority (CA) for a SSL Certificate</title>
		<link>http://blog.agitatorsltd.com/unix/freebsd-2/?p=14</link>
		<comments>http://blog.agitatorsltd.com/unix/freebsd-2/?p=14#comments</comments>
		<pubDate>Sat, 26 Aug 2006 18:13:52 +0000</pubDate>
		<dc:creator>scoker3</dc:creator>
				<category><![CDATA[FreeBSD -- General]]></category>

		<guid isPermaLink="false">http://blog.agitatorsltd.com/?p=14</guid>
		<description><![CDATA[1) Create the certificate authority certificate and key. Make sure you remember the password you use. You will need to use it repeatedly. mkdir /CERTS/ldap-certs/ca cd /CERTS/ldap-certs/ca openssl req -new -x509 -keyout ./ca.key -out ./ca.crt echo 01 > /CERTS/ldap-certs/ca/serial touch &#8230; <a href="http://blog.agitatorsltd.com/unix/freebsd-2/?p=14">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>1) Create the certificate authority certificate and key. Make sure you remember the password you use. You will need to use it repeatedly.</p>
<blockquote><p>mkdir /CERTS/ldap-certs/ca<br />
cd /CERTS/ldap-certs/ca<br />
openssl req -new -x509 -keyout ./ca.key -out ./ca.crt<br />
echo 01 >  /CERTS/ldap-certs/ca/serial<br />
touch > /CERTS/ldap-certs/ca/index.txt</p></blockquote>
<p>2) Create the openssl.cf file in /CERTS/ldap-certs</p>
<blockquote><p>####################################################################<br />
[ ca ]<br />
default_ca      = CA_default            # The default ca section</p>
<p>####################################################################<br />
[ CA_default ]</p>
<p>dir             = /CERTS/ldap-certs/ca              # Where everything is kept<br />
certs           = $dir/certs            # Where the issued certs are kept<br />
crl_dir         = $dir/crl              # Where the issued crl are kept<br />
database        = $dir/index.txt        # database index file.<br />
new_certs_dir   = $dir/newcerts         # default place for new certs.</p>
<p>certificate     = $dir/ca.crt       # The CA certificate<br />
serial          = $dir/serial           # The current serial number<br />
crl             = $dir/crl.pem          # The current CRL<br />
private_key     = $dir/ca.key           # The private key<br />
RANDFILE        = $dir/private/.rand    # private random number file</p>
<p># Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs<br />
# so this is commented out by default to leave a V1 CRL.<br />
# crl_extensions        = crl_ext</p>
<p>#default_days    = 365                   # how long to certify for<br />
default_days    = 3650                   # how long to certify for<br />
#default_crl_days= 30                    # how long before next CRL<br />
default_crl_days= 0                    # how long before next CRL<br />
default_md      = md5                   # which md to use.<br />
preserve        = no                    # keep passed DN ordering</p>
<p># A few difference way of specifying how similar the request should look<br />
# For type CA, the listed attributes must be the same, and the optional<br />
# and supplied fields are just that.<br />
policy          = policy_anything</p>
<p># For the &#8216;anything&#8217; policy<br />
# At this point in time, you must list all acceptable &#8216;object&#8217;<br />
# types.<br />
[ policy_anything ]<br />
countryName             = optional<br />
stateOrProvinceName     = optional<br />
localityName            = optional<br />
organizationName        = optional<br />
organizationalUnitName  = optional<br />
commonName              = supplied<br />
emailAddress            = optional</p></blockquote>
<p>3) Generate a Certificate Signing Request</p>
<blockquote><p>mkdir /CERTS/ldap-certs/server<br />
cd /CERTS/ldap-certs/server<br />
openssl genrsa -out hostname.key<br />
openssl req -new -key hostname.key -out hostname.csr</p></blockquote>
<p>4) Sign the hostname certificate with your certificate authority</p>
<blockquote><p>openssl ca -config ../openssl.cf -out hostname.crt -infiles ./hostname.csr</p></blockquote>
<p><map name='google_ad_map_14_90bb51bbd79c7857'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/14?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_14_90bb51bbd79c7857' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=14&amp;url= http%3A%2F%2Fblog.agitatorsltd.com%2Funix%2Ffreebsd-2%2F%3Fp%3D14' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.agitatorsltd.com/unix/freebsd-2/?p=14/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating FreeBSD 6.0 to FreeBSD 6.1</title>
		<link>http://blog.agitatorsltd.com/unix/freebsd-2/?p=11</link>
		<comments>http://blog.agitatorsltd.com/unix/freebsd-2/?p=11#comments</comments>
		<pubDate>Sat, 20 May 2006 03:22:50 +0000</pubDate>
		<dc:creator>scoker3</dc:creator>
				<category><![CDATA[FreeBSD -- General]]></category>

		<guid isPermaLink="false">http://www.bodhibot.com/scoker3-blog/?p=11</guid>
		<description><![CDATA[Preliminary Work 1) First make sure that you have cvsup installed pkg_add -r cvsup-without-gui rehash 2) Setup your standard-supfile to update to the Release English 6.1 Sources cp /usr/src/share/examples/cvsup/standard-supfile ~/ 3) Edit the standard-supfile file: vi standard-supfile Change *default release=cvs &#8230; <a href="http://blog.agitatorsltd.com/unix/freebsd-2/?p=11">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Preliminary Work</strong></p>
<p>1) First make sure that you have cvsup installed</p>
<blockquote><p>pkg_add -r cvsup-without-gui<br />
rehash</p></blockquote>
<p>2) Setup your standard-supfile to update to the Release English 6.1 Sources</p>
<blockquote><p>cp /usr/src/share/examples/cvsup/standard-supfile ~/</p></blockquote>
<p>3) Edit the standard-supfile file:</p>
<blockquote><p>vi standard-supfile</p></blockquote>
<p>Change</p>
<blockquote><p>*default release=cvs tag=RELENG_6_0</p></blockquote>
<p>to</p>
<blockquote><p>*default release=cvs tag=RELENG_6_1</p></blockquote>
<p>Also make sure that you edit the</p>
<blockquote><p>*default host=CHANGE_THIS.FreeBSD.org</p></blockquote>
<p>to the mirror that you want to use.</p>
<p><strong>Updating your Source Tree</strong></p>
<p>1) Download and install your new sources</p>
<blockquote><p>cvsup -g -L 2 standard-supfile</p></blockquote>
<p>2) Be sure to read /usr/src/UPDATING.</p>
<p><strong>Installing New Sources</strong></p>
<p>1) Build your world</p>
<blockquote><p>cd /usr/src<br />
make clean;make cleanworld<br />
make buildworld</p></blockquote>
<p>2) Back up your current kernel.  If you have a custom kernel config, back it up, make a copy of the new GENERIC to your old custom config name, and then edit the new file since some things may have changed since the last time you updated. In the example below, our custom kernel config is MYKERNEL.</p>
<blockquote><p>cd /usr/src/sys/i386/conf/<br />
cp MYKERNEL MYKERNEL.060519</p></blockquote>
<p>3) Build and install the new kernel.</p>
<blockquote><p>cd /usr/src<br />
make buildkernel KERNCONF=MYKERNEL<br />
make installkernel KERNCONF=MYKERNEL<br />
mergemaster -p</p></blockquote>
<p>Mergemaster checks to see if any critical files need updated to ensure the rest of the process will work smoothly. Just follow the prompts and PAY ATTENTION to what its asking you. Do not just overwrite files or you may lose users, groups etc.</p>
<p>Now reboot and drop into single user mode:</p>
<blockquote><p>shutdown -h now</p></blockquote>
<p>and at the boot prompt, choose single user mode. On some systems you have to hit the SPACE bar and then enter boot -s at the prompt if you do not see an option.</p>
<p>At the shell prompt mount the disks and turn on swap</p>
<blockquote><p>fsck -p<br />
mount -u /<br />
mount -a -t ufs<br />
swapon -a</p></blockquote>
<p>Install and run mergemaster again:</p>
<blockquote><p>cd /usr/src<br />
make installworld<br />
mergemaster</p></blockquote>
<p>This last run of mergemaster checks any other files that should be merged/updated due to the upgrade. Do the same as last time, pay attention.</p>
<blockquote><p>reboot</p></blockquote>
<p>At this point the system should be on the 6.1 release.  I then run:</p>
<blockquote><p>portmanager -u -f</p></blockquote>
<p>This rebuild all installed ports to ensure we are using all our new libs and installs.</p>
<p><map name='google_ad_map_11_90bb51bbd79c7857'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/11?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_11_90bb51bbd79c7857' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=11&amp;url= http%3A%2F%2Fblog.agitatorsltd.com%2Funix%2Ffreebsd-2%2F%3Fp%3D11' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.agitatorsltd.com/unix/freebsd-2/?p=11/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on Keeping FreeBSD 6 up to date</title>
		<link>http://blog.agitatorsltd.com/unix/freebsd-2/?p=4</link>
		<comments>http://blog.agitatorsltd.com/unix/freebsd-2/?p=4#comments</comments>
		<pubDate>Sun, 16 Apr 2006 14:32:42 +0000</pubDate>
		<dc:creator>scoker3</dc:creator>
				<category><![CDATA[FreeBSD -- General]]></category>

		<guid isPermaLink="false">http://www.bodhibot.com/scoker3-blog/?p=4</guid>
		<description><![CDATA[Updating FreeBSD 6.x Before you start Setup environment for packages: setenv PACKAGESITE ftp://ftp2.us.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/ Using freebsd-update to update standard kernels 1) Add freebsd update package: pkg_add -r freebsd-update 2) Setup and use freebsd-update: cp /usr/local/etc/freebsd-update.conf.sample /usr/local/etc/freebsd-update.conf mkdir /usr/local/freebsd-update freebsd-update fetch freebsd-update &#8230; <a href="http://blog.agitatorsltd.com/unix/freebsd-2/?p=4">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Updating FreeBSD 6.x</strong></p>
<p><em>Before you start</em><br />
Setup environment for packages:</p>
<blockquote><p>setenv PACKAGESITE ftp://ftp2.us.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/</p></blockquote>
<p><strong>Using freebsd-update to update standard kernels</strong><br />
1) Add freebsd update package:</p>
<blockquote><p>pkg_add -r freebsd-update</p></blockquote>
<p>2) Setup and use freebsd-update:</p>
<blockquote><p>cp /usr/local/etc/freebsd-update.conf.sample /usr/local/etc/freebsd-update.conf<br />
mkdir /usr/local/freebsd-update<br />
freebsd-update fetch<br />
freebsd-update install<br />
shutdown -r now</p></blockquote>
<p><strong>Updating packages and ports</strong></p>
<p>1) install portaudit package</p>
<blockquote><p>pkg_add -r portaudit<br />
rehash</p></blockquote>
<p>2) Check for updates</p>
<blockquote><p>/usr/local/sbin/portaudit -Fda</p></blockquote>
<p>3) Updating of Ports tree</p>
<blockquote><p>pkg_add -r portsnap (bundled with 6.x)<br />
portsnap fetch<br />
portsnap extract (only have to do this once on a new install)<br />
portsnap update</p></blockquote>
<p>4) Updating Applications</p>
<blockquote><p>pkg_add -r portupgrade<br />
rehash<br />
portversion -v -l &#8220;<"<br />
portupgrade -varRPP <em>(tells it to be verbose, act on up and down depends, and upgrade only with packages)</em><br />
<em>on any that fail then do</em> portupgrade -varR <em>(this tells it to build from ports)</em></p></blockquote>
<p><map name='google_ad_map_4_90bb51bbd79c7857'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/4?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_4_90bb51bbd79c7857' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=4&amp;url= http%3A%2F%2Fblog.agitatorsltd.com%2Funix%2Ffreebsd-2%2F%3Fp%3D4' /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.agitatorsltd.com/unix/freebsd-2/?p=4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.441 seconds -->

