Installation and deployment of Redis3.2 under Linux

Source: Internet
Author: User
Tags download redis memcached node redis redis server

About Redis:

Redis is a key-value storage system. Similar to memcached, it supports storing more value types, including string (string), list (linked list), set (set), Zset (sorted set-ordered collection), and hash (hash type). These data types support Push/pop, Add/remove, and intersection-set and difference sets, and richer operations, and these operations are atomic. Based on this, Redis supports sorting in a variety of different ways. As with memcached, data is cached in memory to ensure efficiency. The difference is that Redis periodically writes the updated data to disk or writes the modified operation to the appended record file, and Master-slave (Master-Slave) synchronization is implemented on this basis.

Redis is a high-performance Key-value database. The emergence of Redis, to a large extent, compensates for the lack of memcached such key/value storage, in some cases can be a good complement to the relational database. It provides clients such as Java,c/c++,c#,php,javascript,perl,object-c,python,ruby,erlang, which is convenient to use. [1]

Redis supports master-slave synchronization. Data can be synchronized from the primary server to any number of slave servers, from the server to the primary server that is associated with other slave servers. This enables Redis to perform single-layer tree replication. You can write to the data intentionally or unintentionally. Because of the full implementation of the publish/subscribe mechanism, you can subscribe to a channel and receive a complete message release record from the master server when the tree is synchronized anywhere from the database. Synchronization is helpful for the scalability and data redundancy of read operations.

Redis is an open source, Key-value database, written in C, that supports network interaction and can be memory-based and persistent.

Redis's official address, very good remember, is Redis.io. (specifically checked, the domain name suffix io belongs to the national domain name, is British Indian ocean Territory, namely British Indian Ocean Territory)

Currently, VMware is funding the development and maintenance of REDIS projects.


One

Redis Installation and Deployment:

1, First officer network Download Redis compressed package, address: Http://redis.io/download Download stable version redis-3.0.2.tar.gz after uploading to Redis server

2, decompression and installation to the specified directory

TAR-ZXVF redis-3.2.0.tar.gz
CD redis-3.2.0

[[email protected] redis-3.2.0]# make Prefix=/data/app/redis Install

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

[Email protected] redis]# cd/data/app/redis/
[[email protected] redis]# mkdir {conf,db,logs}
[Email protected] redis]# CD conf/
[Email protected] conf]# cp/tmp/redis-3.2.0/redis.conf.

3. Modify configuration (single-node Redis service configuration)

The following configuration is mostly modified, if it is a master-slave configuration in addition.

Pidfile/var/run/redis.pid
Port 6380
LogFile "/data/app/redis/logs/redis_test_6380_m.log"
Dbfilename Redis_test_6380_m.rdb
dir/data/app/redis/db

4. Start Redis

Note: The Redis service, which executes the redis-server boot directly, is run directly in the foreground (as an effect), that is, if LUnix closes the current session after executing the command, the Redis service is closed. Under normal circumstances, starting the Redis service requires booting from the background and specifying a startup configuration file.

5. Back-up Redis service

First edit the Conf file, change the Daemonize property to Yes (indicating that you need to run in the background)

cd/data/app/redis/conf/

Vim redis_test_6380_m.conf

Nohup start the Redis service and specify the Startup service profile (if many Redis instances can edit scripts)

Nohup/data/app/redis/bin/redis-server/data/app/redis/conf/redis_test_6380_m.conf &

How many Redis ports are started on the statistics system:

Ps-ef|grep Redis |grep-v grep |awk-f: ' {print $NF} ' |sort-rn

6. Write into system variables

Export Path=/data/app/redis/bin: $PATH

Source/etc/profile immediate effect

7. Testing

[Email protected] redis]# redis-cli-p 6380
127.0.0.1:6380>
127.0.0.1:6380>
127.0.0.1:6380> keys *
(empty list or set)
127.0.0.1:6380>

#安装结束

Stay tuned for Redis monitoring. O (∩_∩) o haha ~








This article is from the "7835882" blog, please be sure to keep this source http://crfsz.blog.51cto.com/7835882/1887617

Installation and deployment of Redis3.2 under Linux

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.