Redis installation and use, Redis Installation and Use

Source: Internet
Author: User
Tags redis desktop manager

Redis installation and use, Redis Installation and Use
-- Download from the official website
Http://download.redis.io/releases/redis-3.0.2.tar.gz

(1) Basic installation
-- Extract the downloaded package
/Home/www/redis-3.0.2

-- Install
Make

Error:
Error: jemalloc/jemalloc. h: No such file or directory

-- Solution
Make MALLOC = libc
Cause: jemalloc is the default distributor, and the system does not have jemalloc and only libc

Run make again to complete the installation!

(2) multi-port and multi-instance installation (refer to chapter http://blog.csdn.net/xu470438000/article/details/42971091, which covers the cluster)
Create directory cluster in/home/www/redis-3.0.2
Makedir-p/home/www/redis-3.0.2/cluster

-- Create three folders under this directory
Makedir 6379
Makedir 6380
Makedir 6381

-- Copy the redis. conf file to "6379:
Cp/home/www/redis-3.0.2/redis. conf/home/www/redis-3.0.2/cluster/6379

-- Modify the configuration (only the first two items can be modified currently)
Port 6379
Daemonize yes
Cluster-enabled yes
Cluster-config-file nodes. conf
Cluster-node-timeout 5000
Appendonly yes


-- Copy redis. conf to 6380 and 6381 to modify the port.
Cp/home/www/redis-3.0.2/cluster/6379/redis. conf/home/www/redis-3.0.2/cluster/6380/
Cp/home/www/redis-3.0.2/cluster/6379/redis. conf/home/www/redis-3.0.2/cluster/6381/


-- Start the service
/Home/www/redis-3.0.2/src/redis-server/home/www/redis-3.0.2/cluster/6379/redis. conf
/Home/www/redis-3.0.2/src/redis-server/home/www/redis-3.0.2/cluster/6380/redis. conf
/Home/www/redis-3.0.2/src/redis-server/home/www/redis-3.0.2/cluster/6381/redis. conf

-- View port
Ps-ef | grep redis

-- Connect to database 6380 (command line)
./Redis-cli-h 192.168.5.128-p 6380

Now the installation of multiple ports is complete!

(3) Use the client
Download the Redis DeskTop Manager Client Add New Connection
Name: 192.168.5.128 --- 6380
Host: 192.168.5.128
Port: 6380
Auth: (no value here by default, and a password will be set for security reasons)

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.