Install Redis in Linux
Prepare to install and run the command:
tar zxvf redis-3.0.4.tar.gz
Enter the decompressed Folder:
cd redis-3.0.4
Compile source code:
make
If the following error occurs:
[root@localhost redis-3.0.4]# makecd src && make allmake[1]: Entering directory `/root/redis-3.0.4/src‘ CC adlist.o/bin/sh: cc: command not foundmake[1]: *** [adlist.o] Error 127make[1]: Leaving directory `/root/redis-3.0.4/src‘make: *** [all] Error 2
You need to install gcc
If the following error occurs:
[root@localhost redis-3.0.4]# makecd src&& make allmake[1]: Entering directory `/root/redis-3.0.4/src‘ CC adlist.oIn file included from adlist.c:34:zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directoryzmalloc.h:55:2: error: #error "Newer version of jemalloc required"make[1]: *** [adlist.o] Error 1make[1]: Leaving directory `/root/redis-3.0.4/src‘make: *** [all] Error 2
Change the make commandmake MALLOC=libc
Install
After the installation is complete, run make install. The execution file is copied to/usr/local/bin,
You need to manually copy the configuration file'
cp redis.conf /usr/local/bin
Start the server:
./redis-server redis.conf
Start the client:
./redis-cli
You may also like the following articles about Redis. For details, refer:
Install and test Redis in Ubuntu 14.04
Basic configuration of Redis master-slave Replication
Redis cluster details
Install Redis in Ubuntu 12.10 (graphic explanation) + Jedis to connect to Redis
Redis series-installation, deployment, and maintenance
Install Redis in CentOS 6.3
Learning notes on Redis installation and deployment
Redis. conf
Redis details: click here
Redis: click here
This article permanently updates the link address: