如何秀出複數的排序條件資料
SELECT * FROM Product ORDER BY SellDate DESC
因為資料的SellDate可能同時會有幾十筆都相同,我希望可以在篩選出這批資料後在更詳細的依照他們的編號去做排序…
PHP GooGle PageRank程式
rsync + SSH 遠端備份排程
[前言]
RSYNC是Linux,UNIX系統下的數據鏡像及備份工具,具有可使本地和遠程兩台主機的文件,目錄之間,快速同步鏡 像,遠程數據備份等功能.在同步 過程中,可根據遠程服務器上的數據變動,相應的刪除或者更新本地機的數據,同步數據不用全部傳送,大大提高同步及備份文件的速度.同時在網絡安全方面,也 可以設置為SSH傳輸模式. 遠程主機(Rsync Server)可為RSYNC daemon模式,開啟之後將開放tcp4 873 port,等待本地主機(Rsync client)的連接,連接時遠程主機會進行認證,確認合法用戶進入,便開始進行資料傳輸,在第一次傳輸時會把整個資料都備份同步到本地主機上,在下一次 傳輸時,添加相應參數則可根據遠程主機的數據變動來相應調整同步操作. 本文只是 RSYNC 軟件的一個簡單應用操作文檔,主要是給初學者一個初步介紹。
[目的]
遠端異地備援
以RSYNC 使用SSH 通訊協定 進行遠端異地備援.
將遠端 目錄做備援
[環境]
Server:FREEBSD 6.2
Client:FREEBSD 6.2
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~~