Building Redis for use on Cygwin(转)
This is the second time I have installed Redis for use on Cygwin in the last several months. It seems that each time the version numbers change, I step in a different hole. For those of you using Cygwin (DLL version 1.7.17-1) and Redis version 2.6.9, I hope to share my experience with you so that you can save some time.
First, make sure that you have the “make” and “gcc” Cygwin packages installed. Then, open up a Cygwin terminal window and then download and extract Redis using the following commands:
1
2
3
4
|
$ wget http: //redis .googlecode.com /files/redis-2 .6.9. tar .gz $ tar xzf redis-2.6.9. tar .gz $ cd redis-2.6.9 $ cd src |
Then, within the src
directory, add the following to the redis.h
file:
1
2
3
4
5
6
7
8
9
|
#ifdef __CYGWIN__ #ifndef SA_ONSTACK #define SA_ONSTACK 0x08000000 #endif #endif #if defined(__CYGWIN__) #define strtold(a,b) ((long double)strtod((a),(b))) #endif |
I added the code above right before the “Data types” comment (Before line 312). The first five lines resolve the`SA_ONSTACK' undeclared
error originally identified here. If you were to run make with this solution only, you would bump into the next error: undefined reference to `_strtold'
. The last three lines address this error.
Ignoring warnings, make will generate the following executables in the src directory:
- redis-benchmark.exe
- redis-check-aof.exe
- redis-check-dump.exe
- redis-cli.exe
- redis-sentinel.exe
- redis-server.exe
Copy these files into Cygwin’s bin directory. To quickly test that Redis works, type in redis-server
to start Redis with default options. In another Cygwin terminal window, start the Redis command line interface by typing redis-cli
. At the prompt, simply type “ping
“. If Redis is up and running, it should simply reply with “PONG
“.
Enjoy!
http://blog.joshuawhite.com/open-source/building-redis-for-use-on-cygwin/
Building Redis for use on Cygwin(转)的更多相关文章
- Redis(三)源source编译
背景: 自己电脑是win7 32bit的,而想要Redis4.0的版本,但是在网上没找到,所以自己干脆download源source,自己build,安装. 最后,目前达到的状态是,windows下s ...
- centos7安装redis
方法一:使用命令安装(前提是已经安装了EPEL). 安装redis: yum -y install redis 启动/停止/重启 Redis 启动服务: 1 systemctl start redis ...
- Python之路【第十篇】Python操作Memcache、Redis、RabbitMQ、SQLAlchemy、
Memcached Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度 ...
- Redis-cluster集群【第一篇】:redis安装及redis数据类型
Redis介绍: 一.介绍 redis 是一个开源的.使用C语言编写的.支持网络交互的.可以基于内存也可以持久化的Key-Value数据库. redis的源码非常简单,只要有时间看看谭浩强的C语言,在 ...
- 在CentOS下安装Redis
Redis比较傲娇,在windows上还没有很好的安装方式,不得已搞了个虚拟机玩玩. 装Redis十分简单,按照下面的几个命令来就行了. 安装命令 wget http://download.redis ...
- redis 在windows 上的安装与使用
1.redis-windows 最近在做一个抢拍模块,由于过于平凡的insert与update I/O受不了,故只好把东西放内存里,等拍卖结束了,在写入磁盘. 至于为什么要用window呢? 因为服务 ...
- windows下和linux下 Redis 安装
Redis 是一个高性能的key-value数据库, 使用内存作为主存储,数据访问速度非常快,当然它也提供了两种机制支持数据持久化存储.比较遗憾的是,Redis项目不直接支持Windows,Windo ...
- centos 6.8安装redis
1. 下载到redis下载页面https://redis.io/download下载对应版本的reids安装包,如:redis-${version}.tar.gz . 2. 安装redis的详细安装步 ...
- redis编译问题
在编译redis时,出现以下问题 In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemallo ...
随机推荐
- NSPredicate的用法
一般来说这种情况还是蛮多的,比如你从文件中读入了一个array1,然后想把程序中的一个array2中符合array1中内容的元素过滤出来. 正 常傻瓜一点就是两个for循环,一个一个进行比较,这样效率 ...
- 加入指数(IOS开发)
该指数是用来协助查询. 原则上: - 索引的标题是不完全一样的标题显示: - 指数应该具有一定的代表性,它可表示一组数据: - 假设索引列表视图.在一般情况下不再使用扩展视图. (easy指向) 会又 ...
- Net程序员学习Linux
Net程序员学习Linux 本次知识点:Linux系统的多终端切换,linux下的用户,linux远程访问工具使用,linux下重要的目录,命令的组成,通配符,linux的路径问题,文件操作的综合运用 ...
- CSharp SQLServer 登陆
=======后台SQLServer存储过程================ --创建数据库create database Stu; --创建表use MyShool;if exists(select ...
- linux 下上传 datapoint数据到yeelink 修改版本
/*client.c*/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include ...
- PLSQL Developer 9.如何设置查询返回所有纪录(转)
默认PLSQL Developer查询出来的记录只能是满屏那么多行,一般也就是二三十行,比较不方便. 根据以下设置,可以将其结果都返回. 方法:Tools>Preferences>Wind ...
- AIX 7.1 install python
周围环境AIX7.1 设备python-2.6.2 因为互联网是非常多的安装文档.而且也没有细挑的版本号.因为我觉得python2.6 可能相对保守一些,至少之前用到的版本号是这个.所以此处依旧 ...
- Oracle在不同的语言环境结果to_date错误的问题
我写了一个存储过程,它使用了功能,有一些功能to_date(dateFrom, 'yyyy/mm/dd').执行发现数据插入错误后,数据插入"0001/9/14". 感觉莫名其妙, ...
- 文章3说话 微信商城云server创建后台
一个. 应用server资源 想要进行微信开发.少不了后台server端程序的开发,那么我们首先就要申请server资源.眼下有非常多云server可选,比方新浪的sae ...
- redis client protocol 分解
在官方网站http://redis.io/topics/protocol我们必须redis通信协议做说明. 根据以下某些原因.我想解决redis client protocol: 1.足够了解通信协议 ...