Redis-related commands

Source: Internet
Author: User
Tags redis server
Link command

1. Do not specify a port link: redis-cli-h IP (default 6379 port)

2. Specify port Link: redis-cli-h ip-p 26379 (Redis server is open to port 26379)

3. Specify the port and password: redis-cli-h ip-p 26379-a xxxxxxxxxxxxx (the Redis server is open to Port 26379, and the Redis server is set with a password)-A for the Redis password

Start, close, restart command

Redis starts differently depending on how it is installed

Compiling the installation

Start command:./redis-server path (path means the configuration file path for Redis, default configuration if no path is used)

Close command: redis-cli-h ip-p port shutdown, you can also find the process number of the Redis (ps-a| grep redis-server), then kill the process (kill-9 ProcessID)

YUM/APT Installation

Start/restart command:/etc/init.d/redis-server start/restart

Close command:/etc/init.d/redis-server stop

Redis-related commands

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.