Archive for February 2008

好用的 postfix mail log 統計軟體 pflogsumm

pflogsumm.pl is designed to provide an over-view of postfix activity, with just enough detail to give the administrator a “heads up” for potential trouble spots.

emerge net-mail/pflogsumm

URL: http://jimsun.linxnet.com/postfix_contrib.html

rsync command

#!/bin/sh
/usr/bin/rsync -avxE –delete /var/www/prebid/upload /home/rimmon/daily_backup

Apache server 要把全站的 URL 轉向到特定網頁

在 Sun UltraSparc 上裝 Gentoo 比裝 Solaris 還簡單

本來是想在我的 sparc 裝 solaris 10 再裝 oracle 來玩的….沒想到搞半天 solaris 一直說抓不到 SCSI HD….orz
因為我的 SCSI CDROM 一直無法 boot cdrom , 所以改採 boot net Continue reading ‘在 Sun UltraSparc 上裝 Gentoo 比裝 Solaris 還簡單’ »

Gentoo iptables mini HOWTO … kernel options

要 enable kernel 以下的 options ….
及相關 rules Continue reading ‘Gentoo iptables mini HOWTO … kernel options’ »

PHP: cachelite program sample

emerge dev-php/PEAR-Cache_Lite

require_once "Cache/Lite.php"; 

define('ENABLE_CACHE_LITE',1); 

function _fn_get_data_from_cache($key) { 

$options = array( 

  'cacheDir' => '/tmp/', 

  'lifeTime' => 10, 

  'pearErrorMode' => CACHE_LITE_ERROR_DIE 

  ); 

if (ENABLE_CACHE_LITE) { 

    $cache=new Cache_Lite($options); 

    if ($data=$cache->get($key)) { 

      // got data from cache_lite then return 

      return $data; 

    } 

  } 

// not found! then do the process 

  // sample 

  $data=time(); 

if (ENABLE_CACHE_LITE) { 

    $cache->save($data); 

  } 

return $data; 

} 

// ====== 

$key='abc'; 

echo _fn_get_data_from_cache($key);

gentoo linux kernel 2.6.20 iptables compile options

gentoo linux kernel 2.6.20 用 iptables

compile options

– Networking
—- Networking options
—— Network packet filtering framwork
——– Core Netfilter Configuration
Netfilter Xtable 用 modules 方式 compile