In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to install Redis database on Linux system. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Installation
Add path
# mkdir data# cd data
download
Wget http://download.redis.io/releases/redis-6.0.8.tar.gz
Decompression
Tar xzf redis-6.0.8.tar.gz
Installation
Enter the make command and proceed to step 4.1 if you find an error, otherwise continue to 5
Make
4.1 make error report
Redis is implemented in C and needs gcc to compile, so the reason is that the system does not have gcc installed:
Yum install-y gcc gathers + gcc-c++ make
Upgrade gcc
Yum-y install centos-release-sclyum-y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutilsscl enable devtoolset-9 bash
Continue make success
Start the service
# cd src#. / redis-server
The following indicates that the startup is successful
However, after CRTL+C exits, the process is closed and cannot be accessed.
Background access
Let redis run in the background and change the redis.config file daemonize to yes, that is, it runs in daemon mode by default.
Vim reids.conf
Enter the configuration file, press I to edit, esc quit editing after modification, and save: wq
Restart successfully. / redis-server.. / redis.conf
Client access
[root@huangxh redis-6.0.8] # cd src [root@huangxh src] #. / redis-cli127.0.0.1:6379 > set key hellowordOK127.0.0.1:6379 > get key "helloword" 127.0.0.1 root@huangxh src 6379 > remote access
Access command
$redis-cli-h {redis_host}-p {redis_port}
Discovery access failed
E:\ live\ learn\ setup\ Redis-x64-3.2.100 > redis-cli-h 121.199.8.168-p 6379Could not connect to Redis at 121.199.168. 168: 6379: unable to connect because the target computer actively refused.
If it is an Ali CVM, you need to open the Ali Cloud security group port.
Turn on remote access settings
Remove the bind that only supports local access
Set the password (because the password will definitely be set, protected-mode will automatically be no, so there is no need to set the protection mode to no. If you do not need to set a password and comment out bind, set the protected mode to no)
Then visit and find success.
For password access, enter redis-cli-h 121.199.8.168-p 6379121.199.8.168-168-p 6379-a password121.199.8.168:6379 > below for password access. Thank you for reading! This is the end of this article on "how to install Redis database under Linux system". 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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.