mac os x install redis-3.2.9
下载、解压、重命名并且编译安装Redis
~ wget http://download.redis.io/releases/redis-3.2.9.tar.gz
~ tar xzf redis-3.2.9.tar.gz
~ mv redis-3.2.9 redis
~ cd redis
~ make
~ make test
~ make install
配置文件redis.conf
redis解压目录里有一个配置文件redis.conf ,编辑此配置文件,找到 dir ./ 这一行[247行]。redis会将内存中的数据写入文件中,而此配置就是指定数据文件保存的路径。
我本机指定的目录:
dir ./
修改为
dir /Users/houxiurong/Software/redis_data/
编辑过后,将配置文件移动到 /usr/local/etc 目录下
~ sudo mv redis.conf /usr/local/etc/
启动Redis
终端输入:
~ /usr/local/bin/redis-server /usr/local/etc/redis.conf
服务启动成功画面:
houxiurong-MacBook-Pro:src houxiurong$ /usr/local/bin/redis-server /usr/local/etc/redis.conf
6508:M 01 Jul 18:21:33.662 * Increased maximum number of open files to 10032 (it was originally set to 256).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.2.9 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 6508
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
6508:M 01 Jul 18:21:33.664 # Server started, Redis version 3.2.9
6508:M 01 Jul 18:21:33.664 * DB loaded from disk: 0.000 seconds
6508:M 01 Jul 18:21:33.664 * The server is now ready to accept connections on port 6379
测试连通性
~ cd /usr/local/bin
~ ./redis-cli
127.0.0.1:6379> set me houxiurong
OK
127.0.0.1:6379> get me
"houxiurong"
设置开机自动启动redis server
新建plist文件
~ sudo vi /Library/LaunchDaemons/io.redis.redis-server.plist
文件内容如下
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>io.redis.redis-server</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/redis-server</string>
<string>/usr/local/etc/redis.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
使用launchctl设置开机自动启动
~ sudo launchctl load /Library/LaunchDaemons/io.redis.redis-server.plist
使用launchctl启动redis server
~ sudo launchctl start io.redis.redis-server
使用launchctl停止redis server
~ sudo launchctl stop io.redis.redis-server
mac os x install redis-3.2.9的更多相关文章
- Mysql On Mac OS: Remove & Install
If you downloaded and installed from .dmg package already, and mightbe sometime it sucks because of ...
- Mac OS X安装Redis
http://my.oschina.net/jackieyeah/blog/524583
- mac os x在PC上安装
系统安装之前的准备工作及安装过程简介 前面我们已经提到,苹果电脑虽然已经采用了x86架构的Intel处理器,但其官方并不提供在非苹果电脑上安装Mac OS的支持.所以,要想在普通PC/笔记本电脑上安装 ...
- Installing Apache, PHP, and MySQL on Mac OS X
I have installed Apache, PHP, and MySQL on Mac OS X since Leopard. Each time doing so by hand. Each ...
- mac OS X下安装Redis及Thinkphp3.1使用Redis
一.安装Redis 1.安装Homebrew 在终端输入ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/install/maste ...
- mac brew install redis 报错
mac brew install redis 报错 /usr/local/opt/php55/bin/phpize /usr/local/opt/php55/bin/phpize: line 61: ...
- Install Docker on Mac OS X(转)
Install Docker on Mac OS X You can install Docker using Boot2Docker to run docker commands at your c ...
- mac brew install redis
在mac 下安装redis 执行brew install redis ==> Downloading http://download.redis.io/releases/redis-2.8.19 ...
- Install wget in Mac OS X Without Homebrew or MacPorts
May 22, 2012 - 31 Comments The command line tool wget lets you retrieve a group of files from FTP an ...
随机推荐
- PAT_A1136#A Delayed Palindrome
Source: PAT_A1136 A Delayed Palindrome (20 分) Description: Consider a positive integer N written in ...
- POJ3069 Saruman's Army【贪心】
Saruman the White must lead his army along a straight path from Isengard to Helm's Deep. To keep tra ...
- nyoj4-ASCII码排序
ASCII码排序 时间限制:3000 ms | 内存限制:65535 KB 难度:2 描述 输入三个字符(可以重复)后,按各字符的ASCII码从小到大的顺序输出这三个字符. 输入 第一行输入一个数N, ...
- Nginx Rewrite(伪静态)
一.作用: 实现URL地址改写. 二.语法: 例:rewrite ^/(.*) http://bbs.wangguangtao.com/$1 permanent; 注:应用位置server.loeat ...
- CentOS6.2上安装Oracle10g报ins_emdb.mk错误处理方法
oracle安装过程报ins_emdb.mk错误,此时继续点击“continue”即可,待Oracle完成安装后,再手工执行相应脚本完成链接即可 在CentOS6.2操作系统上,安装Oracle10g ...
- 0301mysql数据库建表情况
转自博客:http://blog.csdn.net/dreamcode/article/details/8557197 一. 表设计 库名.表名.字段名必须使用小写字母,“_”分割. 库名.表名.字段 ...
- magento 的一些关于addFieldToFilter的查询
1,匹配country_id的首字母,查询国家,返回数组 //查询国家数据集 $countryCollection=Mage::getResourceModel('directory/country_ ...
- linux下apache2更换目录
修改apache2的默认文档目录(默认是在/var/www) 修改命令:sudo gedit /etc/apache2/sites-enabled/000-default 在文档中找到 Documen ...
- android 软键盘的显示与隐藏问题的研究
在android中,常常会和输入法的软件键盘交互.在Manifest文件中,系统给activity的一个属性-windowSoftInputMode来控制输入法的显示方式. 该属性提供了Activit ...
- PixelUtils:像素转换工具
/** 像素转换工具 */ public class PixelUtils { /** * The context. */ private static Context mContext = Cust ...