Redis server commands in Linux

Source: Internet
Author: User
Tags redis server

Introduction:

Common commands

1. Start without Configuration

 
Src/redis-Server

2. Start with configuration

 
Src/redis-server redis. conf

3. Start with configuration and logs

 
Src/redis-server redis. conf 1> log. log 2> errlog. Log

1 is the standard output, 2 is the error output

4. redis is started with Linux

In VI/etc/rc. Local, addCode:

 
/Root/install/redis-2.4.9/src/redis-Server

5. Client Connection

 
Src/redis-cli

6. Stop the redis Service

 
Src/redis-cli Shutdown

Other operation commands, including addition, deletion, modification, and query

1. retrieve all the currently matched keys

 
Keys *

2. Whether the current key exists

 
Exists Larry

3. Delete the current key

 
Del LV

4. Set the expiration time

 
Expire

5. Rename the key

 
Rename

6. Clear the current database

 
Flushdb

7. Get server parameter configuration

 
Config get

8. Exit the connection.

 
Quit

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.