Registering Redis as a local service under Windows

Source: Internet
Author: User
Tags redis version install redis

Current Redis version: 3.2.100

Typically we can start the Redis service with Redis-server.exe and configuration files:

Redis-server.exe redis.windows.conf

Also open a command-line window Redis-cli.exe can do some simple operation command line

But if we close the console, then the Redis service is closed together, and it is inefficient and cumbersome to use the command to restart the Redis service.

There is a concept of local service in Windows, and our goal is to register Redis as a service in this, and then we can not be affected by the exit of the console.

Registering as a local service

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

Seeing that it was successfully authorized and registered successfully, let's go to the Windows service (right-click on the Windows menu-Computer Management-services and applications-services) to see if there is a Redis service:

We were able to find that there was already a lot of service in the computer, and that Redis was in it, which means we were really successful in registering.

At this point we are not allowed to connect with the client because it is not started yet.

Turn on Redis Services

Method One: Select the Redis Item right click-"Start

Method Two:redis-server--service-start

When successful, you can see that the Redis item status becomes running , such as:

Here we can successfully connect to the Redis service with REDIS-CLI.

Order Normalization

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

Delete Service redis-server--service-uninstall

Open service redis-server--service-start

Stop service redis-server--service-stop

Create more than one Redis instance

Step1: Copy a redis.windows.conf configuration file and rename it to redis.windows10001.conf

Step2: Change the information for the redis.windows10001.conf configuration file

Port number port is 10001

Others do not give instructions first

Step3: Registering as a Windows service

Redis-server.exe--service-install redis.windows10001.conf--service-name redis10001--port 10001

As you can see from the Windows service, there are two redis services that were just registered with REDIS10001 and the service is not yet open as shown in:

Registering Redis as a local service under Windows

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.