解壓安裝後編譯
[***@localhost redis-3.0.0]# make編譯後
[***@localhost redis-3.0.0]# make install prefix=/usr/local/redis啟動
[***@localhost redis-3.0.0]# cd bin檢視是否啟動,檢視程序[***@localhost bin]# ./redis-server
[***@localhost redis-3.0.0]# ps aux|grep redis關閉
[***@localhost redis-3.0.0]# ./redis-client shutdown或者直接 kill redis的程序
以後端模式啟動,需修改 redis.conf 配置檔案,設定 daemonize 的值為 yes,之後重啟 redis 即生效
啟動 redis-cli
[***@localhost bin]# ./redis-cli127.0.0.1:6379>
[***@localhost bin]# ./redis-cli -h 192.168.110.110 -p 6379
192.168.110.110:6379> ping
pong
192.168.110.110:6379>
Redis 相關操作命令
本來想搞個桌布的,不但放不下還非常醜 命令說明 select 下標 選擇下標所處的資料庫 dbsize 檢視當前資料庫的鍵數量 flushdb 清空當前db flushall 清空所有的db 命令說明 keys 匹配符 匹配符有 和 代表了乙個字元,號代表了n個字元!exists 鍵名 是否存在這個...
redis相關操作
字串操作 列表操作 有序,重複 左新增 lpush websites baidu.com 右新增 rpush websites google.com 左移除 lpop websites 右移除 rpop websites 指定元素移除 lrem websites count google.com c...
Redis相關操作
set key value ex seconds px milliseconds nx xx ex seconds 為鍵設定秒級過期時間 px milliseconds 為鍵設定毫秒級過期時間 nx 鍵必須不存在,才可以設定成功,用於新增 xx 鍵必須存在,才可以設定成功,用於更新 public c...