Redis installation under Linux

Source: Internet
Author: User
Tags blank page

I use the system is: Redhat

[Email protected] ~]# wget http://download.redis.io/releases/redis-2.8.12.tar.gz

Tar xzf redis-2.8.12.tar.gz

[Email protected] ~]# tar xzf redis-2.8.12.tar.gz

[Email protected] ~]# CD redis-2.8.12

[[email protected] redis-2.8.12]# ls

00-releasenotes BUGS contributing COPYING deps INSTALL Makefile MANIFESTO README redis.conf runtest Runtest-sen Tinel sentinel.conf src tests utils

[[email protected] redis-2.8.12]# make

But this kind of compile will error, seemingly because of the system reasons;

The error is as follows:

The workaround is to add the compile parameter settings as follows:

[email protected] redis-2.8.12]# make cflags= "-march=i686"

Compile successfully;

To start and run Redis:

[Email protected] redis-2.8.12]# Src/redis-server

Open another terminal to run, Redis client

Note: It is recommended to use the Redis client to test, or use Xshell, CRT prone to problems

[Email protected] redis-2.8.12]# SRC/REDIS-CLI

127.0.0.1:6379> Set name Chenzhou

Ok

127.0.0.1:6379> Get Name

"Chenzhou"

127.0.0.1:6379>

Attachment 2: Booting the Redis as a Linux service this provides only one of the simplest ways to do this, preferably by writing a boot-up script. If you want to boot up redis, we need to set up Redis as daemon background boot (if not set to background boot, the GUI will be stuck on a blank page after Linux boot), and Redis has only 1 startup parameters, which is the Redis profile path. The default profile for Redis is redis.conf in the Redis installation directory. We can copy the file to/etc Directory Shell code  1[[email protected] redis-2.6.14]# CP redis.conf/etc/  The value of the Daemonize parameter in the default configuration file for Redis is no, which means no background boot, so we need to modify the value of this parameter to Yes. As for the other parameters are not detailed here, specifically, see: http://blog.csdn.net/htofly/article/details/7686436 after modifying the daemonize parameter, Redis will be able to boot through the daemon mode, then the next step is to add Redis to the Linux boot service configuration, the following steps: Open the Linux boot service configuration file using the VI editor/etc/ Rc.local, and add the following line of code to it: Shell code  2/usr/local/redis-2.6.14/src/redis-server/etc/redis.conf  saved after editing, Then rebooting the system will be OK. Stop Redis Service: Shell code  

Redis installation under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.