The concept and creation of Redis database service

Source: Internet
Author: User
Tags redis install redis

Concept

Remote Dictionary Server Key-value database storage System , data structure server.

Key is The string type, the valueof whichcan be a string (String), a hash (MAP), a list ( list), collection (sets) and ordered collection (sorted sets),Hyperloglog type

Create a service

Redis can create four types of services, namely, temporary services, default services, custom services, master-slave services

Temporary services

1 A. Create server: redis-server.exe  redis.windows.conf2 B. Client Connection: Redis-cli.exe-h 127.0.0.1-p 6379     (h:host   p:port)3 C. Close the service: Turn off the DOS window

Default Service

The default service name is RDIs

1 A. Installation Services: Redis-server.exe--service-install redis.windows.conf--loglevel verbose2 B.  Start service: Redis-server.exe--service-start3 c. Client connection: Redis-cli.exe-h 127.0.0.1-p 63794 D. Close service: Redis-server.exe--service-Stop5 E. Uninstall Service: Redis.server.exe--service-uninstall

Custom Services

The difference between custom services and default services is that custom services can customize service names

1 # Customizing a service named Redismaster 2 A. Installation Services: Redis-server.exe--service-install redis.windows.conf--service-name redismaster--loglevel Verbose3 B. Start service: Redis-server.exe--service-start--service-name Redismaster4 C. Client connection: redis.cli.exe-h 127.0.0.1-p 63795 D. Close service: Redis-server.exe--service-stop--service-name Redismast ER6 E. Uninstall Service: Redis-server.exe--service-uninstall--service-name Redismaster

Create a master-slave service

The creation of this service requires two Redis directories, and I name the two directories as tool and Tool1

The master service is created in the tool and created from the service in Tool1

Now create the master-slave service, the primary service is Redismaster, and the service is redisclient

1 #Open a DOS window and enter the Tool1 directory2A. Change from service: Redis.windows.conf:port 6380 slaveof 127.0.0.1 63793 #Go to Tool catalog4B. Installation Master service: Redis-server.exe--service-install redis.windows.conf--service-name redismaster--loglevel verbose5C. Start the main service: Redis-server.exe--service-start--service-name Redismaster6 #Enter the Tool1 directory7D. Installation from service: Redis-server.exe--service-install redis.windows.conf--service-name redisclient--loglevel verbose8E. Start from service: Redis-server.exe--service-start--service-name Redisclient9 #Go to Tool catalogTenF. Client connection Master service: Redis-cli.exe-h 127.0.0.1-p 6379 One #Enter the Tool1 directory AG. Client connection from service: Redis-cli.exe-h 127.0.0.1-p 6380 - #Go to Tool catalog -H. Stop the main service: Redis-server.exe--service-stop--service-name Redismaster theI. Uninstalling the main service: Redis-server.exe--service-uninstall--service-name Redismaster - #Enter the Tool1 directory -J. Stop from service: Redis-server.exe--service-stop--service-name Redisclient -K. Uninstall from service: Redis-server.exe--service-uninstall--service-name redisclient

Redis Installation

Install under Windows

Install under Linux

Install under Ubuntu

The concept and creation of Redis database service

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.