Redis Database Installation Configuration

Source: Internet
Author: User
Tags redis

First, Redis Introduction

Redis is one of the most popular NoSQL systems today, and it is a key-value storage system. Similar to memcache, but largely compensates for the lack of memcache, which supports storing more value types, including string, list, set, Zset, and hash. These data types support Push/pop, Add/remove, and intersection sets and differences, and richer operations. Based on this, Redis supports sorting in a variety of different ways.

Like Memcache, Redis data is cached in the computer's memory, except that memcache can only cache data in memory and not automatically write to the hard disk periodically, which means that a power outage or restart, memory emptying, and data loss. So Memcache's application scenario is for caching data that does not need to be persisted. The difference between redis is that it periodically writes the updated data to the disk or writes the modified operation to the appended record file, which makes the data persistent.



#redis官网: http://www.redis.cn/

#下载解压redis

wget http://download.redis.io/releases/redis-3.2.4.tar.gz

TAR-ZXF redis-3.2.4.tar.gz

#编译安装

Make

CD src

Make install

#为了方便管理, move the Conf configuration file and common commands in the Redis file to a unified file

Mkdir-p/usr/local/redis/bin

Mkdir-p/usr/local/redis/etc

Mv/data/tool/redis-3.2.4/redis.conf/usr/local/redis/ett

cd/data/tool/redis-3.2.4/src/

MV mkreleasehdr.sh Redis-benchmark Redis-cli redis-server/usr/local/redis/bin/

#将daemonize属性改为yes (indicates the need to run in the background)

Sed-i ' s/daemonize no/daemonize yes/g '/usr/local/redis/etc/redis.conf

#开发远程连接

Sed-i ' s/bind 127.0.0.1/bind 0.0.0.0/g '/usr/local/redis/etc/redis.conf


#启动redis服务, specify the Startup service profile: redis-server/usr/local/redis/etc/redis.conf

#检查启动进程: Ps-ef | grep Redis

#启动客户端:/USR/LOCAL/REDIS/BIN/REDIS-CLI

#关闭redis服务: Pkill redis-server


Redis Database Installation Configuration

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.