--Download directly to official website
Http://download.redis.io/releases/redis-3.0.2.tar.gz
(1) Basic installation
--Unzip after download
/home/www/redis-3.0.2
--Installation
Make
Error:
Error:jemalloc/jemalloc.h:no such file or directory
-Solve
Make MALLOC=LIBC
Cause: Jemalloc is the default allocator, the system does not have jemalloc only libc
Do it again and the installation is complete!
(2) Multiport multi-instance installation (refer to http://blog.csdn.net/xu470438000/article/details/42971091 article, related to cluster)
Create a directory in/home/www/redis-3.0.2 cluster
Makedir-p/home/www/redis-3.0.2/cluster
--Create three folders in 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 (currently only the first two items can also be modified)
Port 6379
Daemonize Yes
cluster-enabled Yes
Cluster-config-file nodes.conf
Cluster-node-timeout 5000
AppendOnly Yes
--similarly copy the redis.conf to 6380, 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 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 6380 Libraries (command line)
./redis-cli-h 192.168.5.128-p 6380
This multi-port has been installed to complete!
(3) using the client
Download Redis DeskTop Manager Client Add New Connection
name:192.168.5.128--6380
host:192.168.5.128
port:6380
Auth: (There is no value here by default, password is set for security purposes)
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Installation and use of Redis