Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

2 Redis startup mode, connect, shut down the service

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Redis startup mode

F: default startup mode, which loads the redis.conf configuration file in the Redis installation folder

R: the complete command is shown in the following figure: redis-server. / redis.conf

Basically, the above startup methods are not often used in development and operation and maintenance, and more examples are used in teaching and demonstration, so it is not recommended to start in this way, let alone in a build environment.

F Mount a configuration file to start

R: the complete command is shown in the following figure: redis-server. / reids_6388.conf

The above startup method can assign and configure the configuration file according to different ports or different services, and then start the service.

Basic DEVOPS activities are to copy some basic configuration files to prevent losses caused by tampering or misoperation of configuration files, so when using Redis, try not to modify the default configuration file redis.conf

F client connection RedisServer

R complete command is as follows redis-cli-h 192.168.1.1-p 63xx as shown in the following figure

-h represents the server ip address where the server is located.

-p represents the port number of the service that is open to the public

If ip: Port number > appears above, the connection is successful, otherwise check whether there is an exception in the port configuration in the configuration file.

F stop the RedisServer service

The complete R command is as follows: shutdown as shown in the following figure

Shutdown has two parameters

SAVE persists the data in the current in-memory database to a file

NOSAVE does not persist

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report