發表文章

目前顯示的是 8月, 2007的文章

b2evolution測試

架了一台 10.2版的,但是好像沒有中文包.... 整個囧啊 http://w3.fysh.tcc.edu.tw/test/b2/blogs 自己架blog速度比blogspot快多了.... Powered by ScribeFire .

eHD1 更換s-ata排線

開機抓不到sata硬碟 更換一條排線 Powered by ScribeFire .

磁帶機安裝至www3失敗

scsi卡的bios抓得到 但是進入fedora 6 後抓不到裝置 /dev/st0 改裝至proxy2試試看 Powered by ScribeFire .

檢驗字串是否全為BIG5中文字

//函數名稱:boolean isBig5(string) //功能:檢驗字串是否全為BIG5中文字 //語法:isBig5(字串) //回傳:成功回傳true, 否則回傳false function isBig5($c="") { if($c=="")return false; //空字串 $len_of_c=strlen($c); if($len_of_c%2==1)return false; //長度非偶數 for($ii=0;$ii<$len_of_c;$ii+=2){ $chk_c=substr($c,$ii,2); $bc = hexdec(bin2hex($chk_c)); if(($bc>=0xa440 && $bc<= 0xc67e) || ($bc>=0xc940 && $bc<= 0xf9fe) || ($bc>=0xa140 && $bc<= 0xa3fe) || ($bc>=0xc6a1 && $bc<= 0xc8fe))$nothing=true; else return false; } return true; } Powered by ScribeFire .

身分證字號檢查PHP程式

非轉貼,自認很精簡的程式碼 //函數名稱:boolean check_nick(string) //功能:身分證字串檢查 //語法:check_pid(身分證字串) //回傳:成功回傳true, 否則回傳false function chk_pid($id) { if($id=="")return false; $id = strtoupper(trim($id)); //將英文字母全部轉成大寫,消除空白 //檢查第一個字母是否為英文字 //檢查第二個字元1 or 2 其餘為數字共十碼 $ereg_pattern= "^[A-Z]{1}[12]{1}[[:digit:]]{8}$"; if(!ereg($ereg_pattern, $id))return false; $wd_str="BAKJHGFEDCNMLVUTSRQPZWYX0000OI"; $d1=strpos($wd_str, $id[0])%10; $sum=0; for($ii=1;$ii<9;$ii++)$sum+= (int)$id[$ii]*(9-$ii); $sum += $d1 + (int)$id[9]; if($sum%10 != 0)return false; else return true; } Powered by ScribeFire .

申請使用Google Apps 教育版 (for FYSH)

https://www.google.com/a/s.fysh.tcc.edu.tw 網域認證尚未完成 Powered by ScribeFire .

CentOS 5.0

下載 CentOS 5.0 DVD ISO from isu ftp 學生用伺服器建置流程(CentOS 5 版) http://apt.nc.hcc.edu.tw/web/student_server_centos/student_server_centos.html htpp://centos.org http://centos.blogspot.com

安裝 學校整合模組

http://w3.fysh.tw/test/school/ 檔案來源: http://dyna.hcc.edu.tw/dyna/menu/index.php?account=dyna Powered by ScribeFire .

APACHE 使用 mod_bandwidth 做流量管制

LoadModule bandwidth_module modules/mod_bandwidth.so <IfModule mod_bandwidth.c> BandWidthModule Ob BandWidthDataDir C:/WWW BandWidthPulse 100000 # above 10MB, transfer drops to 5K/sec # above 1MB, transfer drops to 10K/sec LargeFileLimit 1024 10000 LargeFileLimit 10240 5000 <Directory "C:/WWW/BX2AA"> BandWidth all 4000 Order deny,allow Deny from all Allow from all </Directory> </IfModule> #在 C:\WWW 目錄 #1MBytes 以下不限速 #1MBytes 以上10MBytes 以下 限速 10KBytes #10MBytes 以上 限速 5KBytes # #在 C:\WWW\BX2AA 目錄 #全部限速 4KBytes Powered by ScribeFire .

apache2 流量限制

from: http://fjufirefox.blogspot.com/2007/01/apache2.html 1. 下載 Apache 2 Bandwidth Quota and Throttling cd /tmp sudo wget http://cband.linux.pl/download/mod-cband-0.9.7.5.tgz 2. 解壓縮 sudo tar zxvf mod-cband-0.9.7.5.tgz 3. 安裝 make 套件 sudo apt-get install make 4. 進行編譯 sudo ./configure sudo make sudo make install 5. 設定 scoreboard sudo mkdir /var/www/scoreboard sudo chown www-data.www-data /var/www/scoreboard/ 6. 設定檔 /etc/apache2/httpd.conf CBandScoreFlushPeriod 1 CBandRandomPulse On # # mod_cband # SetHandler cband-status CBandClassDst 127/8 CBandClassDst 192.168.10.0/24 ServerAdmin [email protected] DocumentRoot /var/www/ ServerName ubuntu.localdomain #ErrorLog logs/ubuntu.localdomain-error_log #CustomLog logs/ubuntu.localdomain-access_log common CBandSpeed 1024 200 200 CBandRemoteSpeed 1024kb/s 50 50 CBandClassRemoteSpeed local_class 1000Gbps 1000 1000 CBandLimit 10G CBandPeriod 1W CBandScoreboard /var/www/scoreboard Powered by ScribeFire .

2007/8/16 網管記事

webmin升級 1.36 www,www3安裝 bacula 備份系統: http://www.bacula.org/ Powered by ScribeFire .