/usr/local/bin/redis-cli -p  7489  -a  **** shutdown 
cd  &&  rm  -rf  appendonly.aof &&  rm  -rf  dump.rdb
 
 
yum install  gcc
gcc --version 
 
 
cd  /opt &&  tar  -zxvf  redis-6.2.6.tar.gz
 
cd  redis-6.2.6
 
make  &&  make  install 
 
cd  /usr/local/bin &&  ll
 
cd  /opt/redis-6.2.6/
 
cp  redis.conf /etc/redis.conf
 
vim  /etc/redis.conf
 
/usr/local/bin/redis-server /etc/redis.conf
ps  -aux  |  grep  redis
 
vim  /etc/redis.conf
 
 
 
 
 
 
/usr/local/bin/redis-cli shutdown 
 
/usr/local/bin/redis-server /etc/redis.conf &&  ps  -aux  |  grep  redis
 
systemctl start firewalld &&  firewall-cmd --permanent  --add-port= 7489 /tcp &&  firewall-cmd --reload  &&  firewall-cmd --query-port= 7489 /tcp
 
 
vim  /etc/redis.conf
 
 
 
/usr/local/bin/redis-cli -p  7489  -a  **** shutdown 
 
/usr/local/bin/redis-server /etc/redis.conf &&  ps  -aux  |  grep  redis
 
 
 
    public  static  void  main ( String [ ]  args)  { Jedis  jedis =  new  Jedis ( "你的redisip" ,  7489 ) ; jedis. auth ( "******" ) ; String  ping =  jedis. ping ( ) ; System . out. println ( ping) ; } 
 
vim  /etc/redis.conf
 
 
 
/usr/local/bin/redis-cli -p  7489  -a  **** shutdown  &&  /usr/local/bin/redis-server /etc/redis.conf &&  ps  -aux  |  grep  redis
 
 
/usr/local/bin/redis-server /etc/redis.conf &&  ps  -aux  |  grep  redis
 
cd  &&  ll
 
 
/usr/local/bin/redis-cli --cluster  create --cluster-replicas 1  *******
/usr/local/bin/redis-cli --cluster  create --cluster-replicas 1  --askpass  **********
 
 
firewall-cmd --permanent  --add-port= 17489 /tcp &&  firewall-cmd --reload  &&  firewall-cmd --query-port= 17489 /tcp
 
 
 
/usr/local/bin/redis-cli --cluster  create --cluster-replicas 1  --askpass  *****************
redis-cli -c  -p  7489 
 
cluster nodes
 
 
redis-cli -c  -p  7489  -a  ****
redis-cli -c  -p  7489  --askpass 
 
 
 
 
cluster keyslot < key> 
cluster countkeysinslot < slotnum> 
cluster getkeysinslot < slot>  < count> 
/usr/local/bin/redis-cli -p 7489 -a ***  shutdown
cluster nodes
/usr/local/bin/redis-server /etc/redis.conf &&  ps  -aux  |  grep  redis
 
cluster nodes
 
 
    < dependency> < groupId> </ groupId> < artifactId> </ artifactId> < version> </ version> </ dependency>     public  static  void  main ( String [ ]  args)  { Set < HostAndPort > =  new  HashSet < HostAndPort > ( ) ; hostAndPorts. add ( new  HostAndPort ( "" ,  7489 ) ) ; JedisPoolConfig  poolConfig =  new  JedisPoolConfig ( ) ; String  password =  "" ;  redis. clients. jedis.  JedisCluster=  new  redis. clients. jedis.  JedisCluster( hostAndPorts,  2000 ,  2000 ,  5 ,  password,  poolConfig) ; try  { jedisCluster. set ( "k1" ,  "v1" ) ; String  k1 =  jedisCluster. get ( "k1" ) ; System . out. println ( "k1="  +  k1) ; }  finally  { jedisCluster. close ( ) ; } }