轉:Windows下PHP7安裝Redis和Redis擴充phpredis

來源:互聯網
上載者:User

標籤:完成   ack   arc   zip   --   blank   server   php7   info   

原文地址:Windows下PHP7安裝Redis和Redis擴充phpredis

Windows下PHP7安裝Redis和Redis擴充phpredis2016-06-08 17:53:00標籤:redis環境

    ?Win7 64位

    Apache2.4?

    PHP 7.0.7?

版本

    Redis 3.2

下載

    Redis下載

        https://github.com/MSOpenTech/redis/releases?

        下載Redis-x64-3.2.100.zip?這個版本,有更新的下載更新的

        備用下載

         http://download.csdn.net/download/u010006309/9437676?

    PHP的redis擴充:

        地址:http://pecl.php.net/package/redis?

        php5.6:?http://pecl.php.net/package/redis/2.2.7/windows

        下載版本:?5.6 Thread Safe (TS) x64?

        php7.0:http://pecl.php.net/package/redis/3.0.0/windows?

        下載版本:?7.0 Thread Safe (TS) x64

    2

        https://github.com/neil-chen/NeilChen/tree/master/php_redis??

安裝redis

將下載下來的Redis-x64-3.2.100.zip解壓到E:\dev\redis

然後在命令列執行?

redis-server.exe --service-install redis.windows.conf --loglevel verbose?

安裝完成

啟動redis

    net start redis

停止redis

    net stop redis?

安裝phpredis???

?1、將解壓出來的php_redis.dll放到php擴充目錄E:\dev\php70\ext下面

?2、在php.ini中增加extension=php_redis.dll

3、重啟apache

4、測試,下面的代碼請自己敲,複製過去可能有問題

$redis = new \Redis();

$redis->connect(‘127.0.0.1‘, 6379);

$redis->set(‘userName‘,‘tomener‘);

echo $redis->get(‘userName‘);??

轉:Windows下PHP7安裝Redis和Redis擴充phpredis

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.