Home  >  Article  >  Backend Development  >  Example introduction of Redis packaging library

Example introduction of Redis packaging library

零下一度
零下一度Original
2017-06-23 15:59:181525browse
  1. Download Redis


    1. ##Modify Redis.windows.conf, if not Modification, remote access to Redis

      1. ##changed

        bind 127.0.0.1 to bind 0.0.0.0. Note: When entering the production environment, you must enable the password, otherwise it will be a Redisvulnerability.

      2. protected-mode yes
      3. Changed to

        protected-mode no

    Add reference
    1. RedisDB
    Add NuGet
    1. RedisSessionProvider
    2. Update StackExchange.Redis
    Modify configuration file
    1.  <connectionStrings>
      <!-- 配置远程redis地址-->
             <add name="RedisExchangeHosts" connectionString="127.0.0.1:6379,allowadmin=true" />
        </connectionStrings>
    2.  <appSettings>
      <!-- 配置目录-->
          <!--<add key="redisKey" value="Demo:test:" />-->
      </appSettings>
    3. ##     

Attachment:

The above is the detailed content of Example introduction of Redis packaging library. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn