1. 角色分為 Provider, Host Provider 就是設定當Host 失連後可以取得原先在Host 上的ip 的主機 Host 就是我們的Client 2. 先 compile Kernel 加入 ( Provider, Host 都要) device carp 3. 設定 rc.conf 設定 host hostname=”hosta.example.org” ifconfig_fxp0=”inet 192.168.1.3 netmask 255.255.255.0″ ## 原本的網卡設定 cloned_interfaces=”carp0″ ## carp 網卡 ifconfig_carp0=”vhid 1 advskew 10 pass testpass 192.168.1.50/24″ ## vhid 在host/provider 都要一致 pass 的部份 兩台也要一樣 設定 provider hostname=”provider.example.org” [...]
今天在移機時遇到的問題 從 samba 3.0 移到 samba 3.4 帳號的部份 man pdbedit -i passdb-backend Use a different passdb backend to retrieve users than the one specified in smb.conf. Can be used to import data into your local user database. This option will ease migration from one passdb backend to another. Example: pdbedit -i smbpasswd:/etc/smbpasswd.old symbolic link 的部份 [...]
主要是因為之前用Yii 的 Widget 用的挺開心的( 除了他會每次都進一次Cycle 外) 因為用ZF沒找到有這方面相關的資訊 所以自已動手刻….. 1. 在application 下建 Titan/Base 的資料夾 ( Titan 是我想把自已寫的東西盡可能的都收在這 ) 2. vim Titan/Base/Widget.php [sourcecode language='php'] < ?php abstract class Titan_Base_Widget { protected $_basePath; protected $_viewBasePath; protected $_viewScriptPath; public function __construct( $array = null ) { //assign variables $this->_basePath = APPLICATION_PATH . DS . ‘widgets’; $this->_viewBasePath = APPLICATION_PATH . [...]
The current supported branches and expected EoL dates are: +———————————————————————+ | Branch | Release | Type | Release date | Estimated EoL | |———–+————+——–+—————–+—————–| |RELENG_6 |n/a |n/a |n/a |November 30, 2010| |———————————————————————| |RELENG_6_4 |6.4-RELEASE |Extended|November 18, 2008|November 30, 2010| |———————————————————————| |RELENG_7 |n/a |n/a |n/a |last release + 2y| |———–+————+——–+—————–+—————–| |RELENG_7_1 |7.1-RELEASE |Extended|January 4, 2009 |January [...]
剛剛用Yii 的AR 寫的很開心, 下了這個 [sourcecode language='php'] $criteria=new CDbCriteria; $criteria->condition=’products.id=:ID AND products_info.language_id=:languageID’; $criteria->params=array(‘:ID’=>$_GET['id'], ‘:languageID’ => $this->_lang_id ); $criteria->order = ‘products_content.content_orders ASC’; $model = Products::model()->with( ‘products_info’, ‘products_content’ )->find( $criteria ); [/sourcecode] 一直出現 CDbCommand 無法執行 SQL 陳述: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘products.id’ in ‘where clause’ 想說怪了… 再看了一下 sql log [sourcecode language='text'] 543 Query SELECT `t`.`id` [...]
以我自已弄的Net-POP3-SSLWrapper為例 # mkdir /root/Net-POP3-SSLWrapper # vim Makefile # New ports collection makefile for: p5-Net-POP3-SSLWrapper # Date created: 16 December 2009 # Whom: johnpupu # # $FreeBSD$ # PORTNAME= Net-POP3-SSLWrapper PORTVERSION= 0.02 CATEGORIES= mail perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- MAINTAINER= johnpupu@gmail.com COMMENT= Perl extension for simple POP3S wrapper for Net::POP3 BUILD_DEPENDS= ${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL PERL_CONFIGURE= yes MAN3= Net::POP3::SSLWrapper.3 [...]
手邊剛好有x3650m2的機器 順手測了一下…FreeBSD 7.1 i386 & FreeBSD 8.0 AMD64 學Jeff Roberson弄一下..XD 就沒圖先看數據吧… CPU: Intel(R) Xeon(R) CPU E5520 @ 2.27GHz (2266.76-MHz 686-class CPU) real memory = 2137583616 (2038 MB)==>其實這台機器有12G, 不過i386只抓得到2G avail memory = 2081353728 (1984 MB) RAID 5 / 四顆 IBM 43W7538 146.8GB 10Krpm SAS RAID controller MR10i ——————7.1 i386 ———————– uname -a FreeBSD ms1.xxx.xxx.xx 7.1-RELEASE-p9 FreeBSD [...]
[sourcecode language='sh'] cd /usr/ports/www/apache22 make WITH_MPM=worker install clean [/sourcecode] [sourcecode language='sh'] cd /usr/ports/lang/php5; make install clean [/sourcecode] [sourcecode language='sh'] cd /usr/ports/www/mod_fastcgi make install clean [/sourcecode] httpd.conf 中新增or把註解拿掉這兩行 LoadModule fastcgi_module libexec/apache22/mod_fastcgi.so Include etc/apache22/extra/httpd-mpm.conf 編輯 /usr/local/etc/apache22/extra/httpd-mpm.conf [sourcecode language='sh'] ThreadLimit 512 StartServers 1 MaxClients 512 MinSpareThreads 1 MaxSpareThreads 512 ThreadsPerChild 512 MaxRequestsPerChild 0 [/sourcecode] 新增/usr/local/etc/apache22/Includes/fastcgi.conf [sourcecode language='sh'] AddType [...]