In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the tutorial of installing Redis on Linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the tutorial of installing Redis on Linux.
Sudo is a privilege management mechanism. Administrators can authorize some ordinary users to perform some operations performed by root without knowing the password of root.
First, install Redis
It is generally recommended to use source code for installation. The whole installation can be completed in the following six steps. Take version 3.0.7 as an example.
1. Download the specified version of the source code package of Redis to the current directory
$wget http://download.redis.io/releases/redis-3.0.7.tar.gz
two。 Decompress the Redis source code compression package
$tar xzf redis-3.0.7.tar.gz
3. Establish a soft link to the redis directory to point to redis-3.0.7 (a soft link to the redis directory is established in order not to fix the redis directory on the specified version, which is conducive to future Redis version upgrades)
$ln-s redis-3.0.7 redis
4. Enter the redis directory
$cd redis
5. Compile (make sure the operating system has gcc installed before compilation)
If the gcc command cannot be found when compiling, you can install the gcc command with the following command, where gcc is the compile command for c
$yum install gcc-c++
$make
6. Installation
After the default make, if we start the redis service, we have to go to the installation directory every time, which is very tedious, so we can make and then execute make install, and the generated binaries will be placed in the / usr/local/bin directory, so we can execute Redis commands in any directory.
Note: if an ordinary user needs root permission to execute make install, use sudo make install
$sudo make install
2. Start Redis
We need to set up background startup (foreground startup, need to restart a client to log in, which is very inconvenient)
In the configuration file of redis.conf, make the following changes:
Daemonize no
Modified to:
Daemonize yes
$redis-server redis.conf
3. Close Redis
$redis-cli shutdown
Uninstall Redis
Uninstalling redis is very simple, with only three simple steps
1. Stop the redis server
/ / check whether the redis service is running through the following command
$ps aux | grep redis
/ / stop the redis server with the following command
$redis-cli shutdown
2. Several redisXXX files (/ usr/local/bin/) generated when make is deleted
$rm-rf / usr/local/bin/redis*
3. Delete the extracted file directory and all files
$rm-rf redis
At this point, I believe you have a deeper understanding of the "tutorial on installing Redis on Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.