Issues encountered during Redis installation

Source: Internet
Author: User
Tags failover install redis

Normal.

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

Unzip

TAR-ZXVF redis-3.0.7.tar.gz

CD redis-3.0.7

It's all very normal. Nothing to say, mainly below, after entering into the redis-3.0.7 directory, if the execution

Make

Make install will install Redis to/usr/local/bin/redis by default

But I'm just a normal redis user, and I don't want to give him sudo permission and don't want to do it with root.

The method is:

bash-4.1$ prefix=/opt/Redis Makebash-4.1$ prefix=/opt/Redis make INSTALLCD src&&Make installmake[1]: Entering directory '/opt/redis/redis-3.0.7/src'Hint:it's a good idea to run'Make Test' ;)Install Install install install install install install the Install install installmake[1]: Leaving directory '/opt/redis/redis-3.0.7/src'bash-4.1$ pwd/opt/redis/redis-3.0.7Bash-4.1$ CD. Bash-4.1$ ls-Alltotal1368drwxr-xr-x5Redis Redis4096May -  +: in. DRWXR-xr-x8Root root4096May -  +: - .. DRWXR-xr-x2Redis Redis4096May -  +: inBINDRWXR-xr-x6Redis Redis4096Jan -  A: $redis-3.0.7-rw-r--r--1Redis Redis1375200May -  +: -redis-3.0.7. tar.gzdrwx------2Redis Redis4096May -  +: -. SSH

Assign to the directory you want to install and you're done.

Next set up the master and the Sentinel

Master (Master) profile

1 vi/opt/redis/6000/6000. conf2360004 daemonize Yes 5 appendonly Yes 6 "" 7 slave-read-only Yes

Create a 6000 folder yourself in the Redis directory

Salve (from) configuration file

1 vi/opt/redis/6101/6101. conf2361014 daemonize Yes 5 10.171. 132.17 6000  ---- the address and port of the master, see 6appendonly Yes7""8 Slave-read-only Yes

Configuring Sentinel 1

1vi/opt/redis/6000/sentinel-6000. conf2 3Port260004 daemonize Yes5Sentinel Monitor MyMaster10.171.132.17 6000 2--the address of the master6Sentinel Down-after-milliseconds MyMaster the7Sentinel Failover-timeout MyMaster600008Sentinel Config-epoch MyMaster6769Sentinel Leader-epoch MyMaster676

Configuring Sentinel 2

vi/opt/redis/6101/sentinel-61012610110.171. 132.17 6000 2 Sentinel Down  the Sentinel Failover 60000 Sentinel Config 676 Sentinel leader 676

And then start the next:

./redis-server--include/opt/redis/6000/6000. conf. /redis-server--include/opt/redis/6101/6101. conf. /redis-sentinel/opt/redis/6000/sentinel-6000. conf. /redis-sentinel/opt/redis/6101/sentinel-6101. conf

In this way, the sub-redis installation configuration is good ~ and is the most common user-implemented, to ensure the division of System permissions.

Issues encountered during Redis installation

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.