Running Redis on Windows 8.1 and Prior | Redis

Screenshot 2018 07 26 10.37.03

Why Windows for Redis?

It ’ s an outdoors secret that more developers code on Windows than any early OS. Every class Stack Overflow shares its developer surveil, and every year Windows is the most popular OS for development, and ocular Studio is the most popular IDE. Of class, there are many ways to slice the data, but it suffices to say A LOT of you reading this mail are using Windows right now. What international relations and security network ’ thyroxine obvious, however, is how to install Redis on Windows so you can develop applications that use Redis. even if you access Redis remotely ( antique : Redis Enterprise Cloud ), you still need a Redis customer compiled for your local anesthetic Windows machine.Today there is one manner to develop with Redis natively on Windows 8.1 ( and earlier versions of Windows ), and that is with an unsupported port of Redis 3.2.1 for Windows .
In separate 1 of this “ Redis on Windows ” series, I explain how to run Redis on Windows 10 via the Windows Subsystem for Linux ( WSL ). In this position, I explain how to run Redis on earlier versions. In a future post, I will explain how to run Redis in a Docker container .

Port of Redis 3.2.1 for Windows

formally, Redis is not supported on Windows. There is, however, a 3.2.1 adaptation of Redis that was ported to Windows by MSOpenTech. It ’ randomness over two years old and has some drawbacks, so the liaison from the redis.io Downloads page has been removed. That said, newer versions of Redis are back compatible, so if you don ’ t need newly commands, then this 3.2.1 version of Redis might work for your growth purposes.

note : There have been many security fixes and other improvements since adaptation 3.2.1, sol I highly recommend against running older versions of Redis in production. This web log stake expects that you want to run Redis on your developer car for exploitation purposes alone. As constantly, you should develop your code on a non-open, trusted network that is behind a firewall .

Download, Install and Run Redis 3.2.1 Port for Windows

  1. Visit the archive MSOpenTech Redis Github repository at hypertext transfer protocol : //github.com/MicrosoftArchive/redis/ .
  2. Scroll down to the “ Redis on Windows ” section and snap on the release page radio link .
  3. Find the latest adaptation ( presently 3.2.100 )
  4. Download and run the .msi file and walk through the Setup Wizard instructions. Accept the Wizard ’ s nonpayment values, but make certain to check the “ Add the Redis facility booklet to the Path environment variable ” checkbox.
    Option # 2 : If you are ineffective to run the Setup Wizard, then follow these steps to install via .zip file. ( note : You may besides download the bifurcate Redis source code and build it to run on your version of Windows, but these steps will not be covered in this web log position ) :
      1. Download the .zip charge to your hard drive .
      2. Unzip the files into any localization, such as ‘ C : Program FilesRedis ’ .
      3. Follow these extra steps to complete the installation of Redis ( Note that these steps are for Windows 7 Professional ; other versions may require different steps ) :
        1. Add the path of your Redis folder as a Windows ‘ environment variable star. ’
          1. Open your “ Control Panel ” application and search for “ Edit the system management variables. ”
          2. Open the “ Environmental Variables ” window .
          3. Under “ User Variables, ” find the varying named “ Path ” and cluck “ Edit. ”
          4. Add “ C : Program FilesRedis ” to the goal of the variable value and click “ OK. ”
          5. If the Path variable doesn ’ t exist, then click “ New, ” add “ C : Program FilesRedis ” and click “ OK. ”
        2. Install Redis as a Windows Service .
          1. Open your Command Prompt ( x : cmd.exe ) .
          2. From your Redis booklet ( x : deoxycytidine monophosphate : Program FilesRedis ) run the comply command :
             > redis-server -- service-install

            note : To uninstall Redis as a Windows Service type :

            > redis-server --service-uninstall
  5. To run Redis 3.2.1 port on Windows 8.1 ( or previous editions ) :
    1. Open your Command Prompt ( antique : cmd.exe ) and type :
       > redis-server -- service-start
    2. The Redis API will create a nonpayment Redis which is fix to accept connections on port 6379. You may now connect to it with the redis-cli.exe file.

      Note: To save and stop the Redis database, type:

      > redis-server shutdown save

      note : To shut down the Redis server, character :

      > redis-server --service-stop
  6. Secure your Redis
    1. security is very important, specially while connected to the Internet. Redis 3.2 is the first version that addresses security by default. This version, and versions after it, have protected mode until the drug user specifies a password or an IP cover. This means that you will only be able to access your Redis from your local machine using 127.0.0.1 or localhost. however, it is constantly a good mind to specify a password and the network addresses which you want to access your Redis .
      • password : The password is set by the arrangement administrator in pass text inside the redis.conf file. Open the file, uncomment the #, and change “ mypassword ” to a very strong and very long value .
        requirepass mypassword
      • Network address : It is besides possible to bind Redis to your laptop by adding a lineage like the following to your redis.conf file :
        bind 127.0.0.1
    2. You should besides read the security page on redis.io to identify the right security configuration for your situation .

Connect to Redis for Windows

  1. Open your Command Prompt ( ex-wife : cmd.exe )
  2. From your Redis booklet ( x : hundred : Program FilesRedis ) run the postdate command :
     > redis-cli ping

    You will get a reception : “ pong ” if the waiter is running .

  3. If you need to connect to Redis across a network, you must type the host name ( or IP address ), such as :
     > redis-cli -h redis15.local.net -p 6739 -a mypassword ping ( or > redis-cli -h 123.456.789.012 -p 6739 -a mypassword ping )
  4. You can besides specify a password, such as :
     > redis-cli -a mypassword ping
  5. To save keyboard clicks, you can establish a continuous session with the Redis server by typing :
     > redis-cli -a mypassword

    now you can equitable type your instruction, such as :

    > ping
  6. For memory and security reasons, it is a good estimate to shutdown Redis when not in use. To save your data and stop Redis, type :
     > redis-cli -a mypassword closure keep open

Summary
now that you have Redis running on your developer machine, you ’ ll want your application to talk to Redis. Check out the Redis clients department on redis.io for a number of Redis client libraries. In particular, look at the C # clients ServiceStack.Redis and StackExchange.Redis .

reference : https://thefartiste.com
Category : Tech

About admin

I am the owner of the website thefartiste.com, my purpose is to bring all the most useful information to users.

Check Also

articlewriting1

Manage participants in a zoom meeting webinar

Call the people who attend the meet as follows Alternate host host Who scheduled the …

Leave a Reply

Your email address will not be published.