<?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; NCTUCS</title>
	<atom:link href="http://blog.yzlin.org/category/%e5%b7%a5%e4%bd%9c%e8%a8%98%e9%8c%84/nctucs/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yzlin.org</link>
	<description>人生就該悠閒地過，忠實地記錄下人生的軌跡</description>
	<lastBuildDate>Thu, 21 Jan 2010 15:46:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>VIM: Hack Your Editor!!</title>
		<link>http://blog.yzlin.org/2009/03/09/80/</link>
		<comments>http://blog.yzlin.org/2009/03/09/80/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 13:20:55 +0000</pubDate>
		<dc:creator>yzlin</dc:creator>
				<category><![CDATA[NCTUCS]]></category>
		<category><![CDATA[工作記錄]]></category>
		<category><![CDATA[工具]]></category>
		<category><![CDATA[電腦技術]]></category>

		<guid isPermaLink="false">http://blog.yzlin.org/?p=80</guid>
		<description><![CDATA[在系計中的小分享，這次著重在開發環境和 Plugin，蠻多部份沒有在 Slides 點出來，而是用口頭講述的，也有很多東西來不及準備完所以就沒講了，不過這種東西還是實際去玩學得比較快，也比較容易了解原理。:P
]]></description>
			<content:encoded><![CDATA[<p>在系計中的<a href="http://file.yzlin.org/VIM_Hack_Your_Editor.pdf">小分享</a>，這次著重在開發環境和 Plugin，蠻多部份沒有在 Slides 點出來，而是用口頭講述的，也有很多東西來不及準備完所以就沒講了，不過這種東西還是實際去玩學得比較快，也比較容易了解原理。:P</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yzlin.org/2009/03/09/80/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Tips of Setting Workstation Environment</title>
		<link>http://blog.yzlin.org/2008/11/11/68/</link>
		<comments>http://blog.yzlin.org/2008/11/11/68/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 18:16:10 +0000</pubDate>
		<dc:creator>yzlin</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[NCTUCS]]></category>
		<category><![CDATA[工作記錄]]></category>
		<category><![CDATA[工具]]></category>
		<category><![CDATA[電腦技術]]></category>
		<category><![CDATA[Finch]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Mutt]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.yzlin.org/?p=68</guid>
		<description><![CDATA[這份投影片是之前在系計中內部分享的，整理了一下 share 出來，裡面有些嘴砲請自動略過 XD。有錯也請指正  
]]></description>
			<content:encoded><![CDATA[<p>這份投影片是之前在系計中內部分享的，整理了一下 <a href="http://file.yzlin.org/the_tips_of_setting_workstation_environment.pdf">share 出來</a>，裡面有些嘴砲請自動略過 XD。有錯也請指正 <img src='http://blog.yzlin.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yzlin.org/2008/11/11/68/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS/BSD Installation Guide</title>
		<link>http://blog.yzlin.org/2008/01/30/6/</link>
		<comments>http://blog.yzlin.org/2008/01/30/6/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 20:53:27 +0000</pubDate>
		<dc:creator>yzlin</dc:creator>
				<category><![CDATA[NCTUCS]]></category>
		<category><![CDATA[工作記錄]]></category>

		<guid isPermaLink="false">http://blog.yzlin.org/?p=6</guid>
		<description><![CDATA[Step 1. 基本系統安裝完畢後
Step 2. 設定 /etc/make.conf

CPUTYPE?= pentium4 # 隨機器而不同，參考 /usr/share/examples/etc/make.conf
SUP_UPDATE= YES
SUP= /usr/bin/csup
SUPFLAGS= -L 2 -Z
SUPHOST= cvsup.tw.freebsd.org
SUPFILE= /usr/share/examples/cvsup/stable-supfile
PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile

Step 3. 設定 /etc/rc.conf，加入 NIS/NFS &#38; AMD 的設定

amd_enable="YES"
amd_flags="-a /amd -c 1800 -d cs.nctu.edu.tw -l /var/log/amd.log -x all /net auto.home"
nfs_client_enable="YES"
nfs_client_flags="-n 10"
nfs_reserved_port_only="YES"
nis_client_enable="YES"
nis_client_flags="-s -m -S +cs.nis,cshome,csmailgate,csduty"
nisdomainname="+cs.nis"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

Step 4. 修改 user &#38; group

用 vipw 來更改 /etc/master.passwd，修改 root 名稱為對應的 host name 並加入 nis 欄位，如：

root:*:0:0:bsdX [...]]]></description>
			<content:encoded><![CDATA[<h4>Step 1. 基本系統安裝完畢後</h4>
<h4>Step 2. 設定 /etc/make.conf</h4>
<blockquote>
<pre>CPUTYPE?= pentium4 # 隨機器而不同，參考 /usr/share/examples/etc/make.conf
SUP_UPDATE= YES
SUP= /usr/bin/csup
SUPFLAGS= -L 2 -Z
SUPHOST= cvsup.tw.freebsd.org
SUPFILE= /usr/share/examples/cvsup/stable-supfile
PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile</pre>
</blockquote>
<h4>Step 3. 設定 /etc/rc.conf，加入 NIS/NFS &amp; AMD 的設定</h4>
<blockquote>
<pre>amd_enable="YES"
amd_flags="-a /amd -c 1800 -d cs.nctu.edu.tw -l /var/log/amd.log -x all /net auto.home"
nfs_client_enable="YES"
nfs_client_flags="-n 10"
nfs_reserved_port_only="YES"
nis_client_enable="YES"
nis_client_flags="-s -m -S +cs.nis,cshome,csmailgate,csduty"
nisdomainname="+cs.nis"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"</pre>
</blockquote>
<h4>Step 4. 修改 user &amp; group</h4>
<ul>
<li>用 vipw 來更改 /etc/master.passwd，修改 root 名稱為對應的 host name 並加入 nis 欄位，如：<br />
<blockquote>
<pre>root:*:0:0:bsdX &amp;:... # 可以讓 root 寄出的 mail 較好辨識
...
+:::::::::</pre>
</blockquote>
</li>
<li>修改 /etc/group，將 bsdTA 加入 wheel group 並加入 nis 欄位，如：<br />
<blockquote>
<pre>+:*::</pre>
</blockquote>
</li>
<li>在 amd64 的版本中，NIS 可能會有點怪問題，某些 group (security, wwwadm, &#8230;) 可能抓不到，可以手動強制加入：<br />
<blockquote>
<pre>+security:*::
+wwwadm:*::
...</pre>
</blockquote>
</li>
</ul>
<h4>Step 5. 做 src &amp; ports tree 更新</h4>
<h4>Step 6. 安裝 subversion (/usr/ports/devel/subversion)</h4>
<blockquote>
<pre>cd /usr/ports/devel/subversion; make install clean</pre>
</blockquote>
<h4>Step 7. 將 csports checkout 下來</h4>
<blockquote>
<pre>cd /usr/ports
svn checkout https://opensvn.csie.org/csports/trunk/cs</pre>
</blockquote>
<h4>Step 8. 安裝 cs/metaport 將所需要的 csports 選起來安裝 (除了 cs/wwwConf)</h4>
<blockquote>
<pre>cd /usr/ports/cs/metaport; make install clean
# 注意！有些套件可能需要有某些檔案存在才能正常 make，例如：cs/cdict5 要先把字典檔抓下來</pre>
</blockquote>
<h4>Step 9. 修改 kernel configuration file，主要有幾個選項要設定：</h4>
<blockquote>
<pre>options COMPAT_FREEBSD4
options COMPAT_FREEBSD5
options COMPAT_FREEBSD6 # FreeBSD 7.0 才需要
options COMPAT_43TTY # help 有用到 BSD 4.3 TTY format
options COMPAT_IA32 # amd64 版本才需要，相容 i386 binaries
options KTRACE
options AUTO_EOI_1 # FreeBSD 7.0 不需要
#options IPFIREWALL
#options IPFIREWALL_DEFAULT_TO_ACCEPT
#options IPFIREWALL_FORWARD
options INET
device bpf</pre>
</blockquote>
<h4>Step 10. 若 kernel configuration file 沒有將網卡、device random、options SYSV* 等編進去，要在 /boot/loader.conf 將它們以 kernel module 的方式動態載入，並加入其他設定</h4>
<blockquote>
<pre>agp_load="YES"
if_em_load="YES" # 網卡代號可能不同，這邊是以 em 網卡為例
random_load="YES"
sio_load="YES"
sysvmsg_load="YES"
sysvsem_load="YES"
sysvshm_load="YES"
kern.ipc.nmbclusters=65535</pre>
</blockquote>
<h4>Step 11. make world &amp; kernel</h4>
<h4>Step 12. 設定 /etc/inetd.conf，打開 rstatd &amp; ruserd 以及 auth 並修改其啟動參數</h4>
<ul>
<li>/etc/inetd.conf<br />
<blockquote>
<pre>rstatd/1-3      dgram rpc/udp wait root /usr/libexec/rpc.rstatd  rpc.rstatd
rusersd/1-2     dgram rpc/udp wait root /usr/libexec/rpc.rusersd rpc.rusersd
auth    stream  tcp     nowait  root    internal        auth -r -o UNKNOWN -t 30 # -f -n 要拿掉</pre>
</blockquote>
</li>
<li>/etc/rc.conf 加入<br />
inetd_enable=&#8221;YES&#8221;</li>
</ul>
<h4>Step 13. 在 /etc/mail/ 下 make，生出 bsd*.submit.mc，然後修改加入：</h4>
<blockquote>
<pre>define(`ALIAS_FILE', `/etc/mail/aliases,nis:mail.aliases@+cs.nis')dnl
FEATURE(`msp', `csmailgate.cs.nctu.edu.tw')dnl
MASQUERADE_AS(cs.NCTU.edu.tw) MASQUERADE_DOMAIN(`bsd*.cs.NCTU.edu.tw')dnl # 依照 domain name 的不同做更改</pre>
</blockquote>
<h4>Step 14. 接著在 /etc/mail/ 下 make all install，然後修改 /etc/rc.conf</h4>
<blockquote>
<pre>sendmail_enable="NONE"</pre>
</blockquote>
<h4>Step 15. 設定印表機，<span style="text-decoration: line-through;">從別台機器取得 /etc/printcap</span>(csports/lpd 會自動裝)，修改 /etc/rc.conf</h4>
<blockquote>
<pre>lpd_enable="YES"
lpd_flags="-l"
lpd_program="/usr/local/sbin/lpd"</pre>
</blockquote>
<h4>Step 16. 修改 /etc/rc.conf 設定開機啟動 quota</h4>
<blockquote>
<pre>quota_enable="YES"</pre>
</blockquote>
<h4>Step 17. sshd 設定 (這個步驟可以提前做，然後就直接遠端連進去下指令了)</h4>
<ul>
<li>/etc/rc.conf<br />
<blockquote>
<pre>sshd_enable="YES"</pre>
</blockquote>
</li>
<li>/etc/ssh/sshd_config<br />
<blockquote>
<pre>VersionAddendum FreeBSD # 改掉，以防用 telnet 看 port 22 時被人得知 FreeBSD 的版本
Protocol 2 # 強迫使用 SSH2</pre>
</blockquote>
</li>
</ul>
<h4>Step 18. FTP 設定</h4>
<ul>
<li>安裝 /usr/ports/ftp/pure-ftpd</li>
<li>設定 /usr/local/etc/pure-ftpd.conf，下面是主要的設定，其他請參考當時的設定<br />
<blockquote>
<pre>DisplayDotFiles             yes
AnonymousOnly               no
NoAnonymous                 yes
AnonymousCanCreateDirs      no
PassivePortRange          64000 65000
AnonymousCantUpload         yes
AllowAnonymousFXP           no
TLS                      2
FileSystemCharset       big5</pre>
</blockquote>
</li>
<li>rc.conf 加入<br />
<blockquote>
<pre>pureftpd_enable="YES"</pre>
</blockquote>
</li>
</ul>
<h4>Step 19. ganglia</h4>
<ul>
<li>安裝 /usr/ports/sysutils/ganglia-monitor-core</li>
<li>link /usr/local/etc/gmond.conf<br />
<blockquote>
<pre>ln -s /net/admin/etc/gmond.conf /usr/local/etc/gmond.conf</pre>
</blockquote>
</li>
<li>rc.conf 加入<br />
<blockquote>
<pre>gmond_enable="YES"</pre>
</blockquote>
</li>
</ul>
<h4>Step 20. 重開機後到其它台把 /var/db/ports 下的東西 sync 過來後，將需要的 ports 灌好</h4>
<h4>Step 21. 其餘設定檔 (從其他台抓)</h4>
<ul>
<li>/etc/hosts.allow, /etc/hosts (從別台抓回來)</li>
<li>/etc/resolv.conf (記得設定好 domain/search，不然 amd 會抓不到，NFS 就起不來)</li>
<li>/etc/motd 特殊字體請用 figlet 生出來</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.yzlin.org/2008/01/30/6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
