- 浏览: 985261 次
- 性别:
- 来自: 杭州
文章分类
- 全部博客 (826)
- 硬件 (8)
- 软件 (24)
- 软件工程 (34)
- JAVA (229)
- C/C++/C# (77)
- JavaScript (8)
- PHP (1)
- Ruby (3)
- MySQL (14)
- 数据库 (19)
- 心情记事 (12)
- 团队管理 (19)
- Hadoop (1)
- spring (22)
- mybatis(ibatis) (7)
- tomcat (16)
- velocity (0)
- 系统架构 (6)
- JMX (8)
- proxool (1)
- 开发工具 (16)
- python (10)
- JVM (27)
- servlet (5)
- JMS (26)
- ant (2)
- 设计模式 (5)
- 智力题 (2)
- 面试题收集 (1)
- 孙子兵法 (16)
- 测试 (1)
- 数据结构 (7)
- 算法 (22)
- Android (11)
- 汽车驾驶 (1)
- lucene (1)
- memcache (12)
- 技术架构 (7)
- OTP-Erlang (7)
- memcached (17)
- redis (20)
- 浏览器插件 (3)
- sqlite (3)
- Heritrix (9)
- Java线程 (1)
- scala (0)
- Mina (6)
- 汇编 (2)
- Netty (15)
- libevent (0)
- CentOS (12)
- mongod (5)
- mac os (0)
最新评论
-
kingasdfg:
你这里面存在一个错误添加多个任务 应该是这样的 /** * ...
Quartz的任务的临时启动和暂停和恢复【转】 -
kyzeng:
纠正一个错误,long型对应的符号是J,不是L。
Jni中C++和Java的参数传递 -
zhaohaolin:
抱歉,兄弟,只是留下作记录,方便学习,如果觉得资料不好,可以到 ...
netty的个人使用心得【转】 -
cccoooccooco:
谢谢!自己一直以为虚机得使用网线才可以与主机连接呢。。
主机网卡无网线连接与虚拟机通信 -
yuqilin001:
要转别人的东西,请转清楚点嘛,少了这么多类,误人子弟
netty的个人使用心得【转】
http://code.google.com/p/redis/
http://redis.io/commands/slaveof
http://redis.io/documentation
http://baike.baidu.com/view/4595959.htm
参考链接:
http://redis.io/
http://github.com/jdp/redisent/tree/master
http://github.com/owlient/phpredis
http://rediska.geometria-lab.net/
python client : https://github.com/andymccurdy/redis-py/downloads
安装:
#yum install sinasrv2-redis
wget http://redis.googlecode.com/files/redis-2.2.2.tar.gz
tar -zxvf redis-2.2.2.tar.gz
cd redis-2.2.2
make
make install
##
cp -p redis-server /usr/local/bin
cp -p redis-benchmark /usr/local/bin
cp -p redis-cli /usr/local/bin
cp -p redis-check-dump /usr/local/bin
cp -p redis-check-aof /usr/local/bin
启动及停止:
nohup redis-server /etc/redis.conf &
redis-cli
/usr/local/sinasrv2/bin/redis-cli -p 7517 shutdown
http://redis.io/topics/data-types-intro
配置:
daemonize yes
port 7613
pidfile /var/run/redis7613.pid
timeout 28800
loglevel verbose
logfile stdout
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
dir /data1/redis7613
dbfilename r7613.rdb
appendonly no
appendfsync everysec
vm-enabled no
vm-swap-file /data1/redis7613/r7613.swap
vm-max-memory 0
vm-page-size 32
vm-pages 134217728
vm-max-threads 4
glueoutputbuf yes
hash-max-zipmap-entries 64
hash-max-zipmap-value 512
activerehashing yes
appendonly yes #持久化
82 # SLAVEOF host port
192.168.x.1 # slaveof 192.168.x.1 7113
命令参考:
Commands Clients Documentation Community Download Issues
All Keys Strings Hashes Lists Sets Sorted Sets Pub/Sub Transactions Connection Server- APPEND key value Append a value to a key
- AUTH password Authenticate to the server
- BGREWRITEAOF Asynchronously rewrite the append-only file
- BGSAVE Asynchronously save the dataset to disk
- BLPOP key [key ...] timeout Remove and get the first element in a list, or block until one is available
- BRPOP key [key ...] timeout Remove and get the last element in a list, or block until one is available
- BRPOPLPUSH source destination timeout Pop a value from a list, push it to another list and return it; or block until one is available
- CONFIG GET parameter Get the value of a configuration parameter
- CONFIG SET parameter value Set a configuration parameter to the given value
- CONFIG RESETSTAT Reset the stats returned by INFO
- DBSIZE Return the number of keys in the selected database
- DEBUG OBJECT key Get debugging information about a key
- DEBUG SEGFAULT Make the server crash
- DECR key Decrement the integer value of a key by one
- DECRBY key decrement Decrement the integer value of a key by the given number
- DEL key [key ...] Delete a key
- DISCARD Discard all commands issued after MULTI
- ECHO message Echo the given string
- EXEC Execute all commands issued after MULTI
- EXISTS key Determine if a key exists
- EXPIRE key seconds Set a key's time to live in seconds
- EXPIREAT key timestamp Set the expiration for a key as a UNIX timestamp
- FLUSHALL Remove all keys from all databases
- FLUSHDB Remove all keys from the current database
- GET key Get the value of a key
- GETBIT key offset Returns the bit value at offset in the string value stored at key
- GETRANGE key start end Get a substring of the string stored at a key
- GETSET key value Set the string value of a key and return its old value
- HDEL key field Delete a hash field
- HEXISTS key field Determine if a hash field exists
- HGET key field Get the value of a hash field
- HGETALL key Get all the fields and values in a hash
- HINCRBY key field increment Increment the integer value of a hash field by the given number
- HKEYS key Get all the fields in a hash
- HLEN key Get the number of fields in a hash
- HMGET key field [field ...] Get the values of all the given hash fields
- HMSET key field value [field value ...] Set multiple hash fields to multiple values
- HSET key field value Set the string value of a hash field
- HSETNX key field value Set the value of a hash field, only if the field does not exist
- HVALS key Get all the values in a hash
- INCR key Increment the integer value of a key by one
- INCRBY key increment Increment the integer value of a key by the given number
- INFO Get information and statistics about the server
- KEYS pattern Find all keys matching the given pattern
- LASTSAVE Get the UNIX time stamp of the last successful save to disk
- LINDEX key index Get an element from a list by its index
- LINSERT key BEFORE|AFTER pivot value Insert an element before or after another element in a list
- LLEN key Get the length of a list
- LPOP key Remove and get the first element in a list
- LPUSH key value Prepend a value to a list
- LPUSHX key value Prepend a value to a list, only if the list exists
- LRANGE key start stop Get a range of elements from a list
- LREM key count value Remove elements from a list
- LSET key index value Set the value of an element in a list by its index
- LTRIM key start stop Trim a list to the specified range
- MGET key [key ...] Get the values of all the given keys
- MONITOR Listen for all requests received by the server in real time
- MOVE key db Move a key to another database
- MSET key value [key value ...] Set multiple keys to multiple values
- MSETNX key value [key value ...] Set multiple keys to multiple values, only if none of the keys exist
- MULTI Mark the start of a transaction block
- PERSIST key Remove the expiration from a key
- PING Ping the server
- PSUBSCRIBE pattern [pattern ...] Listen for messages published to channels matching the given patterns
- PUBLISH channel message Post a message to a channel
- PUNSUBSCRIBE [pattern [pattern ...]] Stop listening for messages posted to channels matching the given patterns
- QUIT Close the connection
- RANDOMKEY Return a random key from the keyspace
- RENAME key newkey Rename a key
- RENAMENX key newkey Rename a key, only if the new key does not exist
- RPOP key Remove and get the last element in a list
- RPOPLPUSH source destination Remove the last element in a list, append it to another list and return it
- RPUSH key value Append a value to a list
- RPUSHX key value Append a value to a list, only if the list exists
- SADD key member Add a member to a set
- SAVE Synchronously save the dataset to disk
- SCARD key Get the number of members in a set
- SDIFF key [key ...] Subtract multiple sets
- SDIFFSTORE destination key [key ...] Subtract multiple sets and store the resulting set in a key
- SELECT index Change the selected database for the current connection
- SET key value Set the string value of a key
- SETBIT key offset value Sets or clears the bit at offset in the string value stored at key
- SETEX key seconds value Set the value and expiration of a key
- SETNX key value Set the value of a key, only if the key does not exist
- SETRANGE key offset value Overwrite part of a string at key starting at the specified offset
- SHUTDOWN Synchronously save the dataset to disk and then shut down the server
- SINTER key [key ...] Intersect multiple sets
- SINTERSTORE destination key [key ...] Intersect multiple sets and store the resulting set in a key
- SISMEMBER key member Determine if a given value is a member of a set
- SLAVEOF host port Make the server a slave of another instance, or promote it as master
- SMEMBERS key Get all the members in a set
- SMOVE source destination member Move a member from one set to another
- SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination] Sort the elements in a list, set or sorted set
- SPOP key Remove and return a random member from a set
- SRANDMEMBER key Get a random member from a set
- SREM key member Remove a member from a set
- STRLEN key Get the length of the value stored in a key
- SUBSCRIBE channel [channel ...] Listen for messages published to the given channels
- SUNION key [key ...] Add multiple sets
- SUNIONSTORE destination key [key ...] Add multiple sets and store the resulting set in a key
- SYNC Internal command used for replication
- TTL key Get the time to live for a key
- TYPE key Determine the type stored at key
- UNSUBSCRIBE [channel [channel ...]] Stop listening for messages posted to the given channels
- UNWATCH Forget about all watched keys
- WATCH key [key ...] Watch the given keys to determine execution of the MULTI/EXEC block
- ZADD key score member Add a member to a sorted set, or update its score if it already exists
- ZCARD key Get the number of members in a sorted set
- ZCOUNT key min max Count the members in a sorted set with scores within the given values
- ZINCRBY key increment member Increment the score of a member in a sorted set
- ZINTERSTORE destination numkeys key [key ...] [WEIGHTS weight [weight ...]] [AGGREGATE SUM|MIN|MAX] Intersect multiple sorted sets and store the resulting sorted set in a new key
- ZRANGE key start stop [WITHSCORES] Return a range of members in a sorted set, by index
- ZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count] Return a range of members in a sorted set, by score
- ZRANK key member Determine the index of a member in a sorted set
- ZREM key member Remove a member from a sorted set
- ZREMRANGEBYRANK key start stop Remove all members in a sorted set within the given indexes
- ZREMRANGEBYSCORE key min max Remove all members in a sorted set within the given scores
- ZREVRANGE key start stop [WITHSCORES] Return a range of members in a sorted set, by index, with scores ordered from high to low
- ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count] Return a range of members in a sorted set, by score, with scores ordered from high to low
- ZREVRANK key member Determine the index of a member in a sorted set, with scores ordered from high to low
- ZSCORE key member Get the score associated with the given member in a sorted set
- ZUNIONSTORE destination numkeys key [key ...] [WEIGHTS weight [weight ...]] [AGGREGATE SUM|MIN|MAX] Add multiple sorted sets and store the resulting sorted set in a new key
This website is open source software developed by Citrusbyte .
发表评论
-
Redis入门教程
2011-07-12 22:08 2110入门教程,仅供菜鸟。 ... -
Redis数据库介绍
2011-07-12 22:07 27791. Redis是什么 这个问题的结果影响了我们怎么用R ... -
redis-sharding – 一个 Redis Proxy【转】
2011-04-28 01:43 1618redis-sharding 是一个由perl写的 Redis ... -
redis 运维实际经验纪录之一【转】
2011-04-26 11:30 1146发表于 2010/05/25 由 ... -
1,250,000,000 Key/Value Pairs in Redis 2.0.0-rc3 on a 32GB Machine【转】
2011-04-26 11:28 880Posted on July 25, 20 ... -
200,000,000 Keys in Redis 2.0.0-rc3【转】
2011-04-26 11:27 949Posted on July 24, 20 ... -
Redis配置文件各项参数说明【转】
2011-04-26 11:00 1586最近一个项目用到Redis ... -
Redis配置主从服务器【转】
2011-04-26 10:31 1248redis配置主从服务器 R ... -
More Redis internals: Tracing a GET & SET【转】
2011-04-26 10:09 1834In my previous article , I too ... -
深入Redis内部-Redis 源码讲解【转】
2011-04-26 10:08 571Redis 作为 NoSQL 数据库的杰出代表,一直广受关注, ... -
Redis安装配置【转】
2011-04-26 09:02 2009http://bbs.linuxtone.org/thread ... -
闲聊Redis【转】
2011-04-26 09:00 1127Redis 是一个有趣 的项目,与其把它说成键值存储、键 ... -
redis知识点整理【转】
2011-04-25 22:40 1018xmind做的笔记,可惜只能截图 关键字: ... -
jedis线程池的代码【转】
2011-04-25 22:36 2770备忘:(本机i5的测试数据:redis线程执行时间是:2118 ... -
在多台服务器上简单实现Redis的数据主从复制【转】
2011-04-25 22:27 1184Redis的主从复制功能非常强大,一个mas ter可以拥有 ... -
归档Redis在Windows,linux平台下的安装配置【转】
2011-04-25 22:25 2179为了方便查阅资料,特将网上搜索到的Redis相关安装配置进行归 ... -
Redis在Windows下的使用[转]
2011-04-25 22:24 1123Windows版的Redis可到此处下载,非官方版http:/ ... -
windows下redis和memcached的性能对比测试【转】
2011-04-25 22:19 1657在windows下测试了redis和memcached的性能, ... -
膜拜Redis【转】
2011-04-25 21:14 960膜拜Redis 2009年06月18 ...
相关推荐
Redis安装配置文档
Redis安装配置Redis安装配置Redis安装配置Redis安装配置Redis安装配置Redis安装配置Redis安装配置Redis安装配置
redis安装配置 redis安装配置 redis安装配置 redis安装配置
redis 6.0.6配置文件
linux下的redis安装包含配置文件,配置文件包含主服务器配置,从服务器配置
redis配置安装详细教程,详细介绍了redis安装配置过程
redis安装详解及安装包
redis的配置及具体详细操作;redis的配置及具体详细操作;
Linux ContOS7 Redis安装和配置及开机自启 https://blog.csdn.net/sikefeng/article/details/82222154
自己写的一个redis安装及使用手册,很详细的一个安装配置过程.
在centos6.5下源码安装配置redis。Redis 是一个高性能的key-value数据库。 redis的出现,很大程度补偿了memcached这类keyvalue存储的不足,在部 分场合可以对关系数据库起到很好的补充作用。它提供了Python,Ruby,...
Redis教程 安装配置 软件等
redis安装配置 安装和配置Redis通常需要一系列步骤,以下是一般的指南: ### 1. 下载Redis 访问[Redis官方网站](https://redis.io/download)下载最新版本的Redis。你可以选择下载源码并手动编译,或者下载预编译...
redis安装配置
redis安装配置
redis6.2.6 redis.conf配置文件
Redis安装:Docker-Compose安装 使用redis-cli连接Redis 使用图形化界面连接Redis Redis常用命令 5种常用数据类型应有场景 5种常用数据类型命令 spring boot 配置Redis数据库连接 RedisTemplate: 验证码+redis...
redis安装配置
Redis集群配置文件,包含了三个主节点,三个从节点的配置文件,该配置是在docker中运行,有完整的docker-compose.yml文件,只要修改映射的宿主机的路径为你自己的路径。然后直接docker-compose up既可以完成环境启动...