<?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>My Galagzee! &#187; installation</title>
	<atom:link href="http://my.galagzee.com/tag/installation/feed/" rel="self" type="application/rss+xml" />
	<link>http://my.galagzee.com</link>
	<description>Tech in a Galagzee, Not So Far Away.</description>
	<lastBuildDate>Wed, 28 Jul 2010 17:09:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>FreeBSD 7.0 New Install</title>
		<link>http://my.galagzee.com/2008/06/28/freebsd-70-new-install/</link>
		<comments>http://my.galagzee.com/2008/06/28/freebsd-70-new-install/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 08:25:53 +0000</pubDate>
		<dc:creator>Ville Walveranta</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[RELEASE-7.0]]></category>

		<guid isPermaLink="false">http://my.galagzee.com/?p=74</guid>
		<description><![CDATA[I&#8217;ve been running various versions of FreeBSD since 2001, and over that time the installation procedure has changed several times as new versions of the operating system have been released. Since I&#8217;m jack of all trades (or at least many trades), often several months or more passes without significant work in the UNIX environment, and]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been running various versions of FreeBSD since 2001, and over that time the installation procedure has changed several times as new versions of the operating system have been released. Since I&#8217;m jack of all trades (or at least <em>many</em> trades), often several months or more passes without significant work in the UNIX environment, and my memory fades as I&#8217;m engrossed in something completely different such as software development work. I&#8217;m still running FreeBSD 6.1 in production environments, but want to make the move to 7.0 soon. Before doing so, however, I decided to set up a reference system and document the setup process to avoid major surprises (or my own memory glitches) as I reinstall the OS on the production systems — and hopefully have as a result minimum downtime possible.</p>
<p>Step one&#8230; FreeBSD installation using the Custom install. I post my notes below; perhaps someone will find this useful. The system is being set up as a web/db/mail server that is administered remotely; no X11 is needed or desired.</p>
<ol>
<li>Use custom install w/defaults except..<br />
Skip PCCARD: YES<br />
Media Type: CDROM</li>
<li>Set keymap if not ASCII (I use Finnish keyboard so I selected &#8220;Finnish ISO&#8221;) and timezone in post install.</li>
<li>Old mount point &amp; label info is ok (from the older installations). I use &#8220;4069M&#8221; for boot, &#8220;6100M&#8221; for swap, and rest for application data (generally a largish RAID-5 or RAID-6 array is used), the respective mount point labels are &#8220;/&#8221;, swap, and &#8220;/usr&#8221;. I use standard boot record since no other operating systems are installed on the system. Boot drive is made bootable, softupdates is enabled on the data slice.</li>
<li>Configure network, system name, keyboard map (sysinstall should&#8217;ve created delta for it) in <strong>/etc/rc.conf</strong>.  Much more should and will go into it, but the basics that will get the system online are:<br />
<code><br />
keymap="finnish.iso" #obviously optional <img src='http://my.galagzee.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
hostname="this.systemname.com"<br />
defaultrouter="192.168.1.1"<br />
ifconfig_em0="inet 192.168.1.99 netmask 255.255.255.0" #currently installing behind a firewall<br />
fsck_y_enable="yes" #this is good to set in case your system crashes during setup without orderly shutdown.. you don't have to press "yes" a million times<br />
</code><br />
Note that you may have a different kind of network interface and you might have to adjust the &#8220;ifconfig_<strong>em0</strong> accordingly.</li>
<li>Configure DNSes in <strong>/etc/resolv.conf</strong>. I use <a href="http://www.opendns.com/">OpenDNS</a> servers, like so:<br />
<code><br />
domain          this.systemname.com<br />
nameserver      208.67.222.222<br />
nameserver      208.67.220.220</code></li>
<li>If you&#8217;re basing this installation on an older install, import your old .cshrc or the equivalent alias/setting file of your favorite shell (makes the life easier as aliases work, etc).</li>
<li>If you&#8217;re not using X11, enter `WITHOUT_X11&#8242; in <strong>/etc/make.conf</strong> so you don&#8217;t have to set it in the environment every time.<br />
<code><br />
WITHOUT_X11=yes #don't compile GUI to ports apps<br />
CPUTYPE=i686 #set this for modern Intel CPUs<br />
KERNCONF=YOUR_KERNEL_CONF_FILE_NAME<br />
OPENSSLBASE=/usr/local #obviously if you use OpenSSL</code></li>
<li>Build <strong>/usr/ports/net/cvsup</strong> with WITHOUT_X11 set in make.conf (as above) or in the environment, or use <strong>/usr/ports/net/cvsup-without-gui/</strong> and update the ports tree.First create <strong>/usr/local/etc/cvsup/supfile.ports</strong> containing:<br />
<code><br />
*default host=cvsup12.FreeBSD.org<br />
*default base=/usr/local/etc/cvsup<br />
*default prefix=/usr<br />
*default release=cvs tag=.<br />
*default delete use-rel-suffix<br />
ports-all<br />
</code><br />
If you want to use the fastest cvs server available, install <strong>/usr/ports/sysutils/fastest_cvsup/</strong> and run with <em>fastest_cvsup -c us</em> (replace &#8216;us&#8217; with your local country code if you&#8217;re not in the U.S. <img src='http://my.galagzee.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ), then use the cvs server indicated as the default host. Then update ports with<br />
<strong>/usr/local/bin/cvsup -g -L 2 /usr/local/etc/cvsup/supfile.ports</strong></p>
<p>You can use an optional `-d 100&#8242; to limit file deletions to 100 initially to make sure update is working and the entire ports tree won&#8217;t be wiped out. Then remove it for full run (intial run *will* need to delete more than 100 files, but they&#8217;re not all in sequence)</li>
<li>Build &amp; install <strong>/usr/ports/editors/joe</strong> (or whatever your favorite editor might be); this makes life easier as configuration progresses.</li>
<li>Build &amp; install <strong>/usr/ports/security/openssh-portable</strong>. Use defaults + select `Enable CHROOT support&#8217; (for later use)</li>
<li>Create a non-root user for remote login. <strong>vipw</strong> is an easy way to manage users.</li>
<li>Configure OpenSSH daemon in <strong>/usr/local/etc/ssh/sshd_config</strong> &amp; make sure sshd starts (set <strong>openssh_enable=&#8221;yes&#8221;</strong> in <strong>/etc/rc.conf</strong>, and make sure the start file is called <strong>/usr/local/etc/rc.d/openssh.sh</strong>; reboot may be required to create the necessary server keys &amp; start the service (confirm with <strong>ps -waux | grep &#8220;ssh&#8221;</strong>).sshd_config params of note (for initial access) are..<br />
<code><br />
AllowUsers root MyUserName<br />
PermitRootLogin without-password #allow root login only with a RSA-key<br />
PasswordAuthentication yes<br />
UsePAM no<br />
UseDNS no<br />
</code><br />
<em><strong>** remote login should be possible at this point **</strong></em></li>
<li>Create /usr/local/etc/cvsup/supfile.sources with the below content, then update sources with <strong>/usr/local/bin/cvsup -g -L 2 /usr/local/etc/cvsup/supfile.sources</strong><br />
<code><br />
*default host=cvsup17.FreeBSD.org<br />
*default base=/usr/local/etc/cvsup<br />
*default prefix=/usr<br />
*default release=cvs tag=RELENG_7_0<br />
*default delete use-rel-suffix<br />
src-all<br />
doc-all</code></li>
<li>Review kernel configuration at <strong>/usr/src/sys/i386/conf</strong> (see my kernel defaults in the <a href="http://my.galagzee.com/index.php/2008/06/28/freebsd-70-release-kernel-optimization/" target="_self">next post</a>).</li>
<li>Build &amp; install new world if any deltas were applied in source update:<br />
<strong>cd /usr/src &amp;&amp; make buildworld</strong>.<br />
If there are problems, try the following, then run buildworld again.<br />
<code><br />
cd /usr/obj<br />
chflags -R noschg *<br />
rm -rf *<br />
</code><br />
When buildworld completes, reboot the system, select option 4, or interrupt the reboot (option 6) and type <strong>boot -s</strong> to boot into single user mode; accept /bin/sh as the shell, then continue with the following commands to install new world:<br />
<code><br />
mount -u /<br />
mount -a -t ufs<br />
swapon -a</code></p>
<p>cd /usr/src<br />
make installworld</p>
<p>exit (goes multi-user)</li>
<li>Build custom kernel &amp; install with below commands:<br />
<code><br />
cd /usr/src<br />
make cleandir<br />
make buildkernel<br />
</code>if this fails, try <strong>cd /usr/src/usr.sbin/config/ &amp;&amp; make depend all install clean</strong> and also check your kernel configuration file for problems, then start the above build process again.</li>
<li>Make a backup copy of the old kernel and install the new:<br />
<code><br />
cp -Rp /boot/kernel /boot/kernel.recent<br />
make installkernel</code></li>
<li>Reboot &amp; confirm that the latest kernel version is running with <strong>uname -a </strong> (or <strong>uname -rs</strong>).</li>
<li>Make a copy of the functional kernel if boot is ok:<strong>chflags -R noschg /boot/kernel &amp;&amp; cp -Rp /boot/kernel /boot/kernel.save &amp;&amp; chflags -R schg /boot/kernel<br />
</strong></li>
<li>Set <strong>/boot/loader.conf</strong> parameters, like so:<br />
<code><br />
kern.ipc.nmbclusters=16384   # Set the number of mbuf clusters<br />
kern.ipc.maxsockets=16384    # Set the number of tcp sockets<br />
kern.ipc.maxpipekva=67108864<br />
kern.maxusers=128</code></li>
</ol>
<p>Basic install &amp; kernel setup is now complete.</p>
]]></content:encoded>
			<wfw:commentRss>http://my.galagzee.com/2008/06/28/freebsd-70-new-install/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
