1、安装wget http://download.redis.io/releases/redis-3.0.7.tar.gztar xvf redis-3.0.7.tar.gzcd redis-3.0.7makesudo make install PREFIX=/usr/local/redissudo mkdir -p /usr/local/redis/etcsudo cp redis.co...
1、安装
wget http://download.redis.io/releases/redis-3.0.7.tar.gz
tar xvf redis-3.0.7.tar.gz
cd redis-3.0.7
make
sudo make install PREFIX=/usr/local/redis
sudo mkdir -p /usr/local/redis/etc
sudo cp redis.conf /usr/local/redis/etc
cd src
sudo cp mkreleasehdr.sh /usr/local/red
2、python client
sudo apt-get install python-pip
sudo pip install virtualenv
virtualenv -p /usr/bin/python env
source env/bin/activate
pip install redis
import redis client = redis.StrictRedis(host='127.0.0.1', port=6379) key = "hello" client.set(key, "python-redis") value = client.get(key) print "key:" + key + ", value:" + value
3、nodejs client
npm install redis --save
const redis = require('redis') const client = redis.createClient(6379, 'localhost') client.set('hello', 'node-redis') client.get('hello', function(err, value){ console.log(value) })
本文标题为:redis分布式应用
基础教程推荐
- 【Redis】数据持久化 2023-09-12
- SQLServer 清理日志的实现 2023-07-29
- Mysql查询所有表和字段信息的方法 2023-07-26
- 关于MySQL中explain工具的使用 2023-07-27
- Redis如何实现延迟队列 2023-07-13
- Mysql主从三种复制模式(异步复制,半同步复制,组复 2022-09-01
- python中pandas库的iloc函数用法解析 2023-07-28
- 如何将excel表格数据导入postgresql数据库 2023-07-20
- Python常见库matplotlib学习笔记之多个子图绘图 2023-07-27
- Sql Server Management Studio连接Mysql的实现步骤 2023-07-29