Windows installation Redis

Source: Internet
Author: User
Tags strong password install redis

This article installs the install-free version:

1:

Https://github.com/MicrosoftArchive/redis/releases

Download redis-x64-3.2.100.zip

Set Password

Redis.windows.conf:

################################## SECURITY #################################### Require clients to issue AUTH < Password> before processing any other# commands.  This might is useful in environments in which you does not trust# others with access to the host running redis-server.## Thi s should stay commented out for backward compatibility and because most# people does not need auth (e.g. they run their own servers). # warning:since Redis is pretty fast an outside user can try up to# 150k passwords per second against a good Bo X. This means, should# use a very strong password otherwise it'll be very easy to break.## Requirepass Foobaredr Equirepass 123456 that's the code.

Unzip to your directory;

2:

3:

Open a new cmd (do not close the cmd window before) and start the Redis client:

4: Get the value of a key in Redis and prompt for no permissions.

127.0.0.1:6379> Get name  (Error) Noauth authentication required.  

5:

Access via password, using auth + password, as follows:

127.0.0.1:6379> Get name  (Error) Noauth authentication required.  127.0.0.1:6379> auth 123456  OK  127.0.0.1:6379> get name  "OK"  

6, Spring integration of some of the Redis configuration (jedispool Standalone): Spring.xml file configuration jedispool Pool: Java code Collection Code <bean id= "Jedispool" class= " Redis.clients.jedis.JedisPool "> <constructor-arg name=" poolconfig "ref=" Jedispoolconfig "></constr Uctor-arg> <constructor-arg name= "host" value= "${redis.host}"/> <constructor-arg na Me= "Port" value= "${redis.port}" type= "int"/> <constructor-arg name= "Timeout" value= "${redis.timeout}" type= "int"/> <constructor-arg name= "password" value= "#{' ${redis.password} '! = '? ' ${redis.password} ': null} '/> <!--<constructor-arg name= "Database" value= "${redis.db.index}" type= "I NT "/>--</bean> redis.properties configuration file Java Code Collection code #*****************jedis connection parameter Settings ***************        # #redis服务器ip # redis.host=192.168.100.66 #redis服务器端口号 # redis.port=6379 #超时时间: Unit ms# redis.timeout=3000 #授权密码, no password is not set, but the property is to retain # Redis.password=123456 7, if it is not the installation version of Redis, but also want to let Redis self-boot, you can add the self-start service to Windows: 1, go to the installation directory of Redis D:\soft\redis> 2, execute the command: R Edis-server--service-install redis.windows.conf--loglevel notice--service-name redis 3, complete example: D:\soft\redis>re Dis-server--service-install redis.windows.conf--loglevel notice--service-name redis--service-install redis.windows     . conf Specify the Redis profile--loglevel notice Specify the log level--service-name the Redis specified service name runs as follows (Redis successfully installed as a service.): D:\soft\redis>redis-server--service-install redis.windows.conf--loglevel notice--service-name Redis [7176]      Jul 09:34:50.730 # Granting Read/write access to ' NT AUTHORITY\NetworkService ' on: ' D:\soft\Redis ' "D:\soft\Redis\"     [7176] Jul 09:34:50.730 # Redis successfully installed as a service. 4, after the installation of services, the default is not immediately start, but the startup type is self-booting, if you want to start immediately, please execute the command:
The successful start of the Redis-server--service-start service is displayed as follows: [9876] Jul 09:57:41.251 # Redis service successfully started. or restart your computer. Stop service: Redis-server--service-stop 5, remove Redis service: Redis-server--service-uninstall

Windows installation Redis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.