-
wget http://download.redis.io/releases/redis-5.0.5.tar.gz
-
Create a folder redis
cd /usr/local
mkdir redis -
Decompression
cd ~
tar -xzvf redis-5.0.5.tar.gz -C /usr/local/redis -
Compile it into the directory, compiled with the order to make
cd /usr/local/redis
make -
At this point error
compilation terminated.
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/usr/local/redis-5.0-rc3/src'
make: *** [all] Error 2 -
Installation Development Tools
yum groupinstall 'Development Tools'
-
Wrong or reported above, the solution is as follows
cd /usr/local/redis/redis-5.0.5/deps
make Fredis lua jemalloc linenoise -
And then go make the implementation of the compiler, the following appears content that is success
Hint: It's a good idea to run 'make test' ;)
make[1]: Leaving directory `/usr/local/redis/redis-5.0.5/src' -
The next /redis-5.0.5/src directory
make install
-
Modify the configuration file redis.conf
vim /usr/local/redis/redis-5.0.5/redis.conf
Only a few can be adjusted as follows
protected-mode no # close protection mode, in order to avoid redis be accessed in the public need to open protected mode, if you learn to turn off
daemonize yes # daemon mode is turned on, can run in the background after starting
commented bind 127.0.0.1 # this configuration By default only the native access, comment out the need to access other machines -
Start redis
/usr/local/redis/redis-5.0.5/src/redis-server /usr/local/redis/redis-5.0.5/redis.conf
-
In fact, under the command will copy a few to the next src / usr / local / bin in the implementation of make install, you can also use the following command to start redis
/usr/local/bin/redis-server /usr/local/redis/redis-5.0.5/redis.conf
-
Check to see if the port started successfully
netstat -ltnp | grep 6379
-
Try to connect, execute the following command in any directory
redis-cli
Why you can execute in any directory it? Because redis-cli command in / usr / local / bin directory, and the directory and configured in the PATH, so you could execute like ls, mkdir command, etc. to perform redis-cli or redis-server commands.
CentOS 7 install redis 5.X
Guess you like
Origin www.cnblogs.com/wen-xin/p/11823709.html
Recommended
Ranking