Distributed Cache Technology Redis Learning Series (i) Introduction to--redis and installation on Linux

Source: Internet
Author: User
Tags memcached redis server

Article Home Directory

    • About Redis
    • Installing Redis under Linux
Back to Top about Redis

Redis is one of the NoSQL (no only SQL, non-relational) databases that NoSQL stores data in the form of Key-value. The current mainstream distributed cache technology has REDIS,MEMCACHED,SSDB,MONGODB and so on. Redis can be understood as a caching technique, because its data is cached from it, and it can be understood as a database, because Redis may periodically write data to disk or append operations to a log file. I am personally more inclined to understand the caching technology, because today's Internet application Business complex, high concurrency, big Data features, it is a variety of caching technology to introduce the ultimate goal.

The comparison between Redis and traditional relational data, the comparison of Redis with memcached, and the advantages and disadvantages of Redis are not introduced here, because each has its own advantages, and only a combination of specific business scenarios can profoundly understand the differences and advantages and disadvantages between them. The following begins the installation of Redis on Linux.

Back to Top installing Redis under Linux Download the Redis installation package

: http://redis.io/

Compiling the source program

[Email protected] ftpuser]# tar zxvf redis-3.2.0.tar.gz

[Email protected] ftpuser]# CD redis-3.2.0

[[email protected] redis-3.2.0]# make

[[Email protected] redis-3.2.0]# CD src && make install

Create a directory to hold Redis commands and configuration files

[Email protected] redis-3.2.0]# mkdir-p/usr/local/redis/bin

[Email protected] redis-3.2.0]# mkdir-p/usr/local/redis/etc

Moving Files

[Email protected] redis-3.2.0]# MV Redis.conf/usr/local/redis/etc

[[Email protected] redis-3.2.0]# CD src

[Email protected] src]# mv mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-server Redis-sentinel Redis-trib.rb/usr/local/redis/bin

Start Redis Service

[Email protected] ~]#/usr/local/redis/bin/redis-server/usr/local/redis/etc/redis.conf

As above, the boot Redis service needs to specify the configuration file, the background to start the need to modify the redis.conf file, daemonize no---->daemonize yes. The Redis server default link port is 6379, and it is a good idea to bind IP to a native IP as well.

Verify that startup is successful

[Email protected] ~]# Ps-ef | grep Redis

#或者

[Email protected] ~]# NETSTAT-TUNPL | grep 6379

Client Connections

[Email protected] ~]#/usr/local/redis/bin/redis-cli-h 192.168.2.128-p 6379

192.168.2.128:6379> Info

# Server

redis_version:3.2.0

redis_git_sha1:00000000

...

Stop Redis Service

[Email protected] ~]#/USR/LOCAL/REDIS/BIN/REDIS-CLI shutdown

#或者

[Email protected] ~]# Pkill redis-server

The installation of Redis on Linux is complete, and next we will learn about the common commands and data structures of Redis.

Distributed Cache Technology Redis Learning Series (i) Introduction to--redis and installation on 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.