Play with Redis window installation (dry)

Source: Internet
Author: User
Tags redis version install redis

Distance from the last fixed gc.db frame, long time no update blog, today nothing, I intend to write something about Redis.

Redis is an open source (BSD licensed), memory-stored data structure server that can be used as a database, cache, and Message Queuing agent. It supports data types such as strings, hash tables, lists, collections, ordered collections, bitmaps, hyperloglogs, and so on.

About Redis, everyone is not unfamiliar, online about Redis in Windows and Linux system installation tutorials are also many, but I found many installation tutorials, some too simple, not very comprehensive, so today will be from the window under the redis temporary service, Redis default service installation, Redis Custom service installation, Redis master and slave service installation four sections for system and detailed explanation.

This chapter deals with window only, followed by a variety of installation tutorials on the Linux system for Redis.

This article redis:https://github.com/msopentech/redis/releases, introduced today, the Redis version is Redis3.2.100

After downloading, unzip, you can copy to the corresponding system disk directory according to your needs. I'm here. Win7 is a 64-bit system that is copied to the D:\Program Files (x86) directory.

The following are the 4 types of installation and use mentioned above.

A Redis Temporary service.

Enter the Redis installation package directory to start the temporary service:redis-server.exe redis.windows.conf

Note: With the above command, a Redis temporary service will be created, the Redis service name and status will not appear in the Window service list, and the service will shut down automatically.

Client call: redis-cli.exe-h 127.0.0.1-p 6379

Two Redis default service installation.

Enter the Redis installation package directory, registration service:redis-server.exe--service-install redis.windows.conf--loglevel verbose

Note: With the above command, the "Redis" service appears in the Window service list, but this service is not a startup state and requires the following command to start the service.

Starting service:Redis-server.exe--service-start

Client invocation: Redis-cli.exe-h 127.0.0.1-p 6379

Stop service:redis-server.exe--service-stop

Uninstall Service: Redis-server.exe--service-uninstall

Three Redis Custom Service installation.

Enter the Redis installation package directory, registration service:redis-server.exe--service-install redis.windows.conf--service-name RedisServer1--loglevel Verbose

Note: the "Redisserver1" service appears in the Window service list with the above command, but this service is not a startup state and requires the following command to start the service.

Starting service:redis-server.exe--service-start--service-name RedisServer1

Client call: redis-cli.exe-h 127.0.0.1-p 6379

Stop service:redis-server.exe--service-stop--service-name RedisServer1

Uninstall Service: redis-server.exe--service-uninstall--service-name RedisServer1

Note: In fact, Redis Custom service installation and the default service installation, in fact, the only difference is that the corresponding installation services, startup, shutdown, uninstall services need to add a custom Redis service name. After uninstalling the custom service from the command line, the computer restarts and the uninstall service is complete.

Four. Redis Master Service installation.

Install the master-slave service, in fact, the above Redis installation file package, copy to the corresponding directory, modify the master, from the server configuration file IP, port, and from the server to specify the primary server IP, port, follow the Redis Custom Service installation command for service installation, service startup, service shutdown, Service uninstall is available.

My landlord from the server installation package are still in the D:\Program Files (x86) directory, redis-x64-3.2.100 Primary server, with the local ip:127.0.0.1, production environment can be set according to their actual situation.

The primary server redis.windows.conf is modified as follows:

Port 6379

Modify the following from the server redis.windows.conf:

Port 6380

slaveof 127.0.0.1 6379

To install and start the primary server:

To install, start from the server:

Startup of the master-slave service:

Primary Server Client call: Redis-cli.exe-h 127.0.0.1-p 6379

Calling from the server client: Redis-cli.exe-h 127.0.0.1-p 6380

The above about window under four kinds of installation related to this complete. The following chapters are intended to provide a comprehensive and systematic introduction to WebService, WCF, WEBAPI service installation, client invocation, proxy client invocation, and service-related Microsoft tools, and we hope you will continue to support.

Play with Redis window installation (dry)

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.