Due to the long time interval, different machine environments and other reasons, so every time you install redis is not always so smooth, so this time I want to make a note of
Most of the article content from https://blog.csdn.net/gisredevelopment/article/details/50234737
1, first with the command: gcc -v to check whether the linux gcc is installed
if it is not installed sequentially executed in accordance with the following commands
yum install cpp yum install binutils yum install glibc yum install glibc-kernheaders yum install glibc-common yum install glibc-devel yum install gcc yum install make
2, to redis official website to download the latest stable version of the package redis: HTTPS: //redis.io/download
3, create two folders: redis used to store configuration files and startup files, this step is flexible in terms of steps for the master .
mkdir -p / usr / local / redis / etc store configuration files mkdir -p / usr / local / redis / bin storage startup file
4, install redis
Unzip the downloaded installation package redis, cd into the src directory and execute make command execution
make PREFIX=/usr/local/redis/bin install
At this point you may encounter two common errors:
The first error: sh: ./mkreleasehdr.sh: Permission denied Solution: insufficient privileges, execute in the src directory: chmod 777 /mkreleasehdr.sh second error: error: jemalloc / jemalloc.h: No such file or directory solution: perform the src directory: make MALLOC = libc
At this point you can see more than 7 profiles under / usr / local / redis / bin directory. Then redis directory redis.conf copied to / usr / local / redis / etc by cp command
5, start redis
Into the / usr / local / redis / bin directory, ./redis-server command execution, as shown below:
Redis service started successfully.
6, set a password:
performed under / usr / local / redis / bin directory ./redis-cli into the redis client
Query redis Password: config get requirepass
set redis password for root: config set requirepass root
certification landing redis: auth root