<?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>PHP Stone &#187; FreeBSD</title>
	<atom:link href="http://phpstone.com/category/freebsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpstone.com</link>
	<description>——从石头向宝石进化</description>
	<lastBuildDate>Sat, 07 Jan 2012 06:24:24 +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>FreeBSD 次版本升级笔记</title>
		<link>http://phpstone.com/369-freebsd-minor-version-upgrades-note/</link>
		<comments>http://phpstone.com/369-freebsd-minor-version-upgrades-note/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 08:44:45 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Note]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=369</guid>
		<description><![CDATA[由于学习的需求，我在一台FreeBSD服务器上做着各种的尝试。之前FreeBSD的版本升级都需要重新编译内核源代码，那是一个我认为并不繁琐而且很有乐趣的过程，但是最大的缺陷在于最终的更新文件需要跑到机房在服务器连接的显示器跟前进行，无法通过SSH远程来完成。自从有了freebsd-update这个实用的工具之后，我就可以在自己的电脑跟前完成这些操作了。 FreeBSD最新的手册（适用于6.4-RELEASE 和 FreeBSD 7.2-RELEASE）第24章 更新与升级 FreeBSD，已经给出了关于使用freebsd-update进行升级的指导。 记得 7.0-RELEASE 刚发布时，官方的文档说明了freebsd-update不适用于修改过内核的系统升级，这台服务器的系统是从6.1-RELEASE一路编译升级到7.0-RELEASE，修改过内核，为了使用freebsd-update工具，我又使用GENERIC（默认）内核重新编译了一次系统，从7.0-RELEASE开始的安全更新全部是使用的freebsd-update工具进行。7.1-RELEASE发布时，我也尝试过”#freebsd-update -r 7.1-RELEASE upgrade“,一直是到fetch第二部分文件时失败，一直没有找到原因。到09年8月份，我试着再次更新。 我更喜欢用portsnap来更新ports，并且设定好了root用户cron： 0 2 * * * portsnap -I cron update &#038;&#038; pkg_version &#8211; vIL= 每两小时更新一次，但操作升级系统前我还是执行了一次： #portsnap fetch update 接着执行系统的更新： #freebsd-update- r 7.2-RELEASE upgrade 对于定制过内核的系统，会收到类似下面的警告： WARNING: This system is running a “MYKERNEL” kernel, which is not a kernel configuration distributed as part of [...]]]></description>
			<content:encoded><![CDATA[<p>由于学习的需求，我在一台FreeBSD服务器上做着各种的尝试。之前FreeBSD的版本升级都需要重新编译内核源代码，那是一个我认为并不繁琐而且很有乐趣的过程，但是最大的缺陷在于最终的更新文件需要跑到机房在服务器连接的显示器跟前进行，无法通过SSH远程来完成。自从有了freebsd-update这个实用的工具之后，我就可以在自己的电脑跟前完成这些操作了。</p>
<p>FreeBSD最新的手册（适用于6.4-RELEASE 和 FreeBSD 7.2-RELEASE）第24章 更新与升级 FreeBSD，已经给出了关于使用freebsd-update进行升级的指导。<span id="more-369"></span></p>
<p>记得 7.0-RELEASE 刚发布时，官方的文档说明了freebsd-update不适用于修改过内核的系统升级，这台服务器的系统是从6.1-RELEASE一路编译升级到7.0-RELEASE，修改过内核，为了使用freebsd-update工具，我又使用GENERIC（默认）内核重新编译了一次系统，从7.0-RELEASE开始的安全更新全部是使用的freebsd-update工具进行。7.1-RELEASE发布时，我也尝试过”#freebsd-update -r 7.1-RELEASE upgrade“,一直是到fetch第二部分文件时失败，一直没有找到原因。到09年8月份，我试着再次更新。</p>
<p>我更喜欢用portsnap来更新ports，并且设定好了root用户cron：</p>
<p>0       2       *       *       *       portsnap -I cron update &#038;&#038; pkg_version &#8211; vIL=</p>
<p>每两小时更新一次，但操作升级系统前我还是执行了一次：<br />
#portsnap fetch update</p>
<p>接着执行系统的更新：<br />
#freebsd-update- r 7.2-RELEASE upgrade</p>
<p>对于定制过内核的系统，会收到类似下面的警告：</p>
<blockquote><p>WARNING: This system is running a “MYKERNEL” kernel, which is not a<br />
kernel configuration distributed as part of FreeBSD 7.0-RELEASE.<br />
This kernel will not be updated: you MUST update the kernel manually<br />
before running “/usr/sbin/freebsd-update install”</p></blockquote>
<p>看来我当初做的使用默认内核重新编译系统内核并没有成功地让系统”认为“我使用的是默认内核。<br />
暂时安全地无视这个警告。 更新的 GENERIC 内核将在升级过程的中间步骤中使用。</p>
<p>在下载完针对本地系统的补丁之后， 这些补丁会被应用到系统上。这个过程需要消耗的时间取决于机器的速度和其负载。这个过程中将会对配置文件所做的变动进行合并 ── 这一部分需要用户的参与，文件可能会自动合并， 屏幕上也可能会给出一个编辑器， 用于手工完成合并操作。在处理过程中，合并成功的结果会显示给用户。 失败或被忽略的合并， 则会导致这一过程的终止。 </p>
<p>The following file could not be merged automatically: /etc/mail/freebsd.cf<br />
Press Enter to edit this file in vi and resolve the conflicts<br />
manually&#8230;</p>
<p>看到这个消息后直接进入了vi编辑器，我并不知道要如何修改这些文件，于是直接保存退出了。</p>
<p>一旦这个步骤完成后，使用如下的命令将升级后的文件安装到磁盘上。<br />
# freebsd-update install</p>
<p>内核和内核模块会首先被打上补丁。 此时必须重新启动计算机。如果您使用的是定制的内核， 请使用 nextboot 命令来将下一次用于引导系统的内核 /boot/GENERIC (它会被更新)：<br />
# nextboot -k GENERIC</p>
<p>警告: 在使用 GENERIC 内核启动之前，请确信它包含了用于引导系统所需的全部驱动程序 (如果您是在远程进行升级操作，还应确信网卡驱动也是存在的)。 特别要注意的情形是，如果之前的内核中静态联编了通常以内核模块形式存在的驱动程序， 一定要通过 /boot/loader.conf 机制来将这些模块加载到 GENERIC 内核的基础上。 此外， 您可能也希望临时取消不重要的服务、磁盘和网络挂载等等， 直到升级过程完成为止。</p>
<p>现在可以用更新后的内核引导系统了：<br />
# shutdown -r now</p>
<p>　　在系统重新上线后，需要再次运行 freebsd-update。升级的状态被保存着，这样 freebsd-update 就无需重头开始，但是会删除所有旧的共享库和目标文件。 执行如下命令继续这个阶段的升级：<br />
# freebsd-update install</p>
<p>对于次版本升级，如7.0-RELEASE升级到7.2-RELEASE，是不需要重新编译和安装第三方软件。但我出于试验的目的，还是进行了更新：</p>
<p># portupgrade -f ruby<br />
# rm /var/db/pkg/pkgdb.db<br />
# portupgrade -f ruby18-bdb<br />
# rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db<br />
# portupgrade -af</p>
<p>此过程不可以中断，但是我之前也没有安装screen程序，执行”nohup portupgrade -af &#038;“下班，回家后查看并无法用jobs调出，已经终止了程序，不知道是什么原因。只好再次执行”portupgrade -af“。</p>
<p>　一旦这个完成了以后，再最后一次运行 freebsd-update 来结束升级过程。<br />
# freebsd-update install</p>
<p>　”如果您临时用过 GENERIC 内核来引导系统，现在是按照通常的方法重新联编并安装新的定制内核的时候了。“</p>
<p>由于手册上没有详细说明定制内核该如何安装，因此我按手册的操作步骤来执行。</p>
<p>”重新启动机器进入新版本的 FreeBSD 升级过程至此就完成了。“</p>
<p>重启后发发现版本号还是 FreeBSD 7.0-RELEASE p7。无奈之余我从”freebsd-update -r 7.2-RELEASE upgrade“开始重新执行了一次，到”# nextboot -k GENERIC“的步骤直接使用”shutdown -r now“重启服务器，接着执行下面的步骤，这才得到了下面的结果：</p>
<p>> uname -a<br />
FreeBSD stone.com 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #0: Wed Jun 24 00:57:44 UTC 2009     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/369-freebsd-minor-version-upgrades-note/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Windows上使用Putty通过OpenSSH安全地登陆FreeBSD</title>
		<link>http://phpstone.com/259-using-putty-on-windows-to-login-freebsd-securely-via-openssh/</link>
		<comments>http://phpstone.com/259-using-putty-on-windows-to-login-freebsd-securely-via-openssh/#comments</comments>
		<pubDate>Sat, 16 May 2009 17:05:11 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[putty]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=259</guid>
		<description><![CDATA[看过delphij的实现安全的三种途径这篇文章后决定将FreeBSD服务器的SSH登录改为使用密钥认证的方式；另外也是因为看到 /var/log/messages 里满是这样的记录： May 1 13:00:12 stone sshd[12296]: error: PAM: authentication error for illegal user admin from 220.173.60.209 May 1 13:01:24 stone sshd[12301]: error: PAM: authentication error for illegal user admin from 204.8.216.165 May 1 13:01:57 stone sshd[12307]: error: PAM: authentication error for illegal user admin from 77.243.236.32 测试环境：FreeBSD 7.0-RELEASE Putty 0.60 OpenSSH 是一组用于安全地访问远程计算机的连接工具。它可以作为 rlogin、 [...]]]></description>
			<content:encoded><![CDATA[<p>看过delphij的<a href="http://blog.delphij.net/archives/2009/05/post-561.html">实现安全的三种途径</a>这篇文章后决定将FreeBSD服务器的SSH登录改为使用密钥认证的方式；另外也是因为看到 /var/log/messages 里满是这样的记录：</p>
<blockquote><p>May  1 13:00:12 stone sshd[12296]: error: PAM: authentication error for illegal user admin from 220.173.60.209<br />
May  1 13:01:24 stone sshd[12301]: error: PAM: authentication error for illegal user admin from 204.8.216.165<br />
May  1 13:01:57 stone sshd[12307]: error: PAM: authentication error for illegal user admin from 77.243.236.32</p></blockquote>
<p>测试环境：FreeBSD 7.0-RELEASE Putty 0.60<span id="more-259"></span></p>
<p>OpenSSH 是一组用于安全地访问远程计算机的连接工具。它可以作为 rlogin、 rsh rcp 以及 telnet 的直接替代品使用。更进一步， 其他任何 TCP/IP 连接都可以通过 SSH 安全地进行隧道/转发。 OpenSSH 对所有的传输进行加密， 从而有效地阻止了窃听、 连接劫持，以及其他网络级的攻击。</p>
<h3>1. 确保sshd正常启用</h3>
<p>查看 /etc/rc.conf  是否存在 sshd_enable=”YES” ；如果没有添加进去并人工方式启动#/etc/rc.d/sshd start ；然后查询 22端口是否启动：#sockstat -4l</p>
<blockquote><p>root     sshd       8085  4  tcp4   *:22                  *:*</p></blockquote>
<h3>2. 配置 OpenSSH</h3>
<p>针对 OpenSSH 服务程序和客户端的系统级配置文件在 /etc/ssh 目录中。ssh_config 用于配置客户端的设定， 而 sshd_config 则用于配置服务器端。</p>
<p>现在来说通过配置 OpenSSH 使服务器接受公钥（public-key）认证。sshd_config 这个文件指定的一些默认值都是生效的，虽然这些选项被注释掉了，如果你想改变默认值的话，那就取消注释更改值或者直接添加相同的选项和值覆盖默认值的作用。</p>
<p>#vi /etc/ssh/sshd_config</p>
<blockquote><p>#默认 SSH 端口为 22 ，如果需要可以更改<br />
Port 22</p>
<p>#仅接受版本2的密钥，默认值<br />
Protocol 2</p>
<p>#绝对不要允许 root 用户直接通过网络登录，默认值<br />
PermitRootLogin no<br />
StrictModes yes<br />
MaxAuthTries 6</p>
<p>#启用公钥认证<br />
RSAAuthentication no         #默认值为 yes<br />
PubkeyAuthentication yes   #默认值</p>
<p>#不使用基于主机的认证，加强 OpenSSH 的安全性<br />
RhostsRSAAuthentication no   #默认值<br />
HostbasedAuthentication no   #默认值<br />
IgnoreUserKnownHosts yes     #默认值为 no<br />
PermitEmptyPassword no       #默认值</p>
<p>#禁用 PAM 认证即口令形式认证 默认值为yes<br />
ChallengeResponseAuthentication no</p></blockquote>
<p>编辑完成后重启 sshd 进程：`#/etc/rc.d/sshd restart` ；Linux 系统上一般是 `/etc/init.d/ssh restart`</p>
<p><strong>注意：</strong>因为是通过 SSH 口令认证的方式连接到服务器来操作，操作ChallengeResponseAuthentication 这个选项改为 no 后不能退出登陆，继续下面操作，或者也可以在成功验证了密钥后再改这个选项。以免出错导致无法远程SSH登录服务器。</p>
<h3>3. 生成公钥（public key）和私钥（private key）</h3>
<p>用需要生成密钥的用户通过 SSH 密码认证的方式登录<br />
FreeBSD 使用 ssh-keygen 来生成 DSA 或 RSA 密钥对用于验证用户的身份：</p>
<blockquote><p>% ssh-keygen -t rsa<br />
Generating public/private dsa key pair.</p>
<p>#不输入即使用默认<br />
Enter file in which to save the key (/home/user/.ssh/id_rsa):<br />
Created directory &#8216;/home/user/.ssh&#8217;.</p>
<p>#密钥的密码，需要输入并记住<br />
Enter passphrase (empty for no passphrase):<br />
Enter same passphrase again:<br />
Your identification has been saved in /home/user/.ssh/id_rsa.<br />
Your public key has been saved in /home/user/.ssh/id_rsa.pub.<br />
The key fingerprint is:<br />
bb:48:db:f2:93:57:80:b6:aa:bc:f5:d5:ba:8f:79:17 user@host.example.com</p></blockquote>
<p>ssh-keygen 会生成一个包含公私钥对用于验证身份。 私钥将保存到 ~/.ssh/id_dsa 或 ~/.ssh/id_rsa， 而公钥则被存放到 ~/.ssh/id_dsa.pub 或 ~/.ssh/id_rsa.pub，文件名取决于您选择的 DSA 和 RSA 密钥类型。RSA 或者 DSA 公钥必须被存放到远程机器上的 ~/.ssh/authorized_keys 才能够使系统正确运转，因此 `#cp id_rsa.pub authorized_keys`<br />
将公钥复制一份为 authorized_keys 此文件既可。将私钥 id_rsa 复制到 Windows 客户端。</p>
<h3>4. 转换 OpenSSH 生成的私钥 id_rsa 到 putty 能使用的文件</h3>
<p>这里需要借助一个工具 puttygen.exe ，从 <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">Putty 的网站</a>上可以下载。</p>
<p>执行 puttygen.exe 后，点击 Load 按钮，打开从远程服务器下载的 id_rsa ，这时要求输入生成密钥时输入的密钥密码。</p>
<p><a href="http://phpstone.com/wp-content/uploads/2009/05/puttygen1.png"><img class="alignnone size-full wp-image-404" title="puttygen1" src="http://phpstone.com/wp-content/uploads/2009/05/puttygen1.png" alt="puttygen" width="492" height="475" /></a></p>
<p>验证成功后显示密钥文件，然后点击 Save private key，就可以将文件另存为 “id_rsa.ppk” 这样的 putty 能够使用的私钥文件了。</p>
<h3>5. 配置和使用 Putty</h3>
<p>打开 Putty 程序，点击边栏的 SSH ，在 “Preferred SSH protocol version”下选择“2 only”，表示只使用 SSH 版本2；</p>
<p>点击 SSH 下的 Auth，然后点击 Browse（浏览），打开刚才的转换好的“id_rsa.ppk”私钥；</p>
<p><a href="http://phpstone.com/wp-content/uploads/2009/05/putty1.png"><img class="alignnone size-full wp-image-405" title="putty1" src="http://phpstone.com/wp-content/uploads/2009/05/putty1.png" alt="putty_image" width="465" height="448" /></a></p>
<p>最后回到 Session ，在 Host Name 下填入服务器的IP地址或者域名，Saved Sessions 下填入这个会话的会话名称（任意你喜欢的命名），然后点Save保存就设置好了。</p>
<p>接着双击会话名称就打开了登陆界面，与采用口令认证的提示不同，然后输入生成密码时设置的密钥密码既可登陆：</p>
<blockquote><p>Login as: test<br />
Authenticating with public key “imported-openssh-key”<br />
Passphrase for key “imported-openssh-key”:<br />
Last login: Wed May 31 12:35:00 2006 from 192.168.1.10<br />
test@server:~$</p></blockquote>
<p>Tips：你应该定期地同时更改公钥和私钥。</p>
<p>Ps：如果本身是FreeBSD，Linux或者Mac OS客户端，使用密钥更加简单，只需要将id_rsa放入~/.ssh文件夹并且确保.ssh文件夹的权限为700，id_rsa的权限为600即可正常登陆。</p>
<p>参考资料：<br />
<a href="http://linux-sxs.org/networking/openssh.putty.html">Using Putty on Windows to login Linux securely via OpenSSH</a><br />
<a href="http://cnsnap.cn.freebsd.org/doc/zh_CN.GB2312/books/handbook/openssh.html">FreeBSD Handbook:OpenSSH</a></p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/259-using-putty-on-windows-to-login-freebsd-securely-via-openssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD平台上安装Webmin</title>
		<link>http://phpstone.com/126-install-webmin-on-freebsd/</link>
		<comments>http://phpstone.com/126-install-webmin-on-freebsd/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 07:24:40 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[webmin]]></category>

		<guid isPermaLink="false">http://blog.phpstone.com/?p=126</guid>
		<description><![CDATA[声明：因本人水平有限，所写的操作方式仅作为参考，因为Webmin涉及到整个系统的操作，故无完全经验不可轻易用于生产环境中。 接触了一些国外的主机空间，多数是Linux+cPanel，cPanel/WHM的实用性，的确无法比拟，但其高昂的价格，对于我们这种小用户来说是不现实的，加之FreeBSD社区对于开源软件有着更高的热情，因此最近有兴趣尝试下Webmin。 #cd /usr/ports/sysutils/webmin/ #make install clean After installing Webmin for the first time you should perform the following steps as root: * Configure Webmin by running ${LOCALBASE}/lib/webmin/setup.sh * Add webmin_enable=”YES” to your /etc/rc.conf * Start Webmin for the first time by running ${LOCALBASE}/etc/rc.d/webmin The parameters requested by setup.sh may then be changed from within [...]]]></description>
			<content:encoded><![CDATA[<p>声明：因本人水平有限，所写的操作方式仅作为参考，因为Webmin涉及到整个系统的操作，故无完全经验不可轻易用于生产环境中。</p>
<p>接触了一些国外的主机空间，多数是Linux+cPanel，cPanel/WHM的实用性，的确无法比拟，但其高昂的价格，对于我们这种小用户来说是不现实的，加之FreeBSD社区对于开源软件有着更高的热情，因此最近有兴趣尝试下Webmin。<span id="more-126"></span></p>
<p>#cd /usr/ports/sysutils/webmin/<br />
#make install clean</p>
<blockquote><p>After installing Webmin for the first time you should perform the following<br />
steps as root:</p>
<p>* Configure Webmin by running ${LOCALBASE}/lib/webmin/setup.sh<br />
* Add webmin_enable=”YES” to your /etc/rc.conf<br />
* Start Webmin for the first time by running ${LOCALBASE}/etc/rc.d/webmin</p>
<p>The parameters requested by setup.sh may then be changed from within Webmin<br />
itself.</p>
<p>===&gt; Installing rc.d startup script(s)<br />
===&gt;   Registering installation for webmin-1.450_2<br />
===&gt;  Cleaning for p5-Net-SSLeay-1.35<br />
===&gt;  Cleaning for p5-Authen-PAM-0.16_1<br />
===&gt;  Cleaning for webmin-1.450_2</p></blockquote>
<p>因为之前也没有搜索任何安装资料，安装完毕按着这个提示进行初始配置：<br />
#/usr/local/lib/webmin/setup.sh</p>
<p>此过程的交互式配置大致就是些用户，端口等的常规设置。</p>
<blockquote><p>Web server port (default 10000):<br />
Login name (default admin):<br />
Login password:<br />
Password again:<br />
Segmentation fault (core dumped)<br />
The Perl SSLeay library is not installed. SSL not available.</p></blockquote>
<p>Notice:最后一行是说我们没有安装Perl SSLeay库，SSL不可用，这个接下来再解决。</p>
<p>完成后添加启动脚本和启动Webmin:</p>
<blockquote><p>
#echo &#8216;webmin_enable=”YES”&#8216; >> /etc/rc.conf<br />
（注意这里有两个“>”，如果只打一个就不是追加而是替换了。）<br />
#/usr/local/etc/rc.d/webmin start
</p></blockquote>
<p>成功启动后浏览器输入http://serverip:10000即可打开登陆界面了</p>
<p>现在来解决HTTPS登陆的问题。<br />
由于p5-Net-SSLeay-1.35已经关联安装过，说明是安装此port时出现了问题，进入目录/usr/ports/security/p5-Net-SSLeay/<br />
#make deinstall<br />
#make install clean<br />
安装时提示说一些模块必须与perl，openssl保持一致，否则会出现问题。于是将perl与openssl版本更新到ports最新版本，然后安装p5-Net-SSLeay。</p>
<p>期间仍然出现许多警告，如：</p>
<blockquote><p>SSLeay.c: In function &#8216;XS_Net__SSLeay_set_app_data&#8217;:<br />
SSLeay.c:7637: warning: cast to pointer from integer of different size<br />
SSLeay.c: In function &#8216;XS_Net__SSLeay_set_mode&#8217;:<br />
SSLeay.c:7662: warning: cast to pointer from integer of different size<br />
SSLeay.c: In function &#8216;XS_Net__SSLeay_set_pref_cipher&#8217;:<br />
SSLeay.c:7687: warning: cast to pointer from integer of different size<br />
SSLeay.c: In function &#8216;XS_Net__SSLeay_set_tmp_dh&#8217;:<br />
SSLeay.c:7712: warning: cast to pointer from integer of different size<br />
SSLeay.c:7713: warning: cast to pointer from integer of different size</p></blockquote>
<p>这些问题的原因还有待知者指点。</p>
<p>完毕后登陆仍以http方式登陆webmin，然后打开到Webmin-Webmin配置-SSL加密-Enable SSL if available?点选为“是”，保存后即可使用https登陆。</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/126-install-webmin-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD 7上安装Firefox 3</title>
		<link>http://phpstone.com/41-freebsd-7-firefox-3/</link>
		<comments>http://phpstone.com/41-freebsd-7-firefox-3/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 09:15:56 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=41</guid>
		<description><![CDATA[由于使用FreeBSD7.0-p4版本,编译安装Gnome2.22时默认安装的firefox2，而firefox3已经成熟，而且在ports中已经存在，因此在查阅不到相关文档的情况下自行分析安装firefox3。 想到即使Windows下firefox3也只能全新安装，没有升级安装，因此估计freebsd下安装firefox3的方法是先删除firefox2，然后在ports中安装firefox3. 1. 更新ports tree，我这里更新后firefox版本是3.0.3 2. #cd /usr/ports/www/firefox #make deinstall //如果是packages方式安装的Gnome等桌面管理器，得用 #pkg_delete -f firefox #cd /usr/ports/www/firefox3 #make install clean 我的笔记本配置很一般的，下载速度不快，加上编译安装完成也就耗时3小时左右。 www/firefox-i18n暂时只对firefox2的汉化有效，因此汉化只能依靠firefox本身的语言包来进行汉化，地址是：http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.3/linux-i686/xpi/ 假如你的版本是3.0.1，那么可以将链接的3.0.3更换为3.0.1，自然会找到响应版本的xpi文件来安装。简体中文是 zh-CN.xpi。 这样我就开始在freebsd7上体验firefox3了]]></description>
			<content:encoded><![CDATA[<p>由于使用FreeBSD7.0-p4版本,编译安装Gnome2.22时默认安装的firefox2，而firefox3已经成熟，而且在ports中已经存在，因此在查阅不到相关文档的情况下自行分析安装firefox3。</p>
<p>想到即使Windows下firefox3也只能全新安装，没有升级安装，因此估计freebsd下安装firefox3的方法是先删除firefox2，然后在ports中安装firefox3.<span id="more-41"></span></p>
<p>1. 更新ports tree，我这里更新后firefox版本是3.0.3</p>
<p>2. #cd /usr/ports/www/firefox<br />
#make deinstall<br />
//如果是packages方式安装的Gnome等桌面管理器，得用 #pkg_delete -f firefox</p>
<p>#cd /usr/ports/www/firefox3<br />
#make install clean<br />
我的笔记本配置很一般的，下载速度不快，加上编译安装完成也就耗时3小时左右。<br />
www/firefox-i18n暂时只对firefox2的汉化有效，因此汉化只能依靠firefox本身的语言包来进行汉化，地址是：<a href="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.3/linux-i686/xpi/" target="_blank">http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.3/linux-i686/xpi/</a> 假如你的版本是3.0.1，那么可以将链接的3.0.3更换为3.0.1，自然会找到响应版本的xpi文件来安装。简体中文是 zh-CN.xpi。</p>
<p>这样我就开始在freebsd7上体验firefox3了</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/41-freebsd-7-firefox-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD下从ports安装Gnome2.22</title>
		<link>http://phpstone.com/40-ports-gnome222/</link>
		<comments>http://phpstone.com/40-ports-gnome222/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 09:52:27 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Gnome]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=40</guid>
		<description><![CDATA[准备工作： 1.更新ports 2.重新编译内核 （一） 安装 Xorg 注：要完整地编译Xorg至少要4GB的剩余磁盘空间 ports: [x11/xorg] #cd /usr/ports/x11/xorg #make install clean 对于 Xorg 7.3 这个版本，可以不需要任何的配置文件就能运行： %startx 若不能启动 X11， 也许是默认的配置文件不适合你机器的配置，这时候就需要手工配置 X11。 # Xorg -configure         //生成配置文件 xorg.conf.new # Xorg -config xorg.conf.new    //测试配置文件是否能正常启动X11 发现并解决问题可以参考的日志文件为 /var/log/Xorg.0.log,一切准备妥当后，就可以把配置文件放到公共的目录中了： #cp xorg.conf.new /etc/X11/xorg.conf     //这个位置也可以是/usr/local/etc/X11/xorg.conf //Xorg 7.3_2 以后能自动配置 Intel915 系列显卡的宽屏显示问题，对于之前的版本,如果无法通过配置文件解决问题，需要用到 sysutils/915resolution #cd /usr/ports/sysutils/915resolution #make install clean 添加以下内容到 /etc/rc.conf i915resolution_enable=”YES” i915resolution_modes=”49&#8243; i915resolution_width=”1280&#8243; [...]]]></description>
			<content:encoded><![CDATA[<p>准备工作：</p>
<p>1.更新ports</p>
<p>2.重新编译内核</p>
<p>（一） 安装 Xorg<br />
注：要完整地编译Xorg至少要4GB的剩余磁盘空间<br />
ports: [x11/xorg]<br />
#cd /usr/ports/x11/xorg<br />
#make install clean<br />
对于 Xorg 7.3 这个版本，可以不需要任何的配置文件就能运行：<br />
%startx<br />
<span id="more-40"></span><br />
若不能启动 X11， 也许是默认的配置文件不适合你机器的配置，这时候就需要手工配置 X11。<br />
# Xorg -configure         //生成配置文件 xorg.conf.new<br />
# Xorg -config xorg.conf.new    //测试配置文件是否能正常启动X11</p>
<p>发现并解决问题可以参考的日志文件为 /var/log/Xorg.0.log,一切准备妥当后，就可以把配置文件放到公共的目录中了：<br />
#cp xorg.conf.new /etc/X11/xorg.conf     //这个位置也可以是/usr/local/etc/X11/xorg.conf</p>
<p>//Xorg 7.3_2 以后能自动配置 Intel915 系列显卡的宽屏显示问题，对于之前的版本,如果无法通过配置文件解决问题，需要用到 sysutils/915resolution</p>
<p>#cd /usr/ports/sysutils/915resolution<br />
#make install clean</p>
<p>添加以下内容到 /etc/rc.conf</p>
<p>i915resolution_enable=”YES”<br />
i915resolution_modes=”49&#8243;<br />
i915resolution_width=”1280&#8243;<br />
i915resolution_height=”768&#8243;<br />
//modes可以通过运行”915resolution -l”得到的显示模式参考填写。</p>
<p>#/usr/local/etc/rc.d/915resolution start</p>
<p>（二）安装gnome2-lite</p>
<p>#cd /usr/ports/x11/gnome2-lite<br />
#make install clean</p>
<p>//部分编译错误的处理</p>
<p>“Checing for DBUS&#8230; configure:error:<br />
“Package requirements(dbus-1 &gt;=1.1.2) were not met:<br />
“Requested &#8216;dbus-1 &gt;=1.1.2&#8242; but version of dbus is 1.0.2</p>
<p>“Stop in /usr/ports/sysutils/system-tools-backends<br />
“Error code 1</p>
<p>#portupgrade dbus</p>
<p>“Package requirements(pixman &gt;=0.10.0) were not met:<br />
“Requested &#8216;pixman &gt;=0.10.0&#8242; but version of dbus is 0.9.6</p>
<p>#portupgrade pixman</p>
<p>“Package requirements(hal-storage &gt;=0.5.8_1) were not met:<br />
“Requested &#8216;hal-storage &gt;=0.5.8_1&#8242; but version of hal-storage is 0.5.8</p>
<p>#portupgrade hal         //update hal-0.5.8.20070909 to hal-0.5.11</p>
<p>同样的错误提示，更新：libvolume_id-0.75 to libvolume_id-0.77</p>
<p>“machine.h:60:error:redefinition of typed of &#8216;cpumask_t&#8217;<br />
“/usr/src/sys/sys/types.h:146:error:previous declaration of &#8216;cpumask_t&#8217; was here</p>
<p>“Stop in /usr/ports/sysutils/lsof/work/lsof-4.81A.freebsd/lib<br />
“&#8230;Error Code 1</p>
<p>重新编译系统 FreeBSD 7.0-Release，并且更新到 FreeBSD 7.0-Release-p4</p>
<p>#cd /usr/ports/sysutils/lsof<br />
#make clean<br />
#make install clean</p>
<p>然后回到 /usr/ports/x11/gnome2-lite 接着编译安装</p>
<p>“gtar-1.20_1 cannot install: unknow AUTOCONF version: 261<br />
“Stop in /usr/ports/archivers/gtar<br />
我当前的atuoconf版本为2.62</p>
<p>#cd /usr/ports/archivers/gtar<br />
#vi Makefile<br />
将配置文件制定的 AUTOCONF 版本改为262<br />
USE_AUTOTOOLS=autoconf:262:env</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/40-ports-gnome222/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD下Apache问题收集</title>
		<link>http://phpstone.com/37-apache-error/</link>
		<comments>http://phpstone.com/37-apache-error/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 13:26:03 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=37</guid>
		<description><![CDATA[1. No such file or directory: Failed to enable the &#8216;httpready&#8217; Accept Filter 环境：FreeBSD 6.3-Release,Apache-2.2.8 相关模块：accf_http module （the function is to buffer incoming connections until a certain complete HTTP requests arrive.)用于检测请求的数据是否完整，否则抛弃，防止客户端恶意请求。 原因：系统没有加载accf_http.ko 解决办法1： 确保src与你的当前系统对应 #cd /usr/src/sys/modules/accf_http #make clean;make install clean #kldload accf_http #echo &#8216;accf_http_load=”YES”&#8216; &#62;&#62; /boot/loader.conf]]></description>
			<content:encoded><![CDATA[<p>1. No such file or directory: Failed to enable the &#8216;httpready&#8217; Accept Filter</p>
<p>环境：FreeBSD 6.3-Release,Apache-2.2.8</p>
<p>相关模块：accf_http module （the function is to buffer incoming connections until a certain complete HTTP requests arrive.)用于检测请求的数据是否完整，否则抛弃，防止客户端恶意请求。<span id="more-37"></span></p>
<p>原因：系统没有加载accf_http.ko</p>
<p>解决办法1：</p>
<p>确保src与你的当前系统对应</p>
<p>#cd /usr/src/sys/modules/accf_http<br />
#make clean;make install clean<br />
#kldload accf_http</p>
<p>#echo &#8216;accf_http_load=”YES”&#8216; &gt;&gt; /boot/loader.conf</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/37-apache-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ports make 问题收集</title>
		<link>http://phpstone.com/36-ports-make-error-collection/</link>
		<comments>http://phpstone.com/36-ports-make-error-collection/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 00:22:12 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ports]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=36</guid>
		<description><![CDATA[系统版本：FreeBSD 7.0-RELEASE 1.从port安装软件出现:cannot find -lgio-2.0错误 环境：glib2.14.2 解决办法：升级glib2.14.2到glib-2.16.4 port: devel/glib20   2.编译安装 x11/gnome2-lite 时出现： gmake:***[libgiofam.la] Error1 我检查glib版本，发现同时存在glib-1.2.10_12和 glib-2.14.2,还有一个 dbus-glib-0.74 ,于是执行 #portupgrade glib 完成后，glib-2.14.2更新到glib-2.16.5，能成功安装完成。至于怎么有两个不同版本的glib共存，我还没有查明白。 小结：安装完FreeBSD后，在按照软件之前先检查glib版本，如果需要安装的软件需要用到新版本的glib的话先实行更新。我遇到的FreeBSD编译安装软件的问题多数是版本依赖的问题，一般按错误提示更新所依赖软件的版本能得到解决。 3.FreeBSD次版本升级（7.0-RELEASE to 7.2-RELEASE）后，更新整个软件库遇到部分库文件无法更新，具体为 ”libX11-1.1.3_1,1 < needs updating (port has 1.2.1_1,1) libXaw-1.0.4_1,1 < needs updating (port has 1.0.5_1,1) libXext-1.0.3,1 < needs updating (port has 1.0.5,1) libXi-1.1.3,1 < needs updating (port has 1.2.1,1) libXmu-1.0.3,1 < [...]]]></description>
			<content:encoded><![CDATA[<h3>系统版本：FreeBSD 7.0-RELEASE</h3>
<p>1.从port安装软件出现:cannot find -lgio-2.0错误</p>
<p>环境：glib2.14.2</p>
<p>解决办法：升级glib2.14.2到glib-2.16.4</p>
<p>port: devel/glib20   <span id="more-36"></span></p>
<p>2.编译安装 x11/gnome2-lite 时出现：</p>
<p>gmake:***[libgiofam.la] Error1</p>
<p>我检查glib版本，发现同时存在glib-1.2.10_12和 glib-2.14.2,还有一个 dbus-glib-0.74 ,于是执行</p>
<p>#portupgrade glib</p>
<p>完成后，glib-2.14.2更新到glib-2.16.5，能成功安装完成。至于怎么有两个不同版本的glib共存，我还没有查明白。</p>
<p><strong>小结：</strong>安装完FreeBSD后，在按照软件之前先检查glib版本，如果需要安装的软件需要用到新版本的glib的话先实行更新。我遇到的FreeBSD编译安装软件的问题多数是版本依赖的问题，一般按错误提示更新所依赖软件的版本能得到解决。</p>
<p>3.FreeBSD次版本升级（7.0-RELEASE to 7.2-RELEASE）后，更新整个软件库遇到部分库文件无法更新，具体为</p>
<p>”libX11-1.1.3_1,1                    <   needs updating (port has 1.2.1_1,1)<br />
libXaw-1.0.4_1,1                    <   needs updating (port has 1.0.5_1,1)<br />
libXext-1.0.3,1                     <   needs updating (port has 1.0.5,1)<br />
libXi-1.1.3,1                       <   needs updating (port has 1.2.1,1)<br />
libXmu-1.0.3,1                      <   needs updating (port has 1.0.4,1)“</p>
<p>使用”portupgrade -r libX11“时关联安装”libxslt“出现故障：</p>
<p>===>  Vulnerability check disabled, database not found<br />
===>  Found saved configuration for libxslt-1.1.24_2<br />
=> libxslt-1.1.24.tar.gz doesn&#8217;t seem to exist in /usr/ports/distfiles/gnome2.<br />
=> Attempting to fetch from ftp://fr.rpmfind.net/pub/libxml/.<br />
fetch: libxslt-1.1.24.tar.gz: <strong>local modification time does not match remote</strong></p>
<p>检查匹配软件应为lixslt-1.1.24，进入/usr/ports/textproc/libxslt目录执行</p>
<p>#make distclean fetch<br />
#make install clean</p>
<p>了解到”make distclean fetch“的作用是删掉本地的distfile，执行后成功安装”libxslt-1.1.24_2“。</p>
<p>再次执行：<br />
#portupgrade -r libX11</p>
<p><strong>注意：</strong>安装这些库文件时，或者笼统地说执行”portupgrade -r“指令时，通常都会遇到自定义make.conf的问题导致编译无法正常进行，原因是自定义的make.conf某些格式错误，更正之或执行这些之前应先将自定义的make.conf内容注释掉。</p>
<h3>系统版本：FreeBSD 8.0-RELEASE</h3>
<p>更新软件：<br />
php5-extensions时，关联更新php5-filter-5.2.12，出现错误提示：</p>
<blockquote><p>/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: &#8216;pcre&#8217; undeclared (first use in this function)<br />
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: &#8216;re&#8217; undeclared (first use in this function)<br />
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:501: error: &#8216;pcre_extra&#8217; undeclared (first use in this function)
</p></blockquote>
<p>查看 /usr/port/UPDATING</p>
<blockquote><p>20100409:<br />
  AFFECTS: users of lang/php5<br />
  AUTHOR: ale@FreeBSD.org</p>
<p>  As of php 5.3, a few extensions were removed from or included into the core<br />
  php5 package.  Follow the steps below to update your installation.</p>
<p>  1) Delete the following packages (if installed):<br />
     &#8211; php5-dbase<br />
     &#8211; php5-ncurses<br />
     &#8211; php5-pcre<br />
     &#8211; php5-spl<br />
     &#8211; php5-ming<br />
     &#8211; php5-mhash</p>
<p>  2) Rebuild php5 and all ports depending on it.</p></blockquote>
<p>说明某些php5扩展已经默认集成到php5核心组件中，不需要另外安装。<br />
按要求执行后问题依旧存在，意识到删除php5系统提示时某些关联文件没有被删除，于是手工执行删除：</p>
<p>cd /usr/local; pkg_delete -f “php5*”; rm -r etc/php lib/php include/php</p>
<p>再次进入lang/php5<br />
先执行 make clean，再执行make WITH_BUNDLED_PCRE=”YES” install clean</p>
<p>再安装lang/php5-extension<br />
make clean &#038;&#038; make install clean<br />
问题得到解决</p>
<p>freebsd_tips: FreeBSD 更新ports后，若安装软件或执行portupgrade更新软件前，请先阅读/usr/ports/UPDATING</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/36-ports-make-error-collection/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FreeBSD,Gnome安装scim-fcitx</title>
		<link>http://phpstone.com/23-scim-fcitx/</link>
		<comments>http://phpstone.com/23-scim-fcitx/#comments</comments>
		<pubDate>Mon, 05 May 2008 06:16:29 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Gnome]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=23</guid>
		<description><![CDATA[在使用FreeBSD6.3-release的时候，使用scim或者fcitx一直很头大，scim用ports安装非常顺利，可是一用起来，我几乎所有的Gnome下应用程序都轮番崩溃；而fcitx则经常出现屏幕乱码的问题，而且我又偏爱scim.倒是7.0-release出来以前，我就知道有了scim-fcitx，可是一直没有使用。到最近系统直接升级倒7.0以后开始安装。 /usr/bin/ld: cannot find -lgio-2.0 gmake: *** [libgiofam.la] Error 1 *** Error code 2 Stop in /usr/ports/devel/gio-fam-backend. *** Error code 得到这个错误后，查询原因是要安装的gio-fam-backend-2.16.3依赖于glib-2.16.3,而我的为glib-2.14.2，于是用#portupdate -r glib 升级glib。未曾想到关联的程序包很多，我从昨晚开始整到今天凌晨4点还没有完成，然后一觉起来到公司又升级了一上午，总算完成了。 重新开始安装scim-fcitx成功，因我使用gdm作启动管理器，注销了一下当前用户直接Ctrl+Space就投入这篇文章的编辑了。 ps:第一次试用firefox的博客插件ScribeFire，看看效果如何，:)]]></description>
			<content:encoded><![CDATA[<p>在使用FreeBSD6.3-release的时候，使用scim或者fcitx一直很头大，scim用ports安装非常顺利，可是一用起来，我几乎所有的Gnome下应用程序都轮番崩溃；而fcitx则经常出现屏幕乱码的问题，而且我又偏爱scim.倒是7.0-release出来以前，我就知道有了scim-fcitx，可是一直没有使用。到最近系统直接升级倒7.0以后开始安装。</p>
<p>/usr/bin/ld: cannot find -lgio-2.0<br />
gmake: *** [libgiofam.la] Error 1<br />
*** Error code 2</p>
<p>Stop in /usr/ports/devel/gio-fam-backend.<br />
*** Error code<span id="more-23"></span></p>
<p>得到这个错误后，查询原因是要安装的gio-fam-backend-2.16.3依赖于glib-2.16.3,而我的为glib-2.14.2，于是用#portupdate -r glib 升级glib。未曾想到关联的程序包很多，我从昨晚开始整到今天凌晨4点还没有完成，然后一觉起来到公司又升级了一上午，总算完成了。</p>
<p>重新开始安装scim-fcitx成功，因我使用gdm作启动管理器，注销了一下当前用户直接Ctrl+Space就投入这篇文章的编辑了。</p>
<p>ps:第一次试用firefox的博客插件ScribeFire，看看效果如何，:)</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/23-scim-fcitx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>编译内核方式升级FreeBSD</title>
		<link>http://phpstone.com/19-rebuiding-world-in-freebsd-62-release/</link>
		<comments>http://phpstone.com/19-rebuiding-world-in-freebsd-62-release/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 09:35:17 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=19</guid>
		<description><![CDATA[1. 备份系统(FreeBSD6.3-release) 2. 使用FreeBSD6.2后系统自带的csup更新ports与src #cp /usr/share/examples/cvsup/ports-supfile /root/ &#8212; update ports #cp /usr/share/examples/cvsup/stable-supfile /root/ &#8212; update src #vi /root/stable-supfile*default host=CHANGE_THIS.FreeBSD.org (change to “cvsup.freebsd.org” or “cvsup.cn.freebsd.org”(in china)) *tag=RELENG_6 (change to RELENG_7_0; if use -current,set “tag=.”; -stable use “RELENG_7_0&#8243;; “RELENG_7&#8243; means use the newest of 7.x) #csup -g -L 2 ports-supfile #csup -g -L 2 stable-supfile 3.Read /usr/src/UPDATIG(after [...]]]></description>
			<content:encoded><![CDATA[<p>1. 备份系统(FreeBSD6.3-release)</p>
<p>2. 使用FreeBSD6.2后系统自带的csup更新ports与src<br />
#cp /usr/share/examples/cvsup/ports-supfile /root/ &#8212; update ports<br />
#cp /usr/share/examples/cvsup/stable-supfile /root/ &#8212; update src</p>
<p>#vi /root/stable-supfile<span id="more-19"></span>*default host=CHANGE_THIS.FreeBSD.org<br />
(change to “cvsup.freebsd.org” or “cvsup.cn.freebsd.org”(in china))<br />
*tag=RELENG_6<br />
(change to RELENG_7_0; if use -current,set “tag=.”; -stable use “RELENG_7_0&#8243;;<br />
“RELENG_7&#8243; means use the newest of 7.x)</p>
<p>#csup -g -L 2 ports-supfile<br />
#csup -g -L 2 stable-supfile</p>
<p>3.Read /usr/src/UPDATIG(after cvsup stable-supfile),it tells if there is need to update.</p>
<p>4.Delete old files,in /usr/obj<br />
(If it is the first time to complie the base system, U need&#8217;t to do this.)</p>
<p>#cd /usr/obj<br />
#chflags -R noschg *<br />
#rm -rf *<br />
If U have updated system before,or some errors hapenned, make clean some old files:<br />
#cd /usr/src<br />
#make cleardir<br />
#make cleardir<br />
You really have to do twice!!</p>
<p>5.Check /etc/make.conf<br />
eg.If U have add some update site in it,clean or comment it.</p>
<p>6.Amend the kernel configuration file.<br />
#cd /usr/src/sys/i386/conf<br />
#cp GENERIC MYKERNEL<br />
#vi MYKERNEL</p>
<p>7.Saving the Output.<br />
#script /root/buildworld.out<br />
(When finished all of the command, use:<br />
#exit)</p>
<p>8.Building new stable tree: (in /usr/src)<br />
#make buildworld<br />
(In /usr/obj thereis a new stable tree)</p>
<p>9.Build a new kernel<br />
#make buildkernel (use default kernel file)<br />
or    #make buildkernel KERNCONF=MYKERNEL</p>
<p>10.Install new kernel<br />
#make installkernel KERNCONF=MYKERNEL<br />
#reboot</p>
<p>11.Entering “singer user mode”<br />
#boot -s         (When boot)<br />
#fsck -p         (check the filesystem)<br />
#mount -u /<br />
#mount -a -t ufs<br />
#swapon -a         (open swap)</p>
<p>NOTE:If your CMOS clock is set to local time and not to GMT,you may alse need to run the following command:<br />
#adjkerntz -i</p>
<p>12.Install stable tree:<br />
#mergemaster -p<br />
#make installworld</p>
<p>13.Amending or updating the configuration file in /etc<br />
#mergemaster<br />
#shudown -r now</p>
<p>Now,accomplish.</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/19-rebuiding-world-in-freebsd-62-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>笔记本上快速安装FreeBSD</title>
		<link>http://phpstone.com/5-quick-install-freebsd-on-notebook-pc/</link>
		<comments>http://phpstone.com/5-quick-install-freebsd-on-notebook-pc/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 02:38:55 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=5</guid>
		<description><![CDATA[注：单装FreeBSD，非多系统安装。 我的配置： Intel(R) Pentium(R) M processor 1.60GHz (1596.02-MHz 686-class CPU) Mobile Intel 915GM/GMS,910GML Express Chipset Family DDR533 512M FUJITSU SATA 5400rps 60GB 1. 从 cdrom 启动. Booting from CD-Rom... CD Loader 1.2 Building the boot loader arguments Looking up /BOOT/LOADER... Found Relocating the loader and the BTX Starting the BTX loader BTX loader 1.00 BTX [...]]]></description>
			<content:encoded><![CDATA[<p>注：单装FreeBSD，非多系统安装。<br />
我的配置：</p>
<ul>
<li><span style="color: #339966;">Intel(R) Pentium(R) M processor 1.60GHz (1596.02-MHz 686-class CPU)</span></li>
<li><span style="color: #339966;">Mobile Intel 915GM/GMS,910GML Express Chipset Family</span></li>
<li><span style="color: #339966;">DDR533 512M </span></li>
<li><span style="color: #339966;">FUJITSU SATA 5400rps 60GB</span></li>
</ul>
<p><span id="more-5"></span><br />
1. 从 cdrom 启动.</p>
<blockquote>
<pre class="SCREEN">Booting from CD-Rom...
CD Loader 1.2 

Building the boot loader arguments
Looking up /BOOT/LOADER... Found
Relocating the loader and the BTX
Starting the BTX loader 

BTX loader 1.00 BTX version is 1.01
Console: internal video/keyboard
BIOS CD is cd0
BIOS drive C: is disk0
BIOS drive D: is disk1
BIOS 639kB/261120kB available memory 

FreeBSD/i386 bootstrap loader, Revision 1.1 

Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0x64daa0 data=0xa4e80+0xa9e40
syms=[0x4+0x6cac0+0x4+0x88e9d]
\</pre>
</blockquote>
<p>2. 进入启动选择菜单，敲 Enter 进入默认（default）启动选项.</p>
<p>3. 选择国家进入 <strong>Sysintall</strong> 软件界面</p>
<p>4. 选择 <strong>Custom</strong> 自定义安装</p>
<p>5. 选择 <strong>Fdisk</strong> 操作磁盘分区<br />
然后按 A 键使用整个磁盘，选择FreeBSD slice 然后按 S 标记slice 为bootable，完成后按Q 。</p>
<p>6. 安装引导管理器（boot manager）<br />
现在是使用整个硬盘的情况，没有其他操作系统，所以选择安装 standard MBR(not boot manager)，多系统的情况下，应该选择 BootMgr。目前的BootMgr能自动辨认到windows或者Ubuntu的系统并能成功引导启动。</p>
<p>7. 使用 Disklabel 工具创建 Partitions<br />
按 C 创建一个 partition，出现填入值时删除默认的数据，例如改为1000M然后按[OK]键</p>
<p>选择The Root Partition Type: FS　（FreeBSD的文件系统）</p>
<p>给partition选择一个挂载点：根文件系统的挂载点（mount point） 是 “/”，所有输入“/”按回车键即可<br />
使用同样的方式添加其他分区，然后交换分区（swap partition）例外，交换分区不需要挂载点，这一点跟Linux上的设置基本是一样的。按Q键完成并退出。</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/5-quick-install-freebsd-on-notebook-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

