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分布式应用


基础教程推荐
- Java程序员从笨鸟到菜鸟(五十三) 分布式之 Redis 2023-09-11
- Python安装第三方库的方法(pip/conda、easy_install、setup.py) 2023-07-28
- Mariadb数据库主从复制同步配置过程实例 2023-07-25
- oracle数据库排序后如何获取第一条数据 2023-07-24
- Windows10系统中Oracle完全卸载正确步骤 2023-07-24
- redis 数据库 2023-09-13
- Python常见库matplotlib学习笔记之画图中各个模块的含义及修改方法 2023-07-27
- SQL Server如何设置用户只能访问特定数据库和访问特定表或视图 2023-07-29
- oracle19c卸载教程的超详细教程 2023-07-23
- redis乐观锁与悲观锁的实战 2023-07-13