<?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>榆树网 &#187; FreeBSD</title>
	<atom:link href="http://www.wenzk.com/archives/tag/freebsd/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wenzk.com</link>
	<description>http://www.wenzk.com</description>
	<lastBuildDate>Thu, 09 Feb 2012 07:57:28 +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>ZFS Tuning Guide</title>
		<link>http://www.wenzk.com/archives/1101</link>
		<comments>http://www.wenzk.com/archives/1101#comments</comments>
		<pubDate>Fri, 26 Nov 2010 18:17:36 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Tuning]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1101</guid>
		<description><![CDATA[http://wiki.freebsd.org/ZFSTuningGuide If you need to extend them beyond 512M, you need to recompile your kernel with increased KVA_PAGES option, e.g. add the following line to your kernel configuration file to increase available space for vm.kmem_size beyond 1 GB: options KVA_PAGES=512 There is one example (CySchubert) of ZFS running nicely on a laptop with 768 Megs of [...]]]></description>
			<content:encoded><![CDATA[<p>http://wiki.freebsd.org/ZFSTuningGuide</p>
<p>If you need to extend them beyond 512M, you need to recompile your kernel with increased <a href="http://wiki.freebsd.org/KVA_PAGES">KVA_PAGES</a> option, e.g. add the following line to your kernel configuration file to increase available space for <tt>vm.kmem_size</tt> beyond 1 GB: <tt>options KVA_PAGES=512</tt><br />
<span id="more-1101"></span>There is one example (<a href="http://wiki.freebsd.org/CySchubert">CySchubert</a>) of ZFS running nicely on a laptop with 768 Megs of physical RAM with the following settings in <tt>/boot/loader.conf</tt>:</p>
<pre class="brush: plain; title: ; notranslate">
	vm.kmem_size=&quot;330M&quot;
	vm.kmem_size_max=&quot;330M&quot;
	vfs.zfs.arc_max=&quot;40M&quot;
	vfs.zfs.vdev.cache.size=&quot;5M&quot;
</pre>
<p>Kernel memory should be monitored while tuning to ensure a comfortable amount of free kernel address space. The following script will summarize kernel memory utilization and assist in tuning arc_max and VDEV cache size.</p>
<pre class="brush: plain; title: ; notranslate">#!/bin/sh -

TEXT=`kldstat | awk 'BEGIN {print &quot;16i 0&quot;;} NR&amp;gt;1 {print toupper($4) &quot;+&quot;} END {print &quot;p&quot;}' | dc`
DATA=`vmstat -m | sed -Ee '1s/.*/0/;s/.* ([0-9]+)K.*/\1+/;$s/$/1024*p/' | dc`
TOTAL=$((DATA + TEXT))

echo TEXT=$TEXT, `echo $TEXT | awk '{print $1/1048576 &quot; MB&quot;}'`
echo DATA=$DATA, `echo $DATA | awk '{print $1/1048576 &quot; MB&quot;}'`
echo TOTAL=$TOTAL, `echo $TOTAL | awk '{print $1/1048576 &quot; MB&quot;}'`</pre>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1096" title="Re: Freebsd 8.0 kmem map too small">Re: Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/1092" title="Freebsd 8.0 kmem map too small">Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/796" title="The Z File System(ZFS)-ZFS on FreeBSD">The Z File System(ZFS)-ZFS on FreeBSD</a> (0)</li><li><a href="http://www.wenzk.com/archives/819" title="使用freebsd构建pppoe server服务器">使用freebsd构建pppoe server服务器</a> (0)</li><li><a href="http://www.wenzk.com/archives/817" title="基于freebsd建立内核模式的pppoe服务器">基于freebsd建立内核模式的pppoe服务器</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1101/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Re: Freebsd 8.0 kmem map too small</title>
		<link>http://www.wenzk.com/archives/1096</link>
		<comments>http://www.wenzk.com/archives/1096#comments</comments>
		<pubDate>Fri, 26 Nov 2010 17:45:15 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[Crash]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1096</guid>
		<description><![CDATA[Florian Smeets Fri, 11 Jun 2010 07:14:23 -0700 On 6/8/10 11:11 AM, Yoshiaki Kasahara wrote: &#62; Hello, &#62; &#62; I'd like to add another instance of similar problems. I recently &#62; updated my FreeBSD amd64 box with ZFS root and 8GB RAM from 8-STABLE &#62; (as of Mar 1st) to 8.1-PRERELEASE (as of May 27th). [...]]]></description>
			<content:encoded><![CDATA[<p>Florian Smeets<br />
Fri, 11 Jun 2010 07:14:23 -0700</p>
<pre>On 6/8/10 11:11 AM, Yoshiaki Kasahara wrote:
&gt; Hello,
&gt;
&gt; I'd like to add another instance of similar problems.  I recently
&gt; updated my FreeBSD amd64 box with ZFS root and 8GB RAM from 8-STABLE
&gt; (as of Mar 1st) to 8.1-PRERELEASE (as of May 27th).  After that, my
&gt; box started to crash every couple of days due to kmem_map too small.
&gt;
<span id="more-1096"></span>&gt; Here is a (last week) screenshot of Munin graph about the memory usage
&gt; of the box:
&gt;
&gt; <a rel="nofollow" href="http://www.wenzk.com/wp-content/uploads/2010/11/a12f_munin-memory.png" class="highslide-image" onclick="return hs.expand(this);">http://www.wenzk.com/wp-content/uploads/2010/11/a12f_munin-memory.png</a>
&gt;
&gt; In "by month" graph, a white gap at the end of "Week 20" is the update
&gt; period from 8-STABLE to 8.1-PRERELEASE I mentioned above.  Before the
&gt; upgrade, the system was rock solid without any kmem tuning in
&gt; loader.conf (vm.kmem_size was around 2.7GB IIRC).
&gt;
&gt; After the update, I could see that more wired memory was assigned, and
&gt; then steep drop (crash) occured.
&gt;
&gt; "by day" graph shows my experiment to bump vm.kmem_size=12G
&gt; (recommended somewhere in this thread) and explicitly limit
&gt; vfs.zfs.arc_max=2G.  I was surprised because the wired memory quickly
&gt; increased over 5GB...
&gt;
&gt; Then I noticed that the default value of vfs.zfs.zio.use_uma was 1 on
&gt; amd64, so I turned it off and removed other memory tunings (kmem_size
&gt; and arc_max) in loader.conf on Tuesday at 16:00 and rebooted.  It
&gt; seems that the usage of wired memory was stablized and no crash since
&gt; then with the default kmem_size and arc_max.
&gt;
&gt; Does anyone have any idea about this behavior?
&gt;
&gt; My wild guess is that ZFS/UMA code is not stable on amd64 too, and it
&gt; should be turned off by default for 8.1-RELEASE maybe....
&gt; 

I can confirm this. I just upgraded a system from late January to
yesterdays 8-STABLE. I had to set vfs.zfs.zio.use_uma="0", to get the
system survive buildworld again.

This is amd64 with only 1GB, (i know this is considered not enough for
ZFS) with the kernel from January it was stable without any tuning.
After disabling ZFSs UMA usage, it seems to be working fine again.

Just another data point.

Cheers,
Florian

From: http://www.mail-archive.com/freebsd-stable@freebsd.org/msg110689.html</pre>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1101" title="ZFS Tuning Guide">ZFS Tuning Guide</a> (0)</li><li><a href="http://www.wenzk.com/archives/1092" title="Freebsd 8.0 kmem map too small">Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/796" title="The Z File System(ZFS)-ZFS on FreeBSD">The Z File System(ZFS)-ZFS on FreeBSD</a> (0)</li><li><a href="http://www.wenzk.com/archives/819" title="使用freebsd构建pppoe server服务器">使用freebsd构建pppoe server服务器</a> (0)</li><li><a href="http://www.wenzk.com/archives/817" title="基于freebsd建立内核模式的pppoe服务器">基于freebsd建立内核模式的pppoe服务器</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1096/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freebsd 8.0 kmem map too small</title>
		<link>http://www.wenzk.com/archives/1092</link>
		<comments>http://www.wenzk.com/archives/1092#comments</comments>
		<pubDate>Fri, 26 Nov 2010 17:37:32 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1092</guid>
		<description><![CDATA[On a system here with 8GB of RAM and a very large zpool consisting of multiple zdevs, little tuning was needed. The system is running 8-STABLE(amd64) as of a month or two ago. The only things I have set in /boot/loader.conf are: vm.kmem_size="12G" vfs.zfs.arc_max="4G" Setting kmem_size to 12G came from a combination of recommendations I [...]]]></description>
			<content:encoded><![CDATA[<p><tt>On a system here with 8GB of RAM and a very large zpool consisting of </tt><tt>multiple zdevs, little tuning was needed.  The system is running </tt><tt>8-STABLE(amd64) as of a month or two ago.  The only things I have set in </tt><tt>/boot/loader.conf are: </tt></p>
<pre>vm.kmem_size="12G"
vfs.zfs.arc_max="4G"
<span id="more-1092"></span><tt>Setting kmem_size to 12G came from a combination of recommendations I </tt><tt>saw in various mailing list posts (you can probably dig them up). </tt><tt>Setting it to the physical memory size was the initial recommendation, </tt><tt>while others recommended 1.5x physical memory size to help prevent </tt><tt>fragmentation/wasted space in kmem. </tt><tt>Regardless, this has served us quite well for the ~6 months the system </tt><tt>has been in use.  It has never crashed, even under intensive </tt><tt>multi-threaded benchmarking. </tt>
-Steve
From: http://www.mail-archive.com/freebsd-stable@freebsd.org/msg110092.html
监视中....</pre>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1101" title="ZFS Tuning Guide">ZFS Tuning Guide</a> (0)</li><li><a href="http://www.wenzk.com/archives/1096" title="Re: Freebsd 8.0 kmem map too small">Re: Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/796" title="The Z File System(ZFS)-ZFS on FreeBSD">The Z File System(ZFS)-ZFS on FreeBSD</a> (0)</li><li><a href="http://www.wenzk.com/archives/819" title="使用freebsd构建pppoe server服务器">使用freebsd构建pppoe server服务器</a> (0)</li><li><a href="http://www.wenzk.com/archives/817" title="基于freebsd建立内核模式的pppoe服务器">基于freebsd建立内核模式的pppoe服务器</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1092/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用freebsd构建pppoe server服务器</title>
		<link>http://www.wenzk.com/archives/819</link>
		<comments>http://www.wenzk.com/archives/819#comments</comments>
		<pubDate>Fri, 23 Apr 2010 11:57:04 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PPPoE]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=819</guid>
		<description><![CDATA[相对于在linux下做pppoe server服务器，在freebsd下要简单得多。 一、安装freebsd,安装内核的源码或者用cvsup同步最新的内核源码。 二、重新编译内核。 1. 在内核配置文件中添加以下选项，然后重新编译和安装内核: options NETGRAPH options NETGRAPH_PPPOE options NETGRAPH_SOCKET 2. 编辑 /etc/rc.conf, 添加: pppoed_enable=”YES” pppoed_flags=”-d -P /var/run/pppoed.pid -a “server” -l “default” ” pppoed_interface=”fxp1&#8243; 3. 编辑/etc/ppp/ppp.conf default: set log Chat Command Phase             #turn on some logging. See man ppp.conf enable pap                                          #turn on chap and pap accounting enable chap allow mode direct                      #turn on [...]]]></description>
			<content:encoded><![CDATA[<p>相对于在linux下做pppoe server服务器，在freebsd下要简单得多。</p>
<p>一、安装freebsd,安装内核的源码或者用cvsup同步最新的内核源码。</p>
<p>二、重新编译内核。</p>
<p><span id="more-819"></span>1. 在内核配置文件中添加以下选项，然后重新编译和安装内核:</p>
<p>options NETGRAPH<br />
options NETGRAPH_PPPOE<br />
options NETGRAPH_SOCKET</p>
<p>2. 编辑 /etc/rc.conf, 添加:<br />
pppoed_enable=”YES”<br />
pppoed_flags=”-d -P /var/run/pppoed.pid -a “server” -l “default” ”<br />
pppoed_interface=”fxp1&#8243;</p>
<p>3. 编辑/etc/ppp/ppp.conf<br />
default:<br />
set log Chat Command Phase             #turn on some logging. See man ppp.conf<br />
enable pap                                          #turn on chap and pap accounting<br />
enable chap<br />
allow mode direct                      #turn on ppp bridging<br />
enable proxy                           #turn on ppp proxyarping (redundant of a<br />
disable ipv6cp                         #we don&#8217;t use ipv6, don&#8217;t want the errors<br />
set mru 1492                           #set mru below 1500 (PPPoE MTU issue)<br />
set mtu 1492                           #set mtu below 1500 (PPPoE MTU issue)<br />
set ifaddr 10.0.0.1 10.0.1.1-10.0.5.254<br />
set speed sync<br />
set timeout 0<br />
enable lqr<br />
accept dns</p>
<p>4. 编辑 /etc/ppp/ppp.secret 设置好用户名和口令<br />
username password</p>
<p>最后重新启动.</p>
<p><strong>Hint:</strong><br />
You could configure ipfw firewall to deny any to any and then make a script (easy) for every ppp connection to add a rule in firewall to allow ip for that connection.</p>
<p><strong>Valuable Advices:</strong><br />
- If you use different versions of windows boxes (not only xp) let enable pap and chap too<br />
- If you want a user to be connected only once (so users cannot give username and passowords to others to use the same account) you must setup a radius server<br />
(freeradius or radius-cistron, from ports collection).<br />
- If you have problems login in from windows box than<strong>set speed sync</strong>from /etc/ppp/ppp.conf might help you<br />
- pppoed daemon consumes some cpu so a faster cpu is better, also for many users is better to have more ram (512 or 1024 MB)<br />
- If you have problems stop your pppoed process (<strong>/etc/rc.d/pppoed stop</strong>) then launch pppoed with<strong>-Fd</strong>option instead -d, from command line to have pppoed in foreground to see errors.<br />
- On a lan with many users I had a problem, i guess some of the clients had a misconfigured pppoed server so it keeps asking for connection to pppoed server, flooding, forking the pppoed daemon continously. It is a patch that might solve this problem, I&#8217;ve read about it here: http://lists.freebsd.org/pipermail/freebsd-hackers/2005-February/010136.html , but could not find that patch.</p>
<p>From:<a href="http://www.routerclub.com/viewnews-303.html">http://www.routerclub.com/viewnews-303.html</a></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1481" title="Linux PPPoE拨号频繁掉线问题">Linux PPPoE拨号频繁掉线问题</a> (0)</li><li><a href="http://www.wenzk.com/archives/935" title="单网卡多次PPPoE拨号问题">单网卡多次PPPoE拨号问题</a> (0)</li><li><a href="http://www.wenzk.com/archives/817" title="基于freebsd建立内核模式的pppoe服务器">基于freebsd建立内核模式的pppoe服务器</a> (0)</li><li><a href="http://www.wenzk.com/archives/1516" title="新安装Cacti遇到的几个问题">新安装Cacti遇到的几个问题</a> (0)</li><li><a href="http://www.wenzk.com/archives/1469" title="Linux下如何使用tar进行整系统备份["Ghost"]">Linux下如何使用tar进行整系统备份["Ghost"]</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/819/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>基于freebsd建立内核模式的pppoe服务器</title>
		<link>http://www.wenzk.com/archives/817</link>
		<comments>http://www.wenzk.com/archives/817#comments</comments>
		<pubDate>Fri, 23 Apr 2010 11:51:17 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[PPPoE]]></category>
		<category><![CDATA[内核]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=817</guid>
		<description><![CDATA[http://www.routerclub.com/viewnews_303.html 讲述了制作pppoeserver的方法，但是它有一个性能上的缺点，因为它是工作在用户模式中，所以在流量和多用户的情况下，会不能胜任。 这里有一篇文章作了详细的比较： http://www.jraitala.net/comp/articles/2002/pppoe/ 现在我来介绍怎样在freebsd下建立内核模式的pppoe服务器的方法。 在freebsd中，ports里带的软件配合netgraph可以实现kernel pppoe， 这个软件名字叫mpd (/usr/ports/net/mpd）。 mpd目前的版本是3.18，Ports里的说明文件是这样描述它的：”Mpd is a netgraph(4) based implementation of the multi-link PPP protocol for FreeBSD. It is designed to be both fast and flexible.It handles configuration and negotiation in user land, while routing. all data packets strictly in the kernel. It supports several of the numerous PPP sub-protocols [...]]]></description>
			<content:encoded><![CDATA[<p>http://www.routerclub.com/viewnews_303.html</p>
<p>讲述了制作pppoeserver的方法，但是它有一个性能上的缺点，因为它是工作在用户模式中，所以在流量和多用户的情况下，会不能胜任。<br />
这里有一篇文章作了详细的比较：<br />
<span id="more-817"></span>http://www.jraitala.net/comp/articles/2002/pppoe/<br />
现在我来介绍怎样在freebsd下建立内核模式的pppoe服务器的方法。<br />
在freebsd中，ports里带的软件配合netgraph可以实现kernel pppoe， 这个软件名字叫mpd (/usr/ports/net/mpd）。</p>
<p>mpd目前的版本是3.18，Ports里的说明文件是这样描述它的：”Mpd is a netgraph(4) based implementation of the multi-link PPP protocol for FreeBSD. It is designed to be both fast and flexible.It handles configuration and negotiation in user land, while routing. all data packets strictly in the kernel. It supports several of the numerous PPP sub-protocols and extensions。</p>
<p>哦，对了。mpd的手册在这里，http://pink.the-7.net/~ab/mpd/mpd.html。有时间慢慢研究一下吧。</p>
<p>下面再提供一些配置mpd的例子(要配置三个文件），更多的例子可以在/usr/local/etc/mpd下找到。不过不要全部照抄哦。：－）</p>
<p>mpd.conf</p>
<p>PPPoE:<br />
new -i ng0 PPPoE PPPoE<br />
set iface addrs 1.1.1.1 2.2.2.2<br />
set iface route default<br />
set iface disable on-demand<br />
set iface idle 0<br />
set bundle disable multilink<br />
set bundle authname username<br />
set link no acfcomp protocomp<br />
set link disable pap chap<br />
set link accept chap<br />
set link mtu 1492<br />
set link mru 1492<br />
set ipcp yes vjcomp<br />
set ipcp ranges 0.0.0.0/0 0.0.0.0/0<br />
open iface</p>
<p>mpd.links<br />
PPPoE:<br />
set link type pppoe<br />
set pppoe iface rl0<br />
set pppoe service “adsl”</p>
<p>mpd.secret</p>
<p>username “password”</p>
<p>配置完了以后用mpd -b启动mpd。更多的启动选项请敲mpd -h查看。<br />
下页的链接是mpd 的补丁，地址是：</p>
<p>http://www.foggy.ru/soft/mpd/</p>
<p>This is README file for patch:<br />
This is patched version of mpd 3.18. Main goal of this patch &#8211; full-featured PPPoE server.</p>
<p>Example of config files is in conf/mpd.conf.mz.sample and conf/mpd.links.mz.sample</p>
<p>Changes from original version:<br />
Kernel-level filters (see file README.filters for details). This feature needs ng_bpfinet kernel module (ng_bpf from FreeBSD 5.5 with permanent storage registers).<br />
Automatic bundle create/destroy (not fully tested yet).<br />
Improved logging. It is possible now to have unique session identifier in all log lines with format “pid:6-digit-unique-number:”. It is very useful for search all info about session in log file via grep.<br />
Added “show users” commands (for view active users stats).<br />
Added “show summary” command (for misc instance info view).<br />
Added “set instance comment” command for set up misc comment. Comment is shown on “show summary” command output.<br />
Added ability to send RADIUS accounting info in kilobytes (instead of bytes).<br />
Added ability to reverse incoming and outgoing traffic in RADIUS accounting.<br />
Added support of non-counted IP addresses list.<br />
Added traffic limits support (values from RADIUS server). This feature needs ng_bpfinet kernel module.<br />
Added shaper (bandwidth limit) support (using external script).<br />
Added ability to set PPPoE AC name.<br />
Added ability to start/stop accepting all incoming connections requests or connections from one system interface only (tested only for PPPoE now).<br />
Added ability to use simplified CHAP challenge on connection between mpd and RADIUS.<br />
Added internal IP pools support.<br />
Added debug and accounting logging options.<br />
Added automatic search for free IP address in avaliable IP pools (it allows use one IP pool in more then one mpd instance on the same system).<br />
Added some statistics about mpd instance.<br />
Added all nodes naming with instance-specifix prefix.<br />
Added “terminate instance now” console command for quick stop mpd. “quit” command behavior now similar to “exit”.<br />
Added “terminate instance quick” command. It is stop accept incoming connection, politely close all user sessions and terminate daemon after it.<br />
Added “terminate instance gracefull” command. It is stop accept incoming connection, wait until all users will disconnect and terminate after it.<br />
Added “stop sessions” command. It is stop all current logged user sessions.<br />
NAS-Port now equal to number of ng interface + NAS port offset. This offset can be specified in mpd.conf with “set instance nas-port-offset”.<br />
Default log facility changed to local5 (instead of daemon).<br />
Netgraph MRU and MTU increased up to 1680 (???do we really need it???).<br />
Patch for destroy corresponding netgraph nodes on mpd crash included.<br />
Patch for “Drop-User” RADIUS attribute included (not tested).<br />
exppp “traffic limit” RADIUS vendor-specific attribute support.<br />
Bundle destroy (automatic and manual via “terminate bundle”).<br />
Naming PPPoE nodes at their creation.<br />
Renaming PPPoE nodes, if they already exists.<br />
Telnet auth using login/password (instead of password-only). For successfull auth login must exist in mpd.secret and has IP in 127.0.0.0/8 net.<br />
Some often used cycles PPPoE code speedup.<br />
Optional support of ng_tcpmss.<br />
“Accepting PPPoE connection from” line now contains source interface name.<br />
64-bit BPF program counters.<br />
FD_SETSIZE precompiled value increased to 65536. This will allow much more bundles and connections.<br />
“show pppoe interface” command.<br />
Added “set instance console” command for set ip and port for mpd console in config file. Do not do anything after starting mpd.<br />
Control socket for controlling mpd via pppctl command. Can be specified in command line, or in mpd.conf via “set instance fsocket”.<br />
This patch now can be added to files/ dir in net/mpd port and correctly compiled.</p>
<p>From: <a href="http://www.routerclub.com/viewnews-305.html">http://www.routerclub.com/viewnews-305.html</a></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/819" title="使用freebsd构建pppoe server服务器">使用freebsd构建pppoe server服务器</a> (0)</li><li><a href="http://www.wenzk.com/archives/1481" title="Linux PPPoE拨号频繁掉线问题">Linux PPPoE拨号频繁掉线问题</a> (0)</li><li><a href="http://www.wenzk.com/archives/1101" title="ZFS Tuning Guide">ZFS Tuning Guide</a> (0)</li><li><a href="http://www.wenzk.com/archives/1096" title="Re: Freebsd 8.0 kmem map too small">Re: Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/1092" title="Freebsd 8.0 kmem map too small">Freebsd 8.0 kmem map too small</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/817/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Z File System(ZFS)-ZFS on FreeBSD</title>
		<link>http://www.wenzk.com/archives/796</link>
		<comments>http://www.wenzk.com/archives/796#comments</comments>
		<pubDate>Fri, 02 Apr 2010 17:40:05 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Sun]]></category>
		<category><![CDATA[ZFS]]></category>
		<category><![CDATA[文件系统]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=796</guid>
		<description><![CDATA[听说ZFS挺强悍的，由于对Sun的系统有恐惧症，并且FreeBSD 8.0上的ZFS文件系统不再是试验性的特性了，所以应该比较完善的具备ZFS的各项功能。http://www.freebsd.org/doc/handbook/filesystems-zfs.html是FreeBSD Handbook里面关于ZFS的章节，留着备用 相关文章ZFS Tuning Guide (0)Re: Freebsd 8.0 kmem map too small (0)Freebsd 8.0 kmem map too small (0)vi temporary work file location (0)使用freebsd构建pppoe server服务器 (0)]]></description>
			<content:encoded><![CDATA[<p>听说ZFS挺强悍的，由于对Sun的系统有恐惧症，并且FreeBSD 8.0上的ZFS文件系统不再是试验性的特性了，所以应该比较完善的具备ZFS的各项功能。<span id="more-796"></span><a href="http://www.freebsd.org/doc/handbook/filesystems-zfs.html" target="_blank">http://www.freebsd.org/doc/handbook/filesystems-zfs.html</a>是FreeBSD Handbook里面关于ZFS的章节，留着备用</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1101" title="ZFS Tuning Guide">ZFS Tuning Guide</a> (0)</li><li><a href="http://www.wenzk.com/archives/1096" title="Re: Freebsd 8.0 kmem map too small">Re: Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/1092" title="Freebsd 8.0 kmem map too small">Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/1050" title="vi temporary work file location">vi temporary work file location</a> (0)</li><li><a href="http://www.wenzk.com/archives/819" title="使用freebsd构建pppoe server服务器">使用freebsd构建pppoe server服务器</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/796/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD 6.2在线升级至8.0-RELEASE</title>
		<link>http://www.wenzk.com/archives/792</link>
		<comments>http://www.wenzk.com/archives/792#comments</comments>
		<pubDate>Fri, 02 Apr 2010 17:00:19 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Panabit]]></category>
		<category><![CDATA[升级]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=792</guid>
		<description><![CDATA[由于Panabit不再开发基于Freebsd 6.2的软件包，所以必须升级操作系统，以前也没有试过跨大版本升级（6.x直接升级到8.x，以前完成过一次7.2升级到8.0），于是翻出7.0-RELEASE的Release-Notes，根据升级说明进行操作（根据如下操作，完成FreeBSD6.2-8.0的升级工作，注意原文是-r 7.0-RELEASE这里已经改成-r 8.0-RELEASE，由于机器没有安装任何Port包，所以portupgrade -faP也省略了）： http://www.freebsd.org/releases/7.0R/announce.html FreeBSD Update Starting with FreeBSD 6.3, the freebsd-update(8) utility supports binary upgrades of i386 and amd64 systems systems running earlier FreeBSD releases, release candidates, and betas. Users upgrading to FreeBSD 7.0 from older releases (in particular, older than 7.0-RC1) will need to download an updated version of freebsd-update(8) that [...]]]></description>
			<content:encoded><![CDATA[<p>由于Panabit不再开发基于Freebsd 6.2的软件包，所以必须升级操作系统，以前也没有试过跨大版本升级（6.x直接升级到8.x，以前完成过一次7.2升级到8.0），于是翻出7.0-RELEASE的Release-Notes，根据升级说明进行操作（根据如下操作，完成FreeBSD6.2-8.0的升级工作，注意原文是<span style="color: #ff0000;">-r 7.0-RELEASE</span><tt>这里已经改成</tt><span style="color: #ff0000;">-r 8.0-RELEASE</span>，由于机器没有安装任何Port包，所以<tt>portupgrade -faP也省略</tt>了）：</p>
<p><span id="more-792"></span><a href="http://www.freebsd.org/releases/7.0R/announce.html" target="_blank">http://www.freebsd.org/releases/7.0R/announce.html</a></p>
<h3>FreeBSD Update</h3>
<p>Starting with FreeBSD 6.3, the freebsd-update(8) utility supports  binary upgrades of i386 and amd64 systems systems running earlier FreeBSD releases, release  candidates, and betas. Users upgrading to FreeBSD 7.0 from older releases (in  particular, older than 7.0-RC1) will need to download an updated version of freebsd-update(8)  that supports upgrading to a new release.</p>
<p><tt># fetch  http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz</tt></p>
<p>Downloading and verifying the digital signature for the tarball (signed  by the FreeBSD Security Officer&#8217;s PGP key) is highly recommended.</p>
<p><tt># fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz.asc</tt></p>
<p><tt># gpg --verify freebsd-update-upgrade.tgz.asc  freebsd-update-upgrade.tgz</tt></p>
<p>The new freebsd-update(8) can then be extracted and run as follows:</p>
<p><tt># tar -xf freebsd-update-upgrade.tgz</tt></p>
<p><tt># sh freebsd-update.sh -f freebsd-update.conf -r </tt><span style="color: #ff0000;">8.0-RELEASE</span><tt> upgrade</tt></p>
<p><tt># sh freebsd-update.sh -f freebsd-update.conf install</tt></p>
<p>The system must be rebooted with the newly installed kernel before  continuing.</p>
<p><tt># shutdown -r now</tt></p>
<p>Next, freebsd-update.sh needs to be run again to install the new  userland components, after which all ports should be recompiled to link to new libraries:</p>
<p><tt># sh freebsd-update.sh -f freebsd-update.conf install</tt></p>
<p><tt># portupgrade -faP</tt></p>
<p>Finally, freebsd-update.sh needs to be run one last time to remove  old system libraries, after which the system should be rebooted in order that the  updated userland and ports will be running:</p>
<p><tt># sh freebsd-update.sh -f freebsd-update.conf install</tt></p>
<p><tt># shutdown -r now</tt></p>
<p>For more information, see:</p>
<p><tt><a href="http://www.daemonology.net/blog/2007-11-11-freebsd-major-version-upgrade.html">http://www.daemonology.net/blog/2007-11-11-freebsd-major-version-upgrade.html</a></tt></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/553" title="FreeBSD Ports变化带来的一点小麻烦">FreeBSD Ports变化带来的一点小麻烦</a> (0)</li><li><a href="http://www.wenzk.com/archives/433" title="FreeBSD portupgrade升级你的FreeBSD软件">FreeBSD portupgrade升级你的FreeBSD软件</a> (0)</li><li><a href="http://www.wenzk.com/archives/431" title="FreeBSD下软件的portupgrade升级方法">FreeBSD下软件的portupgrade升级方法</a> (0)</li><li><a href="http://www.wenzk.com/archives/1242" title="Discuz X2又有漏洞了">Discuz X2又有漏洞了</a> (0)</li><li><a href="http://www.wenzk.com/archives/1119" title="如何快速将CentOS5 PHP版本升级至5.2">如何快速将CentOS5 PHP版本升级至5.2</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/792/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD下运行Zabbix出现错误</title>
		<link>http://www.wenzk.com/archives/586</link>
		<comments>http://www.wenzk.com/archives/586#comments</comments>
		<pubDate>Fri, 29 Jan 2010 08:19:15 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[zabbix]]></category>
		<category><![CDATA[共享内存]]></category>
		<category><![CDATA[监控]]></category>
		<category><![CDATA[网管]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=586</guid>
		<description><![CDATA[这次提示： zabbix_agentd [12234]: Can not create Semaphore [No space left on device] zabbix_agentd [12234]: Unable to create mutex for log file 这次又是另外一个错误，根据上次的经验，通过修改sysctl.conf试试 居然好用了 相关文章Zabbix在FreeBSD启动错误 (0)Weathermap如何使用Zabbix作为数据源 (0)ZFS Tuning Guide (0)Re: Freebsd 8.0 kmem map too small (0)Freebsd 8.0 kmem map too small (0)]]></description>
			<content:encoded><![CDATA[<p>这次提示：</p>
<p>zabbix_agentd [12234]: Can not create Semaphore [No space left on  device]<br />
zabbix_agentd [12234]: Unable to create mutex for log file</p>
<p>这次又是另外一个错误，根据上次的经验，通过修改sysctl.conf试试</p>
<pre class="brush: plain; title: ; notranslate">kern.ipc.shmall=40960000
kern.ipc.shmmax=204800000</pre>
<p>居然好用了</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/494" title="Zabbix在FreeBSD启动错误">Zabbix在FreeBSD启动错误</a> (0)</li><li><a href="http://www.wenzk.com/archives/1499" title="Weathermap如何使用Zabbix作为数据源">Weathermap如何使用Zabbix作为数据源</a> (0)</li><li><a href="http://www.wenzk.com/archives/1101" title="ZFS Tuning Guide">ZFS Tuning Guide</a> (0)</li><li><a href="http://www.wenzk.com/archives/1096" title="Re: Freebsd 8.0 kmem map too small">Re: Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/1092" title="Freebsd 8.0 kmem map too small">Freebsd 8.0 kmem map too small</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/586/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD Ports变化带来的一点小麻烦</title>
		<link>http://www.wenzk.com/archives/553</link>
		<comments>http://www.wenzk.com/archives/553#comments</comments>
		<pubDate>Thu, 21 Jan 2010 15:07:30 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Port]]></category>
		<category><![CDATA[升级]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=553</guid>
		<description><![CDATA[平常使用Linux比较多，为熟悉和了解FreeBSD，在虚拟机下安装了一个FreeBSD，为了了解FreeBSD的升级功能，特意安装7.2版本，通过网络升级，升级到8.0版本。 因为是测试的，所以port里面的软件都是安装最新的，自然MySQL就是用6.0了。但是最近通过csup更新ports tree之后发现部分软件无法升级，提示找不到mysql60-client。 经过核对，在ports里面的databases里面果真mysql60-client和mysql60-server果真不存在了，google之后发现： 没办法，只能换回5.5啦，为了删除MySQL6.0，被迫一起删除相依赖的一些软件，如php5-mysqli扩展。 经过漫长的编译后，终于轮到重新安装php扩展了，但是却发现这样的提示： 没办法，只能继续Google，原来解决办法是这样的： From: http://www.freebsdchina.org/forum/viewtopic.php?p=245925&#38;sid=0b6d25bb6d25f99101276165fc707e4d 看来用哪个系统都会遇到一些苦恼的事情啊 相关文章FreeBSD 6.2在线升级至8.0-RELEASE (0)FreeBSD portupgrade升级你的FreeBSD软件 (0)FreeBSD下软件的portupgrade升级方法 (0)Zimbra管理员总是能收到MySQL检查出错的邮件 (0)Discuz X2又有漏洞了 (0)]]></description>
			<content:encoded><![CDATA[<p>平常使用Linux比较多，为熟悉和了解FreeBSD，在虚拟机下安装了一个FreeBSD，为了了解FreeBSD的升级功能，特意安装7.2版本，通过网络升级，升级到8.0版本。</p>
<p><span id="more-553"></span>因为是测试的，所以port里面的软件都是安装最新的，自然MySQL就是用6.0了。但是最近通过csup更新ports tree之后发现部分软件无法升级，提示找不到mysql60-client。</p>
<p>经过核对，在ports里面的databases里面果真mysql60-client和mysql60-server果真不存在了，google之后发现：</p>
<pre class="brush: plain; title: ; notranslate">DEPRECATED: The MySQL 6.0  development branch is deprecated and will be removed soon.  Please  consider using MySQL 5.5 instead.

http://www.freshports.org/databases/mysql60-client/</pre>
<p>没办法，只能换回5.5啦，为了删除MySQL6.0，被迫一起删除相依赖的一些软件，如php5-mysqli扩展。</p>
<p>经过漫长的编译后，终于轮到重新安装php扩展了，但是却发现这样的提示：</p>
<pre class="brush: plain; title: ; notranslate">/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:  In function 'zm_startup_mysqli':
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:637:  error: 'MYSQL_RPL_MASTER' undeclared (first use in this function)
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:637:  error: (Each undeclared identifier is reported only once
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:637:  error: for each function it appears in.)
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:638:  error: 'MYSQL_RPL_SLAVE' undeclared (first use in this function)
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:639:  error: 'MYSQL_RPL_ADMIN' undeclared (first use in this function)</pre>
<p>没办法，只能继续Google，原来解决办法是这样的：</p>
<pre class="brush: bash; title: ; notranslate">cd /usr/local/include/mysql
 toor@com[/usr/local/include/mysql]  ee mysql.h</pre>
<pre class="brush: cpp; title: ; notranslate"> ... ...
enum mysql_protocol_type
 {
 MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
 MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
 };
 /*
 There are three types of queries - the ones  that have to go to
 the master, the ones that go to a slave, and the adminstrative
 type which must happen on the pivot connectioin
 */
 enum mysql_rpl_type
 {
 MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
 };

 typedef struct character_set
 {
 unsigned int      number;     /* character set number              */
 unsigned int      state;      /* character set state               */
 const char        *csname;    /* collation name                    */
 const char        *name;      /* character set name                */
 ... ...</pre>
<p>From: http://www.freebsdchina.org/forum/viewtopic.php?p=245925&amp;sid=0b6d25bb6d25f99101276165fc707e4d</p>
<p>看来用哪个系统都会遇到一些苦恼的事情啊</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/792" title="FreeBSD 6.2在线升级至8.0-RELEASE">FreeBSD 6.2在线升级至8.0-RELEASE</a> (0)</li><li><a href="http://www.wenzk.com/archives/433" title="FreeBSD portupgrade升级你的FreeBSD软件">FreeBSD portupgrade升级你的FreeBSD软件</a> (0)</li><li><a href="http://www.wenzk.com/archives/431" title="FreeBSD下软件的portupgrade升级方法">FreeBSD下软件的portupgrade升级方法</a> (0)</li><li><a href="http://www.wenzk.com/archives/1447" title="Zimbra管理员总是能收到MySQL检查出错的邮件">Zimbra管理员总是能收到MySQL检查出错的邮件</a> (0)</li><li><a href="http://www.wenzk.com/archives/1242" title="Discuz X2又有漏洞了">Discuz X2又有漏洞了</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/553/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>浅谈FreeBSD与OpenBSD</title>
		<link>http://www.wenzk.com/archives/527</link>
		<comments>http://www.wenzk.com/archives/527#comments</comments>
		<pubDate>Mon, 04 Jan 2010 05:52:31 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[优点]]></category>
		<category><![CDATA[比较]]></category>
		<category><![CDATA[缺点]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=527</guid>
		<description><![CDATA[最近对FreeBSD的升级和安装进行了一些了解，同时也试着在OpenBSD找寻相同的方法，于是就有这篇文章啦；本文不注重详细比较FreeBSD和OpenBSD的区别，只是记录一下我所涉及的一些功能。 1、安装 FreeBSD在安装方面较OpenBSD强不少，FreeBSD大部分安装界面都是“图形”的，一般说来只需 空格 回车 + 光标 就可以搞定所有的操作;而OpenBSD就不一样了，在很多情况下都是通过键盘输入来选择相应的选项，在磁盘分区的时候更不智能。 2、升级 FreeBSD: FreeBSD在升级方面相对比较全面，对于系统本身，可以使用freebsd-update（似乎6.x以上的版本才有）进行升级，如果官方release补丁，可以通过freebsd-update直接将系统更新最新补丁。同时FreeBSD可以通过freebsd-update进行跨版本升级，例如将系统从7.x升级到8.0-RELEASE，FreeBSD在Release一个版本的时候，会提供相应的升级方法，很方便的。 对于Port的升级，可以通过csup或者是cvsup对ports进行升级，更新ports树之后，运行portupgrade -a对系统已安装的软件进行升级，这个挺方便的，并且ports里面的软件更新频率非常高。 对于爱偷懒的人，比如我，有的时候很烦去编译安装软件，希望直接安装二进制文件。此时pkg_add也提供了相应的功能，只要你知道软件包的名称，可以通过pkg_add -r &#60;软件名&#62;进行安装，如：pkg_add -r screen，程序自动从FreeBSD官方的Mirror站点下载已经编译好的二进制文件。 OpenBSD： 相对FreeBSD而言，OpenBSD在升级方面就逊色了不少，首先系统没有类似freebsd-update的升级工具（至少目前我没有发现，在网上也暂时没有找到相关的文档），在大版本Release的时候，官方也提供相应的升级方法，但是感觉升级方法不如FreeBSD灵活，OpenBSD只是下载安装盘上的那几个.tgz文件，手工解压，做一定的操作之后即可，具体可以参考：http://www.openbsd.org/faq/upgrade46.html，感觉没有FreeBSD方便。 对于Ports升级，系统也没有自带用类似FreeBSD发行版里面的csup程序，需要通过ports安装cvsup来搞定，安装完毕之后需要上官方：http://www.openbsd.org/cvsup.html 自己编写一个cvsup的配置文件，然后对Ports树进行升级，Ports里面的软件包和更新速度较FreeBSD而言也逊色了很多。 OpenBSD Ports里面的软件包也可以安装已经编译好的二进制，参考：http://www.openbsd.org/faq/faq15.html 可以了解到，只需设置一个PKG_PATH变量后，即可通过pkg_add -r screen进行安装，也是蛮方便的，但是软件比较少。如果软件有更新，如何更新（暂时我还不会）。 3、配置 FreeBSD的配置稍微人性化一点，简单的拿ports里面的软件包来说吧，通过ports安装的软件包，一般配置文件都在/usr/local/etc/XXX/下（XXX为软件名称，如apache22等），启动脚本在/usr/local/etc/rc.d/XXX，如果需要开机启动，必须在/etc/rc.conf中增加XXX_enable=YES，都则无法通过程序自带的脚本启动，也无法开机自启动。对于内核参数的一些优化可以通过修改sysctl.conf来搞定，有些必须在载入内核的时候配置的参数，可以通过修改/boot/loader.conf文件来搞定。就可以不用重新编译内核了。 OpenBSD的配置就没有那么人性化啦，对于ports安装的程序，不同的程序的配置文件放置在不同的位置上，需要根据具体的软件来区分，同时启动脚本也不是那么的人性化，安装完ports之后，程序会告诉你如何启动，让你加入到rc.conf.local中即可。对于内核参数，如果无法在sysctl.conf中进行修改，似乎必须通过编译内核来实现，OpenBSD似乎不支持loader.conf这种在启动前优化内核参数。 4、文档 FreeBSD官方的文档比OpenBSD官方的文档全面，并且也比较容易找。 以上纯属个人观点，欢迎拍砖。 相关文章ZFS Tuning Guide (0)Re: Freebsd 8.0 kmem map too small (0)Freebsd 8.0 kmem map too small (0)使用freebsd构建pppoe server服务器 (0)基于freebsd建立内核模式的pppoe服务器 (0)]]></description>
			<content:encoded><![CDATA[<p>最近对FreeBSD的升级和安装进行了一些了解，同时也试着在OpenBSD找寻相同的方法，于是就有这篇文章啦；本文不注重详细比较FreeBSD和OpenBSD的区别，只是记录一下我所涉及的一些功能。</p>
<p><span id="more-527"></span>1、安装</p>
<p>FreeBSD在安装方面较OpenBSD强不少，FreeBSD大部分安装界面都是“图形”的，一般说来只需 空格 回车 + 光标 就可以搞定所有的操作;而OpenBSD就不一样了，在很多情况下都是通过键盘输入来选择相应的选项，在磁盘分区的时候更不智能。</p>
<p>2、升级</p>
<p>FreeBSD:</p>
<p>FreeBSD在升级方面相对比较全面，对于系统本身，可以使用freebsd-update（似乎6.x以上的版本才有）进行升级，如果官方release补丁，可以通过freebsd-update直接将系统更新最新补丁。同时FreeBSD可以通过freebsd-update进行跨版本升级，例如将系统从7.x升级到8.0-RELEASE，FreeBSD在Release一个版本的时候，会提供相应的升级方法，很方便的。</p>
<p>对于Port的升级，可以通过csup或者是cvsup对ports进行升级，更新ports树之后，运行portupgrade -a对系统已安装的软件进行升级，这个挺方便的，并且ports里面的软件更新频率非常高。</p>
<p>对于爱偷懒的人，比如我，有的时候很烦去编译安装软件，希望直接安装二进制文件。此时pkg_add也提供了相应的功能，只要你知道软件包的名称，可以通过pkg_add -r &lt;软件名&gt;进行安装，如：pkg_add -r screen，程序自动从FreeBSD官方的Mirror站点下载已经编译好的二进制文件。</p>
<p>OpenBSD：</p>
<p>相对FreeBSD而言，OpenBSD在升级方面就逊色了不少，首先系统没有类似freebsd-update的升级工具（至少目前我没有发现，在网上也暂时没有找到相关的文档），在大版本Release的时候，官方也提供相应的升级方法，但是感觉升级方法不如FreeBSD灵活，OpenBSD只是下载安装盘上的那几个.tgz文件，手工解压，做一定的操作之后即可，具体可以参考：http://www.openbsd.org/faq/upgrade46.html，感觉没有FreeBSD方便。</p>
<p>对于Ports升级，系统也没有自带用类似FreeBSD发行版里面的csup程序，需要通过ports安装cvsup来搞定，安装完毕之后需要上官方：http://www.openbsd.org/cvsup.html 自己编写一个cvsup的配置文件，然后对Ports树进行升级，Ports里面的软件包和更新速度较FreeBSD而言也逊色了很多。</p>
<p>OpenBSD Ports里面的软件包也可以安装已经编译好的二进制，参考：http://www.openbsd.org/faq/faq15.html 可以了解到，只需设置一个PKG_PATH变量后，即可通过pkg_add -r screen进行安装，也是蛮方便的，但是软件比较少。如果软件有更新，如何更新（暂时我还不会）。</p>
<p>3、配置</p>
<p>FreeBSD的配置稍微人性化一点，简单的拿ports里面的软件包来说吧，通过ports安装的软件包，一般配置文件都在/usr/local/etc/XXX/下（XXX为软件名称，如apache22等），启动脚本在/usr/local/etc/rc.d/XXX，如果需要开机启动，必须在/etc/rc.conf中增加XXX_enable=YES，都则无法通过程序自带的脚本启动，也无法开机自启动。对于内核参数的一些优化可以通过修改sysctl.conf来搞定，有些必须在载入内核的时候配置的参数，可以通过修改/boot/loader.conf文件来搞定。就可以不用重新编译内核了。</p>
<p>OpenBSD的配置就没有那么人性化啦，对于ports安装的程序，不同的程序的配置文件放置在不同的位置上，需要根据具体的软件来区分，同时启动脚本也不是那么的人性化，安装完ports之后，程序会告诉你如何启动，让你加入到rc.conf.local中即可。对于内核参数，如果无法在sysctl.conf中进行修改，似乎必须通过编译内核来实现，OpenBSD似乎不支持loader.conf这种在启动前优化内核参数。</p>
<p>4、文档</p>
<p>FreeBSD官方的文档比OpenBSD官方的文档全面，并且也比较容易找。</p>
<p>以上纯属个人观点，欢迎拍砖。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1101" title="ZFS Tuning Guide">ZFS Tuning Guide</a> (0)</li><li><a href="http://www.wenzk.com/archives/1096" title="Re: Freebsd 8.0 kmem map too small">Re: Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/1092" title="Freebsd 8.0 kmem map too small">Freebsd 8.0 kmem map too small</a> (0)</li><li><a href="http://www.wenzk.com/archives/819" title="使用freebsd构建pppoe server服务器">使用freebsd构建pppoe server服务器</a> (0)</li><li><a href="http://www.wenzk.com/archives/817" title="基于freebsd建立内核模式的pppoe服务器">基于freebsd建立内核模式的pppoe服务器</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/527/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

