Centos7 redis-4.0.8 installation process and troubleshooting, centos7redis-4.0.8
Redis-4.0.8 Installation Process
Please install it under the root account.
1. Upload
Use a tool to upload the redis Installation File to/usr/local.
. Decompress
Su-root
Cd/usr/local
Tar-zxvf redis-2.8.19.tar.gz
1. 3. Compile
Cd redis-4.0.8
Make
1.4. Answers to the compilation process
1. make: Warning: A clock error is detected. Your creation may be incomplete.
Solution 1: touch/shttpd/include/shttpd. h
Then re-make
Solution 2: the cause of this problem is that the file to be compiled is later than the current system time, so you can synchronize the current system time
Date-s "yyyy-BB-dd HH: mm: ss"
Update the time to the latest time, and then compile the system. There is no problem that the system time is earlier than the time needed for compilation.
2. error: jemalloc/jemalloc. h: No such file or directory
About the Allocator, the default alloc is MALLOC, which has fewer problems, but if you do not have jemalloc, but only lib, make will have an error.
Solution: make MALLOC = libc
1.5 Installation
After the compilation is successful, install: make install
1.6 Start the server
Cd/usr/local/cd redis-2.8.19
Redis-server redis. conf &
1.7 run
Install the Test Service and run the client: redis-cli
1.8 common redis commands
Redis> ping
PONG
Redis> set foo bar
OK
Redis> get foo
"Bar"
Redis> incr mycounter
(Integer) 1
Redis> incr mycounter
(Integer) 2
Redis>