windows下安裝redis以及redis擴充,設定redis為windows自啟服務

來源:互聯網
上載者:User

標籤:nap   logs   class   add   服務端   dos命令   set   lin   color   

indows下安裝reids

windows下redis:https://github.com/MSOpenTech/redis/releases。

啟動redis服務:在redis目錄下啟動DOS命令,然後redis-server.exe

這時候另啟一個cmd視窗,原來的不要關閉,不然就無法訪問服務端了。

切換到redis目錄下運行 redis-cli.exe -h 127.0.0.1 -p 6379

設定索引值對 set myKey abc

取出索引值對 get myKey

 

安裝擴充

根據phpinfo()查詢自己的版本選擇擴充版本

http://blog.163.com/fan_xy_qingyuan/blog/static/1889877482014111111283265/

php_redis.dll:http://windows.php.net/downloads/pecl/snaps/redis/2.2.5/

將下載解壓後的php_redis.dll放入php的ext目錄下 

 然後修改php.ini,加入

  1. ; php-redis
  2. extension=php_igbinary.dll
  3. extension=php_redis.dll

 設定redis為windows自啟服務

Redis是可以安裝成windows服務的,開機自啟動,命令如下:

redis-server --service-install redis.windows.conf

安裝完之後,就可看到Redis已經作為windows服務了:

但是安裝好之後,Redis並沒有啟動,啟動命令如下:

 

redis-server --service-start

停止命令:

redis-server --service-stop

windows下安裝redis以及redis擴充,設定redis為windows自啟服務

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.