redis 源码安装
下载redis源码包到/opt/解压并改名为redis,也可以直接从官网下载上传至服务器安装目录
root@apiserver01:/opt/redis/logs# cd /opt/ root@apiserver01:/opt# ls install_saltminion.sh install_zabbixagent.sh nimsoft redis redis-3.2.1.tar.gz zabbix-release_2.4-1+wheezy_all.deb zeus root@apiserver01:/opt# |
建立必要的文件目录
root@apiserver01:/opt/redis# cd /opt/redis/;mkdir {conf,data,logs,bin,pids} root@apiserver01:/opt/redis# ls 00-RELEASENOTES BUGS CONTRIBUTING data INSTALL Makefile README.md runtest runtest-sentinel src utils bin conf COPYING deps logs MANIFESTO redis.conf runtest-cluster sentinel.conf tests root@apiserver01:/opt/redis# |
执行make并copy可执行文件到/opt/redis/bin目录
root@apiserver01:/opt/redis# make root@apiserver01:/opt/redis# cp src/{redis-cli,redis-server,redis-sentinel,redis-check-rdb,redis-check-aof} ../bin -rp root@apiserver01:/opt/redis# ls bin/ redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server root@apiserver01:/opt/redis# |
执行安装脚本
root@apiserver02:/opt/redis/utils# ./install_server.sh Welcome to the redis service installer This script will help you easily set up a running redis server Please select the redis port for this instance: [6379] Selecting default: 6379 Please select the redis config file name [/etc/redis/6379.conf] /opt/redis/conf/6379.conf Please select the redis log file name [/var/log/redis_6379.log] /opt/redis/logs/redis_6379.log Please select the data directory for this instance [/var/lib/redis/6379] /opt/redis/data Please select the redis executable path [] /opt/redis/bin/redis-server Selected config: Port : 6379 Config file : /opt/redis/conf/6379.conf Log file : /opt/redis/logs/redis_6379.log Data dir : /opt/redis/data Executable : /opt/redis/bin/redis-server Cli Executable : /opt/redis/bin/redis-cli Is this ok? Then press ENTER to go on or Ctrl-C to abort. Copied /tmp/6379.conf => /etc/init.d/redis_6379 Installing service... update-rc.d: using dependency based boot sequencing insserv: warning: script 'K01apf' missing LSB tags and overrides insserv: warning: script 'apf' missing LSB tags and overrides Success! Starting Redis server... Installation successful! root@apiserver02:/opt/redis/utils# /etc/init.d/redis_6379 stop Stopping ... Redis stopped root@apiserver02:/opt/redis/utils# |
启动并查看日志
2571:M 09 Jul 17:36:51.448 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 2571:M 09 Jul 17:36:51.448 # Server started, Redis version 3.2.1 2571:M 09 Jul 17:36:51.448 # 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. 2571:M 09 Jul 17:36:51.449 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. |
修改系统参数,解决redis启动WARNING
echo 511 > /proc/sys/net/core/somaxconn echo "vm.overcommit_memory = 1” >> /etc/sysctl.conf echo never > /sys/kernel/mm/transparent_hugepage/enabled |
转载于:https://blog.51cto.com/rovkxu/1834844
redis 源码安装相关推荐
- centos环境访问php显示源码,CentOS 6.8 搭建LNAMP环境(五)- PHP7源码安装Redis和Redis拓展...
一.安装Redis 1.下载redis源码包,将源码包放到/usr/local/src/目录下 这里用的是redis-4.0.2.tar.gz 2.进入src/目录 cd /usr/local/src ...
- redis源码客户端和服务端通信过程
最近想学习一下redis源码,先看一下redis通信流程.由于功力有限,不足之处望大家指正.服务端和客户端通信,一般都是服务端先启动,那先从服务端的源码看起. 首先启动服务端会做一些初始化动作,初始化 ...
- 源码安装redis-3.2.11
redis介绍 Redis是一种开源的,内存中的数据结构存储系统,可用作数据库,消息代理或缓存.由于它是在在受信任的环境中访问,因此不应在Internet上公开.但是,一些Redis服务绑定到公共接口 ...
- LNAMP服务器环境(源码安装)
在安装前先看下它们安装时所需要的依赖库:http://www.cnblogs.com/fps2tao/p/7699448.html 1.nginx源码安装 下载:http://nginx.org/en ...
- LNMP源码安装教程
NGINX源码安装 # 切换阿里的源# yum -y install wget# sudo mv CentOS-Base.repo CentOS-Base.repo.bak# sudo wget -O ...
- 国产银河麒麟系统源码安装Openvas
国产麒麟系统源码安装Openvas 1.银河麒麟安装所需安装源 2.执行更新命令: 3.执行安装命令: 4.安装源码包libmicrohttpd-dev 5.从github下载openvas的源码包, ...
- Redis源码分析(十一)--- memtest内存检测
今天我们继续redis源码test测试包下的其他文件,今天看完的是memtest文件,翻译器起来,就是memory test 内存检测的意思,这个文件虽然说代码量不是很多,但是里面的提及了很多东西,也 ...
- linux python源码安装,linux上源码安装python
以下例子基于python 2.7.9,其他版本同理.# 1.下载python# wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tg ...
- 源码安装OpenStack Ussuri ---Keystone篇
源码安装OpenStack Ussuri -Keystone篇 前面我们进行了准备的操作,现在开始源码安装Keystone ,Keystone源码已经上传到我的gitee上面了,下面我们直接用这上面的 ...
最新文章
- jUnit Test遇到org.apache.ibatis.binding.BindingException
- 合理的布局,绚丽的样式,谈谈Winform程序的界面设计
- 内存可见性和原子性:Synchronized和Volatile的比较
- python 列表加入_加入python中的列表列表
- flink 写kafka_flink消费kafka的offset与checkpoint
- win7旗舰版梦幻主题补丁~完美你的桌面
- 布客·ApacheCN 翻译校对活动进度公告 2020.5
- c语言case后语句,switch语句中case后的标号是什么
- [转]仙剑4破解方法详解(免激活刻盘法)--仙剑爱好者看看[图]
- Java中的箭头->符号
- 计算机网络名怎么设置,网络ssid怎么设置
- 极光Im + layIm 实现后台聊天
- 全球与中国液体合成橡胶(LSR)市场深度研究分析报告
- OKRs, How Google sets goals, Startup Lab workshop | Chatopera
- 整理几个叮咚抢菜、美团买菜助手
- 美国教授对中国学生写英文文章的建议
- 如何提升运行效率(性能优化)
- 基于springboot实现大学生租房系统演示【附项目源码】
- 勒索病毒变种再来!你如何应对措施
- 解决dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib