安裝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 [sourcecode language='sh'] # 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 [...]
[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 [sourcecode language='sh'] 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 started dovecot-auth (root) [...]
前一陣子FreeNAS 說0.7 是最後一版了 以後會轉成Linux 平台上 叫coreNAS 後來 剛剛看到消息說iXsystem 的工程師會大幅度的改寫 而FreeNAS Project 也會繼續下去了 目前會先昇上FreeBSD 8 看起來 可以繼續下去~~
man winbindd SIGHUP Reload the smb.conf(5) file and apply any parameter changes to the running version of winbindd. This signal also clears any cached user and group information. The list of other domains trusted by winbindd is also reloaded. 所以只要 [sourcecode language='sh'] /usr/local/etc/rc.d/samba reload [/sourcecode] 就好了….