In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to start redis linux, the article is very detailed, has a certain reference value, interested friends must read!
1. First of all, for the convenience of management, move the conf configuration file and common commands in the Redis file to the unified file.
(1) Create bin and redis.conf files, copy the code "mkdir -p/usr/local/redis/bin;mkdir -p/usr/local/redis/ect";
(2) Execute the Linux file move command and copy the code "mv /lamp/redis-3.0.7/redis.conf /usr/local/redis/etc;cd /lamp/redis-3.0.7/src;mv mkreleasdhdr.sh redis-benchmark redis-check-aof redis-check-dump redis-chli redis-server /usr/local/redis/bin";
2. Execute the Redis-server command to start the Redis service.
Note: The Redis service started by Redis-server is directly executed here, which runs directly in the foreground (the effect is as shown in the figure above). That is to say, after executing this command, if Liunx closes the current session, the Redis service will also be closed immediately. Under normal circumstances, starting Redis services requires starting from the background and specifying a startup profile.
3. Start redis service in background.
(1) First edit the conf file, change the daemonize attribute to yes (indicating that it needs to run in the background), and the code is cd etc/;Vi redis.conf;
(2) Start the redis service again and specify the startup service configuration file with the code redis-server /usr/local/redis/etc/redis.conf;
4. After the server is successfully started, execute redis-cli to start the Redis client and check the port number.
Summary Linux, Redis operation common command
1. Linux: cd /usr is to enter the parent folder usr from the child folder;cd local is to go from parent to child;mv /A /B is to move the file A to B;vi usr/local/redis/redis.conf is to edit the redis.conf file;
2、Redis:Redis-server /usr..../ redis.conf is to start the redis service and specify the configuration file;Redis-cli is to start the redis client;Pkill redis-server is to shut down the redis service;Redis-cli shutdown is to shut down the redis client: Netstat -tunpl| grep 6379 is to check the occupancy of redis default port number 6379.
Here's how linux starts redis, thanks for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.