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

Example of how to judge and start the basic installation of redis

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is to share with you about the basic installation judgment of redis and the examples of how to launch it. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

The basic installation judgment and startup method of redis are as follows:

1. Whether Redis is installed or not (the following code will appear after installation)

[root] $whereis redis-cliredis-cli: / usr/local/bin/redis-cli [root] $[root] $whereis redis-serverredis-server: / usr/local/bin/redis-server

2. Start Redis

Enter code

Redis-server & 30733 Warning C 09 Dec 1415 Warning 30.876 #: no config file specified, using the default config. In order to specify a config file use redis-server / path/to/redis.conf30733:M 09 Dec 14:45:30.879 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.30733:M 09 Dec 14:45:30.879 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.30733:M 09 Dec 14:45:30.879 # Current maximum open files is 4096. Maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit-nasty. [root] $_. _ _.-``_' -. _.-```. `_. '' -. _ Redis 3.2.0 (00000000Universe 0) 64 bit.-``.- ```. ```\ / _., _'-. _ (.-`|` ) Running in standalone mode | `-. _`...-.`` -. _ |'`_. -'| Port: 6379 |` -. _ `. _ / _. -'| PID: 30733` -. _ `-. _`. / _. -'_. -'| `-. _. -'_ _. -'_. -'| |` -. -. _. -'_. -'| http://redis.io `-. _` -. _ `. _. -'_'|` -. _ `-'_. -'_. -'|` -. _ `-. _. -'|` -. _. -'`-. _` -. _ _. -'`-. 30733 Dec M 09 Dec 144530.900 # WARNING: The TCP backlog setting of 511 cannot be enforced because / proc/sys/net/core/somaxconn is set to the lower value of 128.30733M 09 Dec 14Switzerland 4530.900 # Server started Redis version 3.2.030733:M 09 Dec 14:45:30.901 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory=1' to / etc/sysctl.conf and then reboot or run the command' sysctl vm.overcommit_memory=1' for this to take effect.30733:M 09 Dec 14purl 45 etc/sysctl.conf and then reboot or run the command 30.901 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > / sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your / etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.30733:M 09 Dec 14 The server is now ready to accept connections on port 45 30. 902 * The server is now ready to accept connections on port 6379

3. Determine whether Redis is started

[root] # redis-cli-p 6379127.0.0.1 pingPONG127.0.0.1:6379 > Thank you for reading! This is the end of this article on "redis basic installation judgment and startup usage examples". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

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

Wechat

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

12
Report