(但需佔用些許CPU Loading)

<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php


您也可以使用源瑪安裝

接者我們試圖啟動 memcached
[參數說明]
-d 表示這是daemon,
-m 表示會使用幾MB的記憶體來存放資料,
-l表示會listen的IP位址,
-p則是所listen的port,
-u 啟動的user為誰,由於memcached預設不可以由root來啟動,
所以你如果要用root來啟動,就要加。
-c 同時間可以有多少個connection。
/usr/local/bin/memcached -d -u root -m 30 127.0.0.1 -p 11211
*您可以寫成一個sh讓開機時自動起用memcached
*下圖我們察知11211 已經On 起來此Port可自定memcached 使用Port號*
由於筆者使用"remi"套件升級apache 2.2.3 & php 5.3 常發生預期設定須更正問題
(問題一) PHP Warning: strtotime(): It is not safe to rely on the system's
timezone settings.You are *required* to use the date.timezone
settingorthe date_default_timezone_set() function. ....
等Messages
解: vi /etc/php.ini
請將此行前方; 去掉並修改為 date.timezone = "Asia/Taipei"

(問題二)重新啟動Apache 時出現"FQDN"沒對應這確訊息
解 : vi /etc/httpd/conf/httpd.conf
#原來升級到PHP 5.3時, ServerName 此選項預設被 ";"被註解掉
所以我們必須將";" 去掉,並修改成 ServerName localhost:80 即可

(二) memcache 擴展程式安裝 :
tar -zxvf memcached-3.0.4.tgz
cd memcached-2.2.4
phpize && ./configure --enable-memcache && make
*注意是否已安裝php-devel,若無是無法使用phpize這隻程式l*
make install
接者我們編輯 /etc/php.ini 於Dynamic Extension 下插入此行後,
並重新啟動apache server
extension=memcache.so
shell> php -i | grep -i 'memcache'
#利用此指令查驗mechache 是否已載入

shell> php -i | grep -i 'memcache'
memcache support => enabled # PHP對memcache 的support 已啟動
最後我們測試Memcached 是否正常運行,編輯Test.php,並且執行
vi test.php
<?php
$memcache = new Memcache;
$memcache->connect('127.0.0.1', 11211); #port號請修改成自己設定的port
$stats = $memcache->getStats();
foreach ($stats as $key => $val) {
echo "$key : $val\n";
}
?>
LAB參考資料
http://blog.xuite.net/chingwei/blog/21360187
http://blog.xuite.net/chingwei/blog/21360187