在VMware的Linux系统上安装Redis
下载,解压和编译:
- zmalloc.o: In function `zmalloc_used_memory':
- /usr/local/redis-2.6.14/src/zmalloc.c:223: undefined reference to `__sync_add_and_fetch_4'
- collect2: ld returned 1 exit status
- make[1]: *** [redis-server] Error 1
- make[1]: Leaving directory `/usr/local/redis-2.6.14/src'
- make: *** [all] Error 2
网上查了下资料,主要是因为我的linux是32位的,所以会报这个错,解决方案如下:
- [root@localhost redis-2.6.14]# src/redis-server
启动成功后控制台打印如下信息:
- [2918] 03 Jul 09:05:01.011 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf
- [2918] 03 Jul 09:05:01.017 * Max number of open files set to 10032
- [2918] 03 Jul 09:05:01.024 # Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now.
- _._
- _.-``__ ''-._
- _.-`` `. `_. ''-._ Redis 2.6.14 (00000000/0) 32 bit
- .-`` .-```. ```\/ _.,_ ''-._
- ( ' , .-` | `, ) Running in stand alone mode
- |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
- | `-._ `._ / _.-' | PID: 2918
- `-._ `-._ `-./ _.-' _.-'
- |`-._`-._ `-.__.-' _.-'_.-'|
- | `-._`-._ _.-'_.-' | http://redis.io
- `-._ `-._`-.__.-'_.-' _.-'
- |`-._`-._ `-.__.-' _.-'_.-'|
- | `-._`-._ _.-'_.-' |
- `-._ `-._`-.__.-'_.-' _.-'
- `-._ `-.__.-' _.-'
- `-._ _.-'
- `-.__.-'
- [2918] 03 Jul 09:05:01.029 # Server started, Redis version 2.6.14
- [2918] 03 Jul 09:05:01.030 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
- [2918] 03 Jul 09:05:01.030 * The server is now ready to accept connections on port 6379
我们可以使用内置的客户端来连接Redis
- [root@localhost redis-2.6.14]# src/redis-cli
- redis 127.0.0.1:6379> set name chenzhou
- OK
- redis 127.0.0.1:6379> get name
- "chenzhou"
- redis 127.0.0.1:6379>
附2:把Redis作为Linux服务开机启动
- [root@localhost redis-2.6.14]# cp redis.conf /etc/
redis的默认配置文件中daemonize参数的值为no,代表为非后台启动,所以我们需要把该参数的值修改为yes。至于其它的参数在这里就不详细说了,具体可以参见:http://blog.csdn.net/htofly/article/details/7686436
/usr/local/redis-2.6.14/src/redis-server /etc/redis.conf
编辑完后保存,然后重启系统就OK了。
src/redis-cli shutdown
在VMware的Linux系统上安装Redis的更多相关文章
- Redis进阶实践之二如何在Linux系统上安装安装Redis
一.引言 上一篇文章写了"如何安装VMware Pro虚拟机"和在虚拟机上安装Linux操作系统.那是第一步,有了Linux操作系统,我们才可以在该系统上安装Redis. ...
- Redis进阶实践之二如何在Linux系统上安装安装Redis(转载)(2)
Redis进阶实践之二如何在Linux系统上安装安装Redis 一.引言 上一篇文章写了“如何安装VMware Pro虚拟机”和在虚拟机上安装Linux操作系统.那是第一步,有了Linux操作系统,我 ...
- Redis进阶实践之六Redis Desktop Manager连接Windows和Linux系统上的Redis服务
一.引言 今天本来没有打算写这篇文章,当初我感觉使用这个工具应该很简单,下载的过程也不复杂,也没有打算记录下来.但是在使用的过程中还是出现了一些问题,为了给第一次使用Redis Desktop Man ...
- Redis进阶实践之六Redis Desktop Manager连接Windows和Linux系统上的Redis服务(转载6)
Redis进阶实践之六Redis Desktop Manager连接Windows和Linux系统上的Redis服务 一.引言 今天本来没有打算写这篇文章,但是,今天测试Redis的时候发现了两个问题 ...
- Linux系统下安装Redis和Redis集群配置
Linux系统下安装Redis和Redis集群配置 一. 下载.安装.配置环境: 1.1.>官网下载地址: https://redis.io/download (本人下载的是3.2.8版本:re ...
- linux系统上安装java
linux系统上安装java 如何在ubuntu server上安装java(jre或jdk),主要注意以下几点: 1.下载你想要的java版本压缩包. JRE下载:http://java.com ...
- linux系统上安装svn服务器 环境linux+nginx+svnserver
系统:Ubuntu 12.04 64位 lnmp环境 集成软件:PHP5.4.27.Nginx1.6.0.MySQL5.5.37 阿里云server svnserver有2种执行方式:独立server ...
- Linux系统上安装字体
最近项目中需要控制字体类型,然后就上网查了一下在linux系统上安装字体,在window上和linux上,字体要求一样,都是ttf格式,下面这是window上的字体截图 在linux系统中的/usr/ ...
- 阿里云服务器linux系统上 安装node环境
今天将阿里云服务器重windows系统重置成了linux系统, 点击上面的实例名称,进入到 点击 更换系统盘 选择linux 的centos版本(操作前需要 停止实例) 弄好后,启动实例 下面 ...
随机推荐
- 利用缓存、Timer间隔时间发送微信的实例,很有用的例子
//Class WechatOfferExcutor 此类为微信触发类,属于上层调用类,其中有用到用静态变量缓存offer信息,Task异步执行发送方法等 using Newtonsoft.Json. ...
- ASP.NET MVC2.0 自定义filters
今天大家共同学习下ASP.NET MVC2.0中自定义filters,这一节主要学习下ActionFilterAttribute, ActionFilterAttribute继承IActionFilt ...
- 网页上弹出pop窗口实例,(document).height()与$(window).height()的区别
#dvbg{background-color:#666666; position:absolute; z-index:99; left:0; top:0; display:none; width:10 ...
- Sql使用视图(简单的视图)适合入门-level
创建以便从库更好的数据呼叫和一个数据库,以(例如,该209东东库转移205图书馆) 例:209图书馆有不同的库名:数据库(AIS20140417092531电影库)供应商表(t_Supplier ). ...
- cocos2dx 3.0 它 使用std::bind更换CC_CALLBACK_N
在cocos2dx 3.0 版本号,回调函数本质4一个CC_CALLBACK_N 替换功能.N的回调函数的参数的数量的代表 1.让我们来看看这些CC_CALLBACK_N怎么用 比方action的回调 ...
- CentOS-6.5-x86_64 最小化安装,已安装包的总数,这些包?
一.我们怎么知道有多少的包被安装? [root@localhost ~]# rpm -qa | wc -l 217 二.怎样得知安装了那些软件包? [root@localhost ~]# rpm -q ...
- asp.net 获得客户端 mac 地址
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- 网页动态切换母版页(MasterPage)
原文:网页动态切换母版页(MasterPage) 是否可以变更网页的母版页(MasterPage)呢?某.aspx在创建时,已经附加入某一母版页(MasterPage)了,现需要.aspx动态变更母版 ...
- 最新HTML BroadcastChannel API引荐
HTML BroadcastChannel API 当前浏览器中只有Firefox38唯一能支持BroadcastChannel API(在编写本文的时间点),而Firefox38官方宣称要到2015 ...
- 使用Dropbox+Justwriting+Markdown建立个人博客
使用Dropbox+Justwriting+Markdown建立个人博客,让您真正体会到什么是"简化". 您的博客所有日志存储在您的PC上.即使有一天你的server主机挂了,你的 ...