python访问redis
2016-02-02 18:31
597 查看
转载自:http://blog.csdn.net/ubuntu64fan/article/details/50624293
a) 下载:
[html] view
plain copy
print?
$ wget http://download.redis.io/releases/redis-3.0.5.tar.gz
b) 编译:
[html] view
plain copy
print?
# yum install gcc tcl
# tar -zxf redis-3.0.5.tar.gz
# cd redis-3.0.5
# make
# make test
# sudo make install
这样可执行文件redis-server等就从redis-3.0.5/src拷贝到/usr/local/bin
c) 启动服务(6379端口要打开)
[html] view
plain copy
print?
$ redis-server
或
[html] view
plain copy
print?
$ redis-server /path/to/redis.conf
参考下面的redis.conf的配置项: redis配置详解
http://blog.csdn.net/ithomer/article/details/9232891
redis-py 这是 Redis 目前最成熟的 Python 客户端开发包。
redis 主页:
https://github.com/andymccurdy/redis-py
a) 下载源码:
[html] view
plain copy
print?
$ git clone https://github.com/andymccurdy/redis-py.git
b) 安装:
[html] view
plain copy
print?
$ cd redis-py
$ sudo python redis install
hiredis是redis数据库的C接口,目前只能在linux下使用,几个基本的函数就可以操作redis数据库了。hiredis 是 Redis 官方指定的 C 语言客户端开发包,支持 Redis 完整的命令集、管线以及事件驱动编程。
hiredis主页:
https://github.com/redis/hiredis
a) 下载安装:
[html] view
plain copy
print?
$ git clone https://github.com/redis/hiredis.git
$ cd hiredis
$ make
$ sudo make install
例子:
http://blog.csdn.net/mfc_vc_andy/article/details/8095839
http://www.leoox.com/?p=304
python对hiredis的包装类。
主页:
https://github.com/redis/hiredis-py
a) 下载:
[html] view
plain copy
print?
$ wget https://pypi.python.org/packages/source/h/hiredis/hiredis-0.2.0.tar.gz
b) 安装:
[html] view
plain copy
print?
$ tar zxf hiredis-0.2.0.tar.gz
$ cd hiredis-0.2.0
$ python setup.py build
$ sudo python setup.py install
http://blog.csdn.net/chosen0ne/article/details/7319807
http://blog.csdn.net/chenggong2dm/article/details/6102540
python访问redis
1 Linux上安装redis
a) 下载:[html] view
plain copy
print?
$ wget http://download.redis.io/releases/redis-3.0.5.tar.gz
b) 编译:
[html] view
plain copy
print?
# yum install gcc tcl
# tar -zxf redis-3.0.5.tar.gz
# cd redis-3.0.5
# make
# make test
# sudo make install
这样可执行文件redis-server等就从redis-3.0.5/src拷贝到/usr/local/bin
c) 启动服务(6379端口要打开)
[html] view
plain copy
print?
$ redis-server
或
[html] view
plain copy
print?
$ redis-server /path/to/redis.conf
参考下面的redis.conf的配置项: redis配置详解
http://blog.csdn.net/ithomer/article/details/9232891
2 redis-py
redis-py 这是 Redis 目前最成熟的 Python 客户端开发包。redis 主页:
https://github.com/andymccurdy/redis-py
a) 下载源码:
[html] view
plain copy
print?
$ git clone https://github.com/andymccurdy/redis-py.git
b) 安装:
[html] view
plain copy
print?
$ cd redis-py
$ sudo python redis install
3 hiredis
hiredis是redis数据库的C接口,目前只能在linux下使用,几个基本的函数就可以操作redis数据库了。hiredis 是 Redis 官方指定的 C 语言客户端开发包,支持 Redis 完整的命令集、管线以及事件驱动编程。hiredis主页:
https://github.com/redis/hiredis
a) 下载安装:
[html] view
plain copy
print?
$ git clone https://github.com/redis/hiredis.git
$ cd hiredis
$ make
$ sudo make install
例子:
http://blog.csdn.net/mfc_vc_andy/article/details/8095839
http://www.leoox.com/?p=304
4 hiredis-py
python对hiredis的包装类。主页:
https://github.com/redis/hiredis-py
a) 下载:
[html] view
plain copy
print?
$ wget https://pypi.python.org/packages/source/h/hiredis/hiredis-0.2.0.tar.gz
b) 安装:
[html] view
plain copy
print?
$ tar zxf hiredis-0.2.0.tar.gz
$ cd hiredis-0.2.0
$ python setup.py build
$ sudo python setup.py install
5 python操作redis
http://blog.csdn.net/chosen0ne/article/details/7319807http://blog.csdn.net/chenggong2dm/article/details/6102540
相关文章推荐
- SWOOLE异步REDIS安装
- Redis-持久化
- CentOS 6.5 下安装 Redis 2.8.7
- spring集成 JedisCluster 联接 redis3.0 集群
- python访问redis
- python访问redis
- 五. Redis持久化
- 五. Redis持久化
- 编译Redis出错
- 四. Redis事务处理
- 四. Redis事务处理
- 【原】redis插件安装
- Codis——分布式Redis服务的解决方案
- Celery 和 Redis 入门
- spring mvc+mybaties+maven+redis
- 在shell下批量管理redis数据
- redis(java)
- Redis 实例:主从复制
- 三. Redis 主从复制
- 三. Redis 主从复制