linux安装redis
来源:互联网 发布:淘宝粉丝数怎么增加 编辑:程序博客网 时间:2024/05/16 09:29
最近一直在看redis的源代码,想着要折腾一下,就安装一下redis。
但是安装过程有些困惑。
基本流程:
wget http://download.redis.io/releases/redis-2.8.19.tar.gztar zxvf redis-2.8.19.tar.gz(有些解压需要tar -zxvf redis-2.8.19.tar.gz,视系统而定)cd redis-2.8.19make testmake && make PREFIX=/home/work/redis install这里/home/work/redis就是编译生成的可执行文件,redis-server,redis-benchmark等的存放位置。
默认会存在给定的这个目录下面的bin目录下,如果不存在bin目录则会创建
细心的人会发现,这里没有configure。是的,redis不需要configure来生成Makefile。
make && make PREFIX=/home/work/redis install如果这里不指定PREFIX就会默认安装到/usr/bin/local。
一些设置:
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize no
这里可以设置为yes来使之成为守护程序。
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
pidfile /var/run/redis.pid
这里可以修改/var/run/redis.pid为自己设定的路径。
# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
port 6379
可以修改端口。
# By default Redis listens for connections from all the network interfaces
# available on the server. It is possible to listen to just one or multiple
# interfaces using the "bind" configuration directive, followed by one or
# more IP addresses.
#
# Examples:
#
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1
绑定任意你本机的地址。
# Specify the log file name. Also the empty string can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile ""
日志文件默认会写到/dev/null,如果需要保留,可以修改,例如logfile "/home/work/redis/log/redis.log"
# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir ./
工作目录,业务数据会写到这里。
下面是redis的benchmark:
https://code.google.com/p/redis/wiki/Benchmarks
- [Redis] Linux系统安装Redis
- Redis--Linux下安装Redis
- Redis 简介、Linux 安装 Redis、Redis 使用
- linux平台Redis安装
- linux 4.5 安装Redis
- linux 安装redis数据库
- linux安装Redis服务器
- linux下redis安装
- linux redis 安装配置
- Linux Redis安装
- linux安装redis
- Linux redis安装
- linux下安装redis
- linux平台Redis安装
- linux安装redis
- linux平台Redis安装
- Linux下安装redis
- Linux安装redis
- Coredata第一课 认识coredata
- 正则表达式:Pattern类与Matcher类详解
- TCP/IP protocol and device
- js控制全角变为半角
- 黑马程序员——Java基础---集合
- linux安装redis
- BodyTagSupport类使用说明
- hot positions' skill
- 短址服务实现的一些算法
- Coredata第二课 实体间的关系
- JAVA 可变参数方法
- 在数据库限制模式下做版本部署的介绍
- webdriver判断元素是否存在
- 乘法表