Common Address Redundancy Protocol ( CARP ) 角色說明 主要會有兩種角色, 一種是Host( Primary ), 一種是Provider ( Secondary ) Host 主要就是我們提供服務的機器 Provider 就是當Host 掛掉後, 接手服務的機器 參數說明 ( 這部份看原文吧, 這是我看OpenBSD上找來的, FreeBSD上敘述的比較少, 請大家搭配著一起服用 ) vhid The Virtual Host ID. This is a unique number that is used to identify the redundancy group to other nodes on the network. Acceptable values [...]
筆記一下 我是用這張 3ware 9000 series Storage Controller ports 裡裝這兩個 tw_cli 3dm 然後去web 看的時後 administrator, user default password 都是3ware
安裝apache22 #cd /usr/ports/www/apache22 #make WITH_MPM=worker install clean 安裝php5 #cd /usr/ports/lang/php5 #make install clean ( 記得勾FPM ) 安裝fastcgi #cd /usr/ports/www/mod_fastcgi #make install clean 修改apache設定 #vim /usr/local/etc/apache22/httpd.conf LoadModule fastcgi_module libexec/apache22/mod_fastcgi.so Include etc/apache22/extra/httpd-mpm.conf #vim /usr/local/etc/apache22/Includes/php.conf <IfModule prefork.c> LoadModule php5_module libexec/apache22/libphp5.so AddType application/x-httpd-php .php .html AddType application/x-httpd-php-source .phps </IfModule> <IfModule worker.c> FastCGIExternalServer /usr/local/sbin/php-fpm -socket /tmp/php-fpm.sock AddHandler php-fastcgi .php Action [...]
# cd /usr/ports/net/ifstated # make install clean # vim /etc/rc.conf 加入以下資料 ## ifstated ifstated_enable=”YES” ifstated_flags=”-f /usr/local/etc/ifstated.conf” # vim /usr/local/etc/ifstated.conf # We want to startup init-state starting # net.inet.carp.preempt must be enabled (set to 1) # for this to work correctly. carp_up = “carp0.link.up” state starting { init { # Here we boot the box. if [...]
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 的部份 [...]
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 [...]
以我自已弄的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 [...]
[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 [...]
dovecot.conf auth default { socket listen { master { # Master socket provides access to userdb information. It’s typically # used to give Dovecot’s local delivery agent access to userdb so it # can find mailbox locations. path = /var/run/dovecot/auth-master mode = 0600 # Default user/group is the one who [...]