redis 的源码编译安装
首先我们下载软件包到指定的目录下
tar -zxvf redis-2.8.19.tar.gz
cd redis-2.8.19
make
make PREFIX=/usr/local/redis install
mkdir /usr/local/redis/etc/
cp redis.conf /usr/local/redis/etc/
cd /usr/local/redis/bin/
cp redis-benchmark redis-cli redis-server /usr/bin/
vim /usr/local/redis/etc/redis.conf # 修改一下配置我们现在来看一下配置文件
# redis以守护进程的方式运行
# no表示不以守护进程的方式运行(会占用一个终端)
daemonize yes # 客户端闲置多长时间后断开连接,默认为0关闭此功能
timeout 300 # 设置redis日志级别,默认级别:notice
loglevel verbose # 设置日志文件的输出方式,如果以守护进程的方式运行redis 默认:""
# 并且日志输出设置为stdout,那么日志信息就输出到/dev/null里面去了
logfile stdout
6379.conf
daemonize yes
pidfile /var/run/redis_6379.pid
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 0
loglevel notice
logfile /usr/local/redis/logs/redis_6379.log
databases 16
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /usr/local/redis/6379
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes
6380.conf
daemonize yes
pidfile /var/run/redis_6380.pid
port 6380
tcp-backlog 511
timeout 0
tcp-keepalive 0
loglevel notice
logfile /usr/local/redis/logs/redis_6380.log
databases 16
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /usr/local/redis/6380
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes
参考文章:https://segmentfault.com/a/1190000003084917
redis 的源码编译安装的更多相关文章
- CentOS 7.4 源码编译安装 Redis
一.CentOS 7.4 源码编译安装 Redis 1.下载源码并解压 wget http://download.redis.io/releases/redis-4.0.10.tar.gz tar ...
- 小D课堂 - 零基础入门SpringBoot2.X到实战_第9节 SpringBoot2.x整合Redis实战_38、源码编译安装Redis4.x
笔记 2.源码编译安装Redis4.x 简介:使用源码安装Redis4.x和配置外网访问 1.快速安装 https://redis.io/download#installation ...
- 源码编译安装lnmp环境
一.源码编译安装步骤 首先说明源码安装的好处 速度快,可自定义路径 主要有三步:1.配置 进入源码安装包 ./configure --prefix=/uer/local/nginx 可指定参数 ...
- centos7源码编译安装lamp/lnmp
centos7源码编译安装lamp/lnmp 进程:是包工头(相当于是个门,只管开门关门,不管门内的事儿) 线程:是各种工种(cpu调度的是线程) 进程 是一件事情, 线程 是 同一个时间范围内 同时 ...
- SSH/SSL 源码编译安装简易操作说明
环境:CentOS 6.7 安全加固需求,由于某盟扫描系统主机有SSL系列漏洞,客户要求必须修复: 解决方案:将SSH/SSL升级到最新版本,删除SSL旧版本(实测不删除旧版本某盟扫描无法通过). 当 ...
- 源码编译安装 MySQL 5.5.x 实践
1.安装cmakeMySQL从5.5版本开始,通过./configure进行编译配置方式已经被取消,取而代之的是cmake工具.因此,我们首先要在系统中源码编译安装cmake工具. # wget ht ...
- 烂泥:mysql5.5数据库cmake源码编译安装
本文由秀依林枫提供友情赞助,首发于烂泥行天下. 以前也写过一篇有关mysql5.0源码编译的文章,该文章为<烂泥:mysql5.0数据库源码编译安装>.但是MySQL自5.5版本以后,就开 ...
- Centos7.X 源码编译安装subversion svn1.8.x
说明:SVN(subversion)的运行方式有两种:一种是基于Apache的http.https网页访问形式:还有一种是基于svnserve的独立服务器模式.SVN的数据存储方式也有两种:一种是在B ...
- centos6.5环境源码编译安装mysql5.6.34
centos6.5环境源码编译安装mysql5.6.34 源码下载地址http://dev.mysql.com/downloads/mysql/5.6.html#downloads 选择Generic ...
随机推荐
- JavaScript下的setTimeout(fn,0)意味着什么?
近期在研究异步编程的我对于setTimeout之类的东西异常敏感.在SegmentFault上看到了一个问题<关于SetTimeout时间设为0时>:提问者读了一篇文章,原文解释setTi ...
- iOS开发中的http浅析
至于为什么要进行HTTP请求我就不说了.本文主要对HTTP协议做了一些介绍,主要针对网络编程和面试. 先从流程开始说起 APP <---> 服务器 <---> 后台 1) ...
- 环信SDK报错处理方法obtain an updated library from the vendor, or disable bitcode for this target. for archit
ld: '/Users/momo/Desktop/ThreeFingers/Pods/EaseMobSDKFull/EaseMobSDKFull/lib/libEaseMobClientSDK_arm ...
- 长链接转换成短链接(iOS版本)
首先需要将字符串使用md5加密,添加NSString的md5的类别方法如下 .h文件 #import <CommonCrypto/CommonDigest.h> @interface NS ...
- iOS多线程实现3-GCD
原文链接:http://www.cnblogs.com/mddblog/p/4767559.html 敲下gcd三个字母,搜狗第一条显示居然是“滚床单” ^_^ 一.介绍 GCD,英文全称是Grand ...
- TNS-12518 & Linux Error:32:Broken pipe
最近一周,有一台ORACLE数据库服务器的监听服务在凌晨2点过几分的时间点突然崩溃,以前从没有出现过此类情况,但是最近一周出现了两次这种情况,检查时发现了如下一些信息: $ lsnrctl servi ...
- 【Python】用户登录三次锁定
这是从另外一个博客考过了的,借鉴一下,怕下次找不到1 # -*- coding:utf-8 -*- 2 3 #登录三次锁定用户 4 5 #用于计数(循环三次的判断) 6 count = 0 7 8 # ...
- c#获取时间
DateTime.Now.AddDays(10).ToShortDateString().ToString() addDays(整数) 一天前DateTime.Now.AddDays(-1).ToSh ...
- MYSQL 5.7 无法启动(Could not open error log file errno 2)
前两天电脑中毒, 病毒好像把mysql的 log.err 文件给删掉了.然后服务一直启动不了:Could not open error log file errno 2. 然后疯狂百度,搜索的结果大多 ...
- Linux非root用户如何使用80端口启动程序
默认情况下Linux的1024以下端口是只有root用户才有权限占用,我们的tomcat,apache,nginx等等程序如果想要用普通用户来占用80端口的话就会抛出java.net.BindExce ...