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-13
- Mongodb启动报错完美解决方案:about to fork child process,waiting until server is ready for connections. 2023-07-16
- SQL Server 2022 AlwaysOn新特性之包含可用性组详解 2023-07-29
- MySQL8.0.28安装教程详细图解(windows 64位) 2023-07-26
- Numpy中如何创建矩阵并等间隔抽取数据 2023-07-28
- Oracle 删除大量表记录操作分析总结 2023-07-23
- 搭建单机Redis缓存服务的实现 2023-07-13
- 在阿里云CentOS 6.8上安装Redis 2023-09-12
- SQLSERVER调用C#的代码实现 2023-07-29
- 基于Python制作一个简单的文章搜索工具 2023-07-28