My Linux system is: RedHat [root @ infa ~] # Wgethttp: // download. redis. io/releases/redis-2.8.12.tar.gztarxzfredis-2.8.12.tar.gz [root @ infa ~] #Tarxzfredis-2.8.12.tar.gz [root @ infa ~] # Cdredis-2.8.1
My Linux system is: RedHat
[Root @ infa ~] # Wget http://download.redis.io/releases/redis-2.8.12.tar.gz
Tar xzf redis-2.8.12.tar.gz
[Root @ infa ~] # Tar xzf redis-2.8.12.tar.gz
[Root @ infa ~] # Cd redis-2.8.12
[Root @ infa redis-2.8.12] # ls
00-RELEASENOTES bugs contributing copying deps INSTALL Makefile manifesto readme redis. conf runtest-sentinel. conf src tests utils
[Root @ infa redis-2.8.12] # make
However, an error occurs during compilation, which may be caused by the system;
The following error is reported:
The solution is to add the compilation parameter settings as follows:
[Root @ infa redis-2.8.12] # make CFLAGS = "-march = i686"
Compiled successfully;
Start and run redis:
[Root @ infa redis-2.8.12] # src/redis-server
Open another terminal to run, redis Client
[Root @ infa redis-2.8.12] # src/redis-cli
127.0.0.1: 6379> set name chenzhou
OK
127.0.0.1: 6379> get name
"Chenzhou"
Wagner. 0.0.1: 6379>
Appendix 2: Start Redis as a Linux Service
Only one simple method is provided here. It is best to compile the boot script.
To start redis at startup, we need to set redis to daemon background startup (if not set to background startup, the graphic interface will be stuck on a blank page after linux is started ), redis only has one startup parameter, which is the configuration file path of redis. The default configuration file redis. conf of redis is located in the installation directory of redis. We can copy the file to the/etc directory.
Shell code
1 [root @ localhost redis-2.6.14] # cp redis. conf/etc/
The value of the daemonize parameter in the default configuration file of redis is no, which indicates that it is not started in the background. Therefore, we need to change the value of this parameter to yes. As for other parameters here is not detailed, see: http://www.linuxidc.com/Linux/2015-05/117282.htm
After modifying the daemonize parameter, redis can be started in daemon mode. The next step is to add redis to the linux Startup service configuration. The specific steps are as follows:
Use the VI editor to open the Linux Startup service configuration file/etc/rc. local, and add the following code to it:
Shell code
2/usr/local/redis-2.6.14/src/redis-server/etc/redis. conf
After editing, save and restart the system.
Stop the Redis service:
Shell code
3src/redis-cli shutdown
Install and test Redis in Ubuntu 14.04Http://www.linuxidc.com/Linux/2014-05/101544.htm
Redis cluster details document http://www.linuxidc.com/Linux/2013-09/90118.htm
Ubuntu 12.10 install Redis (graphic details) + Jedis connection Redis http://www.linuxidc.com/Linux/2013-06/85816.htm
Redis series-installation, deployment, maintenance http://www.linuxidc.com/Linux/2012-12/75627.htm
CentOS 6.3 install Redis http://www.linuxidc.com/Linux/2012-12/75314.htm
Redis installation deployment learning notes http://www.linuxidc.com/Linux/2014-07/104306.htm
Redis configuration file redis. conf detailed description http://www.linuxidc.com/Linux/2013-11/92524.htm
Redis details: Click here
Redis: Click here
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-05/117281.htm