- [email protected]:~$ wget -q http://peak.telecommunity.com/dist/ez_setup.py
- [email protected]:~$ sudo python ez_setup.py
- [email protected]:~$ sudo python -m easy_install redis hiredis
- [email protected]:~$ python
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import redis
>>> conn = redis.Redis()
>>> conn.set(‘name‘,"Tom")
True
>>> conn.get(‘name‘)
‘Tom‘
>>>
时间: 2024-10-05 08:47:13