Freebsd 6.2 stable 之路
安裝好 FreeBSD 6.2-RELEASE
確認CVSUP 安裝好如沒有到/usr/ports/net/cvsup-without-gui
去 make install clean
cd /usr/share/examples/cvsup/
將
stable-supfile
ports-supfile
2個檔案 cp 到 /usr
更改內容
*default host=CHANGE_THIS.FreeBSD.org
改成
*default host=cvsup.tw.freebsd.org
webalizer 分析多網站記錄 note
There are many ways to process multiple virtual hosts on the same machine. The easiest way I have found, provided that each host generates it’s own log file, is as follows:
** **
-
Create a central directory for your configuration files. (I use /etc/webalizer)
-
Make a configuration file for each virtual host and place them in the central directory. Each configuration file should have at least the HostName (domain), OutputDir and LogFile configuration settings specified. You probably will want to specify other settings specific to the domain, such as HideReferrer, HideSite and maybe some others as well. Name the file the same as the domain name, and end it with a .conf extension, so you can easily tell what vhost the configuration is for.
安裝SNMP MRTG
(忘了當初引用的網址)
一般版本的FreeBSD系統SNMP存放在/usr/ports/net/net-snmp下面,但是有的版本不是。有些版本在安裝Package的時 候,除了要安裝Net之外,還要安裝Net-mgmt裡面的SNMP,安裝好之後,SNMP就存放在 /usr/ports/net-mgmt/net-snmp下面了。下面就是安裝過程:
# cd /usr/ports/net-mgmt/net-snmp #snmp的存放路徑
# make install clean #安裝snmp
# ee /etc/rc.conf
snmpd_enable=”YES”
snmpd_flags=”-p /var/run/snmpd.pid”
# /etc/netstart
# ee /usr/local/share/snmp/snmpd.conf
rocommunity public
# /usr/local/etc/rc.d/snmpd.sh start #啟動snmp
Link Aggregation on FreeBSD多網卡合併 頻寬
(忘了當初引用的網址)
在研究所的時候就玩過在 FreeBSD 底下用多張網路卡跟 Switch 做 Link Aggregation,最近又有機會碰到,趁這個機會在這邊寫個 Note,順便把測試結果貼上來。
Portsnap 方式 更新porttree
Portsnap 方式
portsnap(8) 也是更新 Ports Collection 的方式之一。 FreeBSD 6.0 起開始內建 Portsnap 機制,而較舊的系統,則可透過 sysutils/portsnap port 來安裝:
# pkg_add -r portsnap
Portsnap 細節功能,請參閱 Portsnap 使用篇。
-
若 /usr/ports 目錄不存在的話,就建立一下吧:
# mkdir /usr/ports
印表機的安裝 on FreeBSD
(忘了引用頁面)
自前幾個月開始使用 FreeBSD 來當 Desktop 後,一直搞不定印表機的部份,因為一直弄不懂 filer 的部份,今天總算是搞定了,心情之愉悅真是筆墨無法形容,因為終於可以不用為了列印而得切換回 M$-Windows 系統來作業了。 YA~~
color ls 彩色世界
cd /usr/ports/misc/gnuls
make all install clean
再用gnuls取代ls,
像我用tcsh,
所以在~/.tcshrc加入
alias ls ‘gnuls –color=auto –show-control-chars’
非mmcache!Memcached的應用:多網站伺服器 PHP 共享 Session
請注意是 Memcached 不是 mmcache,很多人搞不清楚他們兩個的不同!多半玩過 PHP 的人大概都聽過 mmcache,它是一個預編譯緩衝的 PHP 加速程式,能夠提升 PHP 的執行效能。但很少人聽過 Memcached ,因為大多人乍看之下都以為它是mmcache,使得它沒什麼機會介紹自己。事實上,若您正打算架構一個真正高負載的大型網站系統,你需要瞭解的並不是 mmcache,而是 memcached。
AWStats 6.3 網站分析 簡易安裝與設定
(忘了當初引用的網址)
使用 PORTS 安裝
cd /usr/ports/www/awstats/
make install
AWStats 安裝至 /usr/local/www/awstats/
======================================================================
基本資料:
網站位址:www.lab.mlc.edu.tw
======================================================================
建立 AWStats 設定檔(檔名和你的網站名稱有關喔)
cd /usr/local/www/awstats/cgi-bin
cp awstats.model.conf awstats.www.lab.mlc.edu.tw.conf
chmod u+w awstats.www.lab.mlc.edu.tw.conf