In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "how to install redis in linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install redis in linux.
How to install redis in linux
1.redis installation mode
Yum installation (yum source is configured in advance)
Yuminstallredis-y#
Source code compilation and installation
Manual installation of rpm package
two。 Compile and install redis
Create a folder and save redis (or you don't have to create it)
Mkdirlinux_redis
Cdlinux_redis
1. In the redis directory, download the redis source code package
Wget http://download.redis.io/releases/redis-4.0.10.tar.gz
two。 Decompress the redis source code packet
3. Compile trilogy
Specify the installation path and generate the makefile compilation file
. / installation path of configure--prefix=redis
Start compilation
Make
Compilation and installation
Makeinstall
When compilation is complete, redis commands that can be used are generated by default
/ usr/local/bin/redis-server
4. Modify the redis configuration file to support a more secure startup mode
Vimredis.conf
# parameters for opening redis password
Requirepass123456789
# enable safe mode
Protected-modeyes
# modify the default startup port and binding address of redis
Bind0.0.0.0
Port6800
# filter out the contents of non-blank lines and comment lines, and redirect write to a file
Grep-v "^ $" redis.conf | grep-v "^ #" > linuxredis.conf
# add background startup parameters at the end of the configuration file
Daemonizeyes
5. Start the redis server
Redis-serverlinuxredis.conf
6. Verify that redis is started
Netstat-tunlp | grepredis
Ps-ef | grepredis
7. Specify password to log in to redis
[root@localhostredis-5.0.7] # redis-cli-p6800
127.0.0.1purl 6800 > ping
(error) NOAUTHAuthenticationrequired
127.0.0.1purl 6800 > auth223456789
OK
127.0.0.1purl 6800 > ping
PONG
At this point, I believe you have a deeper understanding of "how redis is installed in 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.