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 ...
随机推荐
- Android PackageInstaller 安装和卸载
应用的安装方式:adb install或者下载安装 过程分析请參考老罗的blog,这里记录一下第三方应用程序安装apk的过程. 安装的过程主要是调用PackageInstaller这个App,源码的位 ...
- js中escape的用法----前端页面简单加密
escape() 方法,它用于转义不能用明文正确发送的任何字符.比如,电话号码中的空格将被转换成字符 %20,从而能够在 URL 中传递这些字符. http://localhost:8080/a?na ...
- WPF对于xml的简单操作(下)绑定ListView
上个月做好的,电脑给盗了,没及时存在网盘,也及时发到随笔,于是乎悲哉!搞了一个上午终于绑定好了,有时候就是这么眼瞎,Path和XPath全瞎了,摸滚了一个上午,赶紧的随笔跟上先. <ListVi ...
- gopkg:一种方便的go pakcage管理方式
在使用go的过程中,我们有时候会引入一些第三方库来使用,而通常的方式就是使用go get,可是这样的方式有一个非常严重的问题,假设第三方库更新了相关接口,非常有可能你就无法使用了,所以我们一套非常好地 ...
- java大全经典的书面采访
果学网 -专注IT在线www.prismcollege.com 1.面向对象的特征有哪些方面 1.抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面.以便更充分地注意与当前目标有关的方面.抽象并 ...
- swift-辞典NSDictionary定义,变化的关键,删/加入关键
// Playground - noun: a place where people can play import UIKit //--------------------------------- ...
- AndroidUI组件之ListView小技巧
android:fadingEdge="none"//出去黑影 android:listSelector="@android:color/transparent&quo ...
- 3、Spring4之Bean 配置的细节
1). 若字面值中包括特殊字符,则能够使用 value 节点的 <![CDATA[]]> 把字面值包裹起来. <constructor-arg> ...
- 乐在其中设计模式(C#) - 建造者模式(Builder Pattern)
原文:乐在其中设计模式(C#) - 建造者模式(Builder Pattern) [索引页][源码下载] 乐在其中设计模式(C#) - 建造者模式(Builder Pattern) 作者:webabc ...
- ./startup.sh: Permission denied
今天在Linux上部署项目,之前报过这个错误,通过下面方式攻克了.如今发出来备份一下: LINUX权限-bash: ./startup.sh: Permission denied 运行./startu ...