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 > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to install redis6.0.6 in centos7". In daily operation, I believe many people have doubts about how to install redis6.0.6 in centos7. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to install redis6.0.6 in centos7". Next, please follow the editor to study!
1. Download redis
2. Upload to / usr/files
3. Decompress to / usr/local/redis-6.0.6
Tar xzf redis-6.0.6.tar.gz-C / usr/local/redis-6.0.6
4. Enter the unzipped folder
Cd redis-6.0.6
5 、 make
6 、 src/redis-server
If you compile the redis6.0 version under centos7, if the following error occurs
In file included from server.c:30:0:
Server.h:1022:5: error: expected specifier-qualifier-list before'_ Atomic'
_ Atomic unsigned int lruclock; / * Clock for LRU eviction * /
Please check whether the version of gcc is less than 5, and if so, upgrade first, you can use the following command:
Sudo yum install centos-release-scl
Sudo yum install devtoolset-7-gcc*
Scl enable devtoolset-7 bash
Official tutorial
Redis 6.0.6 download-Redis China user Group (CRUG)
7. Configure self-startup
A 、 vim redis.conf
B. Configuration:
# Thread daemon
Daemonize yes
# enable remote arbitrary IP access
# bind 127.0.0.1
# turn off protection mode
Protected-mode no
C 、 vim / etc/init.d/redis
Enter the following:
#! / bin/bash#chkconfig: 22345 10 90#description: Start and Stop redisREDISPORT=6379EXEC=/usr/local/redis-6.0.6/redis-6.0.6/src/redis-serverCLIEXEC=/usr/local/redis-6.0.6/redis-6.0.6/src/redis-cliPIDFILE=/var/run/redis.pidCONF= "/ usr/local/redis-6.0.6/redis-6.0.6/redis.conf" case "$1" instart) if [- f $PIDFILE] Thenecho "$PIDFILE exists,process is already running or crashed" elseecho "Starting Redis server..." $EXEC $CONFfi;;stop) if [!-f $PIDFILE]; thenecho "$PIDFILE does not exist,process is not running" elsePID=$ (cat $PIDFILE) echo "Stopping..." $CLIEXEC-p $REDISPORT shutdownwhile [- x / proc/$ {PID}] doecho "Waiting for Redis to shutdown..." sleep 1doneecho "Redis stopped" fi;;restart) "$0" stopsleep 3 "$0" start;;*) echo "Please use start or stop or restart as first argument"; esac;
D, empowerment
Chmod + x / etc/init.d/redis
E, add to service
Chkconfig-add redis
F, start the service
Chkconfig redis on
G, service list
Chkconfig-list
H. Restart the instance to test whether the self-startup is effective.
At this point, the study on "how to install redis6.0.6 in centos7" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.