安装新版redis4.0.6
看看新版本有那些特性提升,测试用!先安装
网址:https://redis.io/download
获取:wget http://download.redis.io/releases/redis-4.0.6.tar.gz
解压:tar xzvf redis-4.0.6.tar.gz
从软件目录移动目录
mv redis-4.0.6 /usr/local/
cd redis-4.0.6/
解压目录
[root@@@@@@ redis-4.0.6]# ls
00-RELEASENOTES CONTRIBUTING deps Makefile README.md runtest runtest-sentinel src utils
BUGS COPYING INSTALL MANIFESTO redis.conf runtest-cluster sentinel.conf tests
编译
redis-4.0.6]# make
[root@@@@@@ redis-4.0.6] cd src
[root@@@@@@ redis-4.0.6] mkdir ../../redis
[root@@@@@@ src] make install PREFIX=/usr/local/redis (网上好多教程需要完成后在移动到这里?只不过没用到PREFIX)
[root@@@@@@ src]# cd ../../redis/bin
[root@@@@@@@ bin]# ls
redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server
[root@@@@@@@ bin]# ./redis-server
5790:C 22 Jan 16:00:16.699 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5790:C 22 Jan 16:00:16.699 # Redis version=4.0.6, bits=64, commit=00000000, modified=0, pid=5790, just started
5790:C 22 Jan 16:00:16.699 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 4.0.6 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 5790
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-' 5790:M 22 Jan 16:00:16.700 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
5790:M 22 Jan 16:00:16.700 # Server initialized
5790:M 22 Jan 16:00:16.700 # 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.
5790:M 22 Jan 16:00:16.700 # 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.
5790:M 22 Jan 16:00:16.700 * Ready to accept connections
后台运行(当前模式关闭后 Linux关闭 redis也会关闭)
mv redis-4.0.6/redis.conf redis/etc
vim redis/etc/redis.conf
daemonize no 更改yes 136行
bin]# ./redis-server /usr/local/redis/etc/redis.conf 重新加载
5868:C 22 Jan 16:27:26.417 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5868:C 22 Jan 16:27:26.417 # Redis version=4.0.6, bits=64, commit=00000000, modified=0, pid=5868, just started
5868:C 22 Jan 16:27:26.417 # Configuration loaded
[root@@@@@ bin]# ./redis-cli
127.0.0.1:6379> exit
[root@@@@@ bin]# netstat -tunpl|grep 6379
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 5869/./redis-server
加载自运行
复制自身所带的配置文件
cp /usr/local/redis-4.0.6/utils/redis_init_script /etc/init.d/redis
vim redis 根据自己的文件名配置(重点)
#!/bin/sh
#
# chkconfig:
# description:Redis is a persistent key-value database REDISPORT=
EXEC=/usr/local/redis/bin/redis-server
CLIEXEC=/usr/local/redis/bin/redis-cli PIDFILE=/var/run/redis_${REDISPORT}.pid
CONF="/usr/local/redis/etc/redis.conf"
测试:
[root@##### init.d] service redis start
Starting Redis server...
:C Jan ::32.913 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
:C Jan ::32.913 # Redis version=4.0., bits=, commit=, modified=, pid=, just started
:C Jan ::32.913 # Configuration loaded
[root@#### utils]# netstat -tunpl |grep redis
tcp 127.0.0.1: 0.0.0.0:* LISTEN /redis-server
[root@##### utils]# service redis stop
Stopping ...
Redis stopped
[root@iz2ze6hca4hfg1a0ekonzoz utils]# netstat -tunpl |grep redis
[root@iz2ze6hca4hfg1a0ekonzoz utils]#
安装新版redis4.0.6的更多相关文章
- 【安装】Redis4.0.10在Linux环境搭建
1.下载Redis后上传到指定目录 2.解压 tar -zxvf redis-4.0.10.tar.gz 3.进入加压后的目录并编译 cd redis-4.0.10 make 4.进入src目录安装 ...
- centos 安装单机版 redis4.0.10
redis源码地址: http://download.redis.io/releases/ 下载 redis-4.0.10.tar.gz 和 redis-stable.tar.gz 第一步:安装g ...
- linux下使用yum安装新版php7.0
这两天又装了一下虚拟机,又要编译lnmp,还要弄各种拓展,很麻烦,能不能直接yum安装呢?答案是可以的! 1.首先要更新yum源,不然是默认的老版本,一般都在5.6及以下,但是php7都出来好久了,性 ...
- linux 安装redis4.0.6
1.进入/usr/local/src目录,下载redis # cd /usr/local/src# wget http://download.redis.io/releases/redis-4.0.6 ...
- centos7.5 安装 redis-4.0.11
1.下载redis包 wget wget http://download.redis.io/releases/redis-4.0.11.tar.gz 2.解压安装 #解压 .tar.gz #安装 cd ...
- Redis4.0.9最新版本安装时出现的问题
Redis Redis(REmote DIctionary Server,远程数据字典服务器)是开源的内存数据库,常用作缓存或者消息队列. Redis的特点: Redis存在于内存,使用硬盘作为持久化 ...
- iKcamp出品|微信小程序|工具安装+目录说明|基于最新版1.0开发者工具初中级教程分享
iKcamp官网:http://www.ikcamp.com 访问官网更快阅读全部免费分享课程:<iKcamp出品|全网最新|微信小程序|基于最新版1.0开发者工具之初中级培训教程分享>. ...
- Redis4.0.0 安装及配置 (Linux — Centos7)
本文中的两个配置文件可在这里找到 操作系统:Linux Linux发行版:Centos7 安装 下载地址,点这里Redis4.0.0.tar.gz 或者使用命令: wget http://downlo ...
- centos6 安装redis-4.0.9
从redis官网下载Linux redis4.0.9版本,我下载的redis-4.0.9.tar.gz(目前最新稳定版),下载到/usr/local/src目录,如果没有就mkdir创建一个. 下载链 ...
随机推荐
- 转,sql server update set from inner 批量修改的使用
SQL update select结合语句详解及应用 QL update select语句 最常用的update语法是: 1 2 UPDATE TABLE_NAME SET column_name ...
- sql server update inner join on 的使用
假定我们有两张表,一张表为Product表存放产品信息,其中有产品价格列Price:另外一张表是ProductPrice表,我们要将ProductPrice表中的价格字段Price更新为Price表中 ...
- Linux系统出现hung_task_timeout_secs和blocked for more than 120 seconds的解决方法
Linux系统出现系统没有响应. 在/var/log/message日志中出现大量的 “echo 0 > /proc/sys/kernel/hung_task_timeout_secs" ...
- visual studio2015窗体中控件的属性中文说明不见了
右击属性窗口,然后选中好说明就ok了.
- Pyhton3异常处理
例: while True: try: x = int(input("Please enter a number: ")) ...
- 三行代码CSS竖向居中
.element{ position:relative; top:50%; transform:translateY(-50%); } 这里无需设置高度或者父元素的position属性.(IE9可用) ...
- 为什么HashMap桶(链表)的长度超过8才会转换成红黑树
百度了一下,感觉能说清楚的并不多,所以在此记录一下. 首先说一说转换为红黑树的必要性:红黑树的插入.删除和遍历的最坏时间复杂度都是log(n),因此,意外的情况或者恶意使用下导致hashCode()方 ...
- androidStudio: ERROR: Error occurred while communicating with CMake server.
遇到此错误的原因是cmake服务器协议版本不匹配: 解决方案: 1:直接更新android studio看能否解决: 2:如果解决不了,那么将androidstudio,ndk ,cmake,grad ...
- hystrix流程图收藏
最近在看张开涛的亿级流量的书,学习了一个新的防雪崩的功能hystrix,在学习这个功能的过程中,看了一些网站也温习了一些知识,例如double_check locking功能,还有cache的击穿作为 ...
- angular中父组件给子组件传值-@input
1. 父组件调用子组件的时候传入数据 <app-header [msg]="msg"></app-header> 2. 子组件引入 Input 模块 imp ...