官方資料https://redis.io/topics/cluster-tutorial , 首先下載redis,http://download.redis.io/releases/redis-4.0.6.tar.gz tar zxvf redis-4.0.6.tar.gz cd redis-4.0.6 make make報錯 GCC diagnostic not allowed inside functions ,查資料發現是gcc版本太低,
使用jedis插入資料時出現了一個問題: redis.clients.jedis.exceptions.JedisDataException: WRONGTYPE Operation against a key holding the wrong kind of value 代碼大概是這樣實現的: HashMap<String,String> map = new HashMap<String,String>();
用命令列工具連上後執行“set test 0”出現以下錯誤提示: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
異常描述: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the poolat redis.clients.util.Pool.getResource(Pool.java:22)at com.derbysoft.jredis.longkeytest.BorrowObject.run(BorrowObject.java:22)at
一:安裝Redis 1、下載源碼,解壓縮後編譯源碼 # wget http://download.redis.io/releases/redis-2.8.3.tar.gz# tar xzf redis-2.8.3.tar.gz# cd redis-2.8.3# make 2、進入安裝目錄的src檔案夾下,有四個可執行檔redis-server、redis-benchmark、redis-cli和redis.conf,複製到同一個目錄下 #