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_A1072#Gas Station
Source: PAT A1072 Gas Station (30 分) Description: A gas station has to be built at such a location t ...
- Centos 7, Torque 单节点部署
1.准备工作 安装Torque必须首先配置linux主机名称,服务器主机名称大多默认localhost,不建议直接使用localhost. linux主机名称修改地址:http://www.cnblo ...
- SBC37x交叉编译平台QT+OPENCV【2】虚拟机Vbox下Ubuntu的磁盘扩容
虚拟机Vbox下Ubuntu,当初为了学习,仅仅分配了8g,结果qt,opencv等一上,就说room空间不够了.于是开始折腾磁盘扩容. 网上一大堆,也不知道有多少是自己动手走过,正是不但浪费别人时间 ...
- 图论·Dijkstra·HDU2066
这道题刚做的时候用的Floyd,果断超时,于是去学了Dijkstra,主函数和Floyd很像. 原理: 从起点开始,找最近的又未标记的点,记录距离,标记此点,再找此点附近相连的未标记的点,记录下距离, ...
- 在centos6上面安装python3.4
mkdir -p /work cd /work gwet https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz tar -axf Py ...
- confluence中设置应用程序链接到jira
有时需要在confluence中选中文本直接生成issue或story到jira里. 在"一般配置“->“应用程序链接”中创建即可.
- 0608MySQL备份与恢复之percona-xtrabackup软件的使用【基础】
转自http://blog.csdn.net/justdb/article/details/17054579 一 使用percona-xtrabackup的原因 在前面,我们讲到MySQL冷备.热备. ...
- asp.net--Area功能
大型项目必用,这个必须要会,相当于一个MVC的子程序,方便管理,可以理解为一个独立的小MVC程序了 隔离代码.避免冲突 区域是独立的MVC小程序
- HDOJ 5421 Victor and String 回文串自己主动机
假设没有操作1,就是裸的回文串自己主动机...... 能够从头部插入字符的回文串自己主动机,维护两个last点就好了..... 当整个串都是回文串的时候把两个last统一一下 Victor and S ...
- iOS 在 ARC 环境下 dealloc 的使用、理解误区
iOS 在 ARC 环境下 dealloc 的使用.理解误区 太阳火神的漂亮人生 (http://blog.csdn.net/opengl_es) 本文遵循"署名-非商业用途-保持一致&qu ...