1.下載redis的win版客戶端php
下載地址: http://code.google.com/p/servicestack/wiki/RedisWindowsDownloadgit
2.選擇32bit,64bit安裝github
redis-server.exe:服務程序redis
redis-check-dump.exe:本地數據庫檢查數據庫
redis-check-aof.exe:更新日誌檢查apache
redis.conf 配置文件服務器
3.從dos進入安裝目錄運行redis-server.exe redis.conf工具
4.啓動cmd窗口要一直開着,關閉後則Redis服務關閉。另開一窗口,鏈接reids服務器性能
redis-cli.exe -h 202.117.16.133 -p 6379測試
6.php增長reids擴展(php版本要>=5.4)
6.一、先下載 phpredis.dll擴展包。下載地址: https://github.com/nicolasff/phpredis/downloads
用phpinfo 查看到時TS vc9。那麼下載的版本就對應好
二、解壓縮以後獲得兩個文件,分別將兩個文件複製到php 目錄的 ext目錄下。
三、修改php.ini文件。加入extension 擴展
extension=php_igbinary.dll
extension=php_redis.dll
四、 重啓apache ,查看phpinfo 界面。以下則表示安裝成功
五、phpredis hellow word 開始你的redis使用
<?php
$redis
=
new
Redis();
//redis對象
$redis
->connect(
"192.168.60.6"
,
"6379"
);
//鏈接redis服務器
$redis
->set(
"test"
,
"Hello World"
);
//set字符串值
echo
$redis
->get(
"test"
);
//獲取值
?>
|