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 ...
随机推荐
- BZOJ 1269 文本编辑器 Splay
题目大意:维护一个文本编辑器,支持下列操作: 1.将光标移动到某一位置 2.在光标后插入一段字符串 3.删除光标后的一段字符 4.翻转光标后的一段字符 5.输出光标后的一个字符 6.光标-- 7.光标 ...
- oracle转Mysql中,varchar2(10)和number应该转换为什么类型? (转)
一. varchar2(10)和number应该转换为什么类型? oracle转成mysql时:varchar2(10)可以转成varchar(10)number则要看oracle中存储的具体是什么类 ...
- zabbix通过脚本发送短信
zabbix通过脚本发送短信 原则 和zabbix电子邮件是一样的,他们是action内部配置,司的api来完毕.当然网上有不少利用139邮箱来发的,这个事实上算调用email的一种,这里复述的是调用 ...
- 动态创建ImageView
1.布局文件 <LinearLayout android:id="@+id/viewGroup" android:layout_width="wrap_conten ...
- #define XXX do{ XXX } while(0) 为什么使用
#define XXX do{ XXX } while(0) 为什么使用 时常会遇到一个非常"奇怪的宏定义", rt.(欧西巴...思考不够深刻啊, 皮鞭, 啪啪啪) 近期又遇到这 ...
- Android学习路径(十)如何将Action Bar堆放在布局
默认情况下,action bar出如今activity窗体的顶部,稍微降低了activity布局的总空间.假设你想隐藏或者显示action bar,在这堂用户体验的课程中,你能够通过调用hide() ...
- XML文件编码问题
这两天的过程中的一个项目,以解决编码格式ANSI的xml当文件.我遇到了一些问题.下面的例子现在将总结分析过程. 通过win7记事本或notepad++创建一个xml文件test_source: &l ...
- 连接字符串中Min Pool Size的理解是错误,超时时间已到,但是尚未从池中获取连接。出现这种情况可能是因为所有池连接均在使用,并且达到了最大池大小。
Min Pool Size的理解是错误的 假设我们在一个ASP.NET应用程序的连接字符串中将Min Pool Size设置为30: <add name="cnblogs" ...
- 发展,需求驱动 · 一间 所见即所得
从需求不是一句空话.同样是在发展过程中真正的. 需求驱动,与极限编程的一些想法和测试驱动开发基本重合. 鉴于该网站的发展是一个比较流行的方向,我会从网站开始,阐述自己的"需求驱动的发展&qu ...
- JAVA实现DAO基本层CRUD操作
随着shh2各种操作方便框架.越来越多JAVA WEB效率,可是,假设在不了解这些框架使用的场合的情况下,一拿到项目就盲目地选择这些框架进行系统架构的搭建,就有可能造成非常多不是必需的资源浪费. 在项 ...