天天看點

一些工作小收藏

安裝fastcgi:

<a href="http://www.cyberciti.biz/faq/rhel-fedora-install-configure-nginx-php5/">http://www.cyberciti.biz/faq/rhel-fedora-install-configure-nginx-php5/</a>

在自己的虛拟機上安裝munin

指令:php -r 'echo date("ymdhis", 1330936860);'

php擷取本程序函數:getmypid()

打出當時的方法名:

fwrite(stdout, __method__ . "\n");

ll -h 看每個檔案大小

監護redis報錯:

<a href="http://xingqiba.sinaapp.com/?p=240">http://xingqiba.sinaapp.com/?p=240</a>

redis需要将

修改redis.conf的daemonize為no

[program:redis]

command = redis-server

autostart=true

autorestart=true

startsecs=3

[program:webdis]

command = /usr/local/webdis/webdis

<a href="http://incubator.apache.org/kafka/index.html">http://incubator.apache.org/kafka/index.html</a>

看一下

<a href="http://www.zeromq.org/intro:get-the-software">http://www.zeromq.org/intro:get-the-software</a>

yum search zeromq

查找與zeromq比對的程式

<a href="http://blog.csdn.net/heiyeshuwu/article/details/3453854">http://blog.csdn.net/heiyeshuwu/article/details/3453854</a>

cannot find autoconf. please check your autoconf installation and the

$php_autoconf environment variable. then, rerun this script.

yum install autoconf

如何編寫安裝簡單的php擴充:

reactor:

<a href="http://www.wuzesheng.com/?p=1624">http://www.wuzesheng.com/?p=1624</a>

<a href="http://www.wuzesheng.com/?p=1607">http://www.wuzesheng.com/?p=1607</a>

<a href="http://code.google.com/p/xiao5geproject/source/checkout">http://code.google.com/p/xiao5geproject/source/checkout</a>

<a href="http://hi.baidu.com/charles_zhang/blog/item/5383236dd3ad23f0431694ab.html">http://hi.baidu.com/charles_zhang/blog/item/5383236dd3ad23f0431694ab.html</a>

<a href="http://blog.csdn.net/hackyz/article/details/5027352">http://blog.csdn.net/hackyz/article/details/5027352</a>

<a href="http://hi.baidu.com/zjm1126/blog/item/7a69876d2bf256ee431694c3.html">http://hi.baidu.com/zjm1126/blog/item/7a69876d2bf256ee431694c3.html</a>

redis 2.2和2.4差別:

兩版本差別

<a href="http://zhupan.iteye.com/blog/1310670">http://zhupan.iteye.com/blog/1310670</a>

redis的資料庫鍵值設計

<a href="http://www.mysqlops.com/2011/09/06/redis-kv-design.html">http://www.mysqlops.com/2011/09/06/redis-kv-design.html</a>

1 安裝zeromq

yum install zeromq

apache kafka是一個分布式的訂閱消息系統

通過o(1)的磁盤資料結構提供消息的持久化,這種結構對于即使數以tb的消息存儲也能夠保持長時間的穩定性能。

高吞吐量:即使是非常普通的硬體kafka也可以支援每秒數十萬的消息。

支援通過kafka伺服器和消費機叢集來分區消息。

支援hadoop并行資料加載。

kafka aims to unify offline and online processing by providing a mechanism for parallel load into hadoop as well as the ability to partition real-time consumption over a cluster of machines

kafka的目的在于提供一種讓叢集計算并行的機制來統一離線和線上的消息處理,并且能很好的處理叢集計算的實時消耗問題

kafka提供了一套非常完善的javaapi

kafka也可以從指令行運作

server:

啟動zookeeper server

bin/zookeeper-server-start.sh config/zookeeper.properties

啟動kafka server

bin/kafka-server-start.sh config/server.properties

用戶端:

發送消息:

bin/kafka-console-producer.sh --zookeeper localhost:2181 --topic test

另一個用戶端:

bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

kafka最開始是由linkin公司來使用并發展起來的

kafka主要使用者activity stream and operational data(變化性較大的資料)

比如:

1 feed,内容訂閱

2 一些變化較大的投票和排名等資料

3 網站需要為了安全性在下線的時候能夠進行垃圾網絡爬蟲的搜尋,垃圾郵件的分析等

4 許多網站需要當事情發送的時候有實時的監控并進行報警

5 經常需要叢集系統在下線的時候進行處理,上線的時候進行處理的報告。比如統計等

linkin的結構:

一些工作小收藏