FreeBSD NGINX + PHP5
先去官網找到freebsd專用的port
http://php-fpm.org/downloads/freebsd-port/
# fetch http://php-fpm.org/downloads/php-5.2.10-fpm-0.5.13.diff.gz
# mv php-5.2.10-fpm-0.5.13.diff.gz /usr/ports/distfiles/
# fetch http://files.directadmin.com/services/custombuild/php-5.2.9-mail-header.patch
# mv php-5.2.9-mail-header.patch /usr/ports/distfiles/
# fetch http://php-fpm.org/downloads/freebsd-port/php-5.2.10-fpm-0.5.13.tar.gz
php-5.2.10-fpm-0.5.13.tar.gz 100% of 9503 B 45 kBps
# tar zxvf php-5.2.10-fpm-0.5.13.tar.gz -C /usr/ports/lang
x php5-fpm/
x php5-fpm/files/
x php5-fpm/Makefile
x php5-fpm/distinfo
x php5-fpm/pkg-descr
x php5-fpm/pkg-plist
x php5-fpm/files/php-fpm.sh.in
x php5-fpm/files/patch-scripts::phpize.in
x php5-fpm/files/patch-TSRM_threads.m4
x php5-fpm/files/patch-Zend::zend.h
x php5-fpm/files/patch-Zend_zend_list.c
x php5-fpm/files/patch-Zend_zend_list.h
x php5-fpm/files/patch-ext_standard_array.c
x php5-fpm/files/patch-ext_standard_basic_functions.c
x php5-fpm/files/patch-ext_standard_dns.h
x php5-fpm/files/patch-ext_standard_image.c
x php5-fpm/files/patch-php.ini-dist
x php5-fpm/files/patch-php.ini-recommended
x php5-fpm/files/patch-main::php_config.h.in
x php5-fpm/files/patch-main_SAPI.c
x php5-fpm/files/patch-acinclude.m4
x php5-fpm/files/patch-configure.in
# cd /usr/ports/lang/php5-fpm/
# make install clean
# fetch http://www.grid.net.ru/nginx/download/nginx_upload_module-2.0.12.tar.gz
# mv nginx_upload_module-2.0.12.tar.gz /usr/ports/distfiles/
# fetch http://mod-zip.googlecode.com/files/mod_zip-1.1.5.tar.gz
# mv mod_zip-1.1.5.tar.gz /usr/ports/distfiles/
# cd /usr/ports/www/nginx-devel
# make install clean
編輯/usr/local/etc/php-fpm.conf
nobody改成www
Loadfile Class PHP效能增進
前些日子有參加,WEB效能增進的研討會.
思考PHP效能進化,不外乎找套件使用他愛他.
阿勒 怎摸沒有人做東西去改變他??
回歸問題點當每個人都有辦法去安裝套件或軟體去增進效能.
學習 FreeBSD ports
安裝
cd /usr/ports/ports-mgmt/porttools ; make install clean
簡介
FreeBSD Port Tools includes the following commands: - port create: create a new port from a template - port diff: generate a diff against a previous version of the port - port fetch: fetch distfile(s) of a new version of the port - port help: display usage summary for port(1) commands - port submit: submit a PR with new port, or port change/update - port test: automate testing a new port or a port update WWW: http://sourceforge.net/projects/porttools/ 參考: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/index.html https://blog.dragon2.net/2009/12/17/912.php http://www.joehorn.idv.tw/archives/2010/03/02/759/ http://www.ptt.cc/man/FreeBSD/DEBD/D160/M.1135705310.A.E5B.htmlFreeBSD ports send-pr 初體驗
改造 ZF架構呼叫檔案方式
][1]
(點圖看大圖)
加了自己的 loadfiles class
改掉ZF LOADER 內的 static function loadFile 的 include 改為我的loadfiles class.
有看過原圖的人會發現大不同了.
原架構的ZF執行狀況[
jQuery 1.4 研究與報導 之個人見解(二)
New .toArray() method
.get()用來轉換陣列,將被移除.
jQuery1.4 請使用.toArray() 不用帶入參數可以自動解析.
jQuery() returns empty set
在舊版jQuery1.3 jQuery() 會回傳整個結構函數.
jQuery1.4 將改善此現象 回傳一個空函數.
PS:保留jQuery().ready() 和 jQuery(function(){}).
jQuery(“TAG”)
快數透過TAG目標定義選取.
CSS
The performance of the .css() method has seen a 2x performance improvement.
.css()速度大幅增長2倍,請看官方圖表.
The performance of the .addClass(), .removeClass(), and .hasClass() methods has seen a 3x performance improvement.
.addClass().removeClass().hasClass()速度大幅增長3倍,請看官方圖表.
jQuery 1.4 研究與報導 之個人見解(一)
本文皆為個人見解如有錯誤,煩請賜教.
jQuery 1.4 於2010/01/14 釋出.
官方同時間開啟一個活動專欄頁面報導 14 Days of jQuery.
In celebration of jQuery’s 4th birthday, the jQuery team is pleased to release the latest major release of the jQuery JavaScript library! A lot of coding, testing, and documenting has gone into this release, and we’re really quite proud of it.
I want to personally thank Brandon Aaron, Ben Alman, Louis-Rémi Babe, Ariel Flesler, Paul Irish, Robert Katić, Yehuda Katz, Dave Methvin, Justin Meyer, Karl Swedberg, and Aaron Quint who put a lot of work into fixing bugs and getting the release out the door.
文中開頭就敘述了.1.4的釋出跟jQuery的生日是同一天(蠻有意義的).並且更新了官網說明文件.
Downloading
這次官方使用Google Closure Compiler 來做壓縮.
- jQuery Minified (23kb Gzipped)
- jQuery Regular (154kb)
還有再google提供的cdn
http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js
QEMU on FreeBSD 8.0 再你的的server上,建立自己的虛擬電腦 lab 以供測試開發.
一直以來你是否有跟我有相同的困擾? 手頭上只有一台機器,效能尚可系統負載不高.
但工作需要執行多種環境測試實驗,無法隨身攜帶各種系統. 等等困境….
一般的虛擬機器軟體又需要圖型介面,才可設定使用.(這無疑對系統又是一種負擔,與當機危險)
現在終於有實際解決方案~所需費用 0.
PyMSN Python 開發的MSN 模組 (一)基本介紹
安裝可以參考 閃光的 BLOG https://blog.hinablue.me/794
基本使用介紹:
- 使用命令列執行 可以加 2個參數 1.帳號 2.密碼 EXAMPLE:python test.py aaaa@hotmail 123123123
- Log可自行調配 是否輸出存檔
- 在使用任何 套件模組 像這種依照物件下去設計的 千萬不要改原始碼(等改版 你就知道痛了)
- 這邊 一開始如果用 預設的範例test.py你會遇到 傳訊息沒回應或出現event_handler 等等error.(稍後會講解)
原理分析:
跨平台效能TEST
http://www.primatelabs.ca/geekbench/
支援很多喔
Geekbench 2.1.2 for Mac OS X
Geekbench 2.1.2 for Windows
Geekbench 2.1.2 for Linux
Geekbench 2.0.9 for Solaris
64Bit 要註冊
紀錄 FreeBSD make.conf
MASTER_SITE_BACKUP?= \
ftp://ftp.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp2.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp3.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp4.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp5.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp7.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp8.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp9.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}
MASTER_SORT_REGEX= .tw/ .tw. .edu/ .edu.
FETCH_CMD=fetch -U -A -P
WITHOUT_X11=yes
MACHINE=amd64
MACHINE_ARCH=amd64
MAKE_JOBS_NUMBER=3
WITH_LIB32=yes <~~~這個才會有32的LIB
# for cvsup make update
SUP_UPDATE=yes
SUP= /usr/bin/csup
SUPFLAGS= -g -L 2
SUPHOST= cvsup2.tw.FreeBSD.org
SUPFILE= /usr/share/examples/cvsup/standard-supfile
PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile
DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile