redis安装

由于windows对redis支持不好,所以在windows下只能使用较老版本的redis

只维护到3.x
	https://github.com/microsoftarchive/redis/releases

只维护到5.x
	https://github.com/tporadowski/redis/releases/
        
直接选择msi下载即可

redis服务启动和客户端连接

启动服务
	方法一:
    	cmd中:redis-server.exe redis.windows-service.conf
    方法二:
    	在windows服务中找到Redis服务,右键启动
        

客户端连接(cmd窗口下)
	redis-cli -h 127.0.0.1 -p 6379
    或
    redis-cli

redis-python连接模块

pip install redis

redis基本连接

redis普通连接

1.导入Redis类
	from redis import Redis
2.实例化,获得对象
	coon = Redis(host='localhost',port=6379) 
    coon = Redis() # 不写默认本地连接
3.操作数据
	coon.set('name','春游去动物园')
    coon.close()

redis连接池连接

1.创建连接池
    import redis
    POOL = redis.ConnectionPool(max_connections=10)

2.从池中取一个链接使用
	coon = redis.Redis(connection_pool=POOL)
    
3.操作数据
	coon.set('name','春游去动物园')
    coon.close()