看看新版本有那些特性提升,测试用!先安装

网址: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的更多相关文章

  1. 【安装】Redis4.0.10在Linux环境搭建

    1.下载Redis后上传到指定目录 2.解压 tar -zxvf redis-4.0.10.tar.gz 3.进入加压后的目录并编译 cd redis-4.0.10 make 4.进入src目录安装 ...

  2. centos 安装单机版 redis4.0.10

    redis源码地址: http://download.redis.io/releases/ 下载 redis-4.0.10.tar.gz  和  redis-stable.tar.gz 第一步:安装g ...

  3. linux下使用yum安装新版php7.0

    这两天又装了一下虚拟机,又要编译lnmp,还要弄各种拓展,很麻烦,能不能直接yum安装呢?答案是可以的! 1.首先要更新yum源,不然是默认的老版本,一般都在5.6及以下,但是php7都出来好久了,性 ...

  4. linux 安装redis4.0.6

    1.进入/usr/local/src目录,下载redis # cd /usr/local/src# wget http://download.redis.io/releases/redis-4.0.6 ...

  5. 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 ...

  6. Redis4.0.9最新版本安装时出现的问题

    Redis Redis(REmote DIctionary Server,远程数据字典服务器)是开源的内存数据库,常用作缓存或者消息队列. Redis的特点: Redis存在于内存,使用硬盘作为持久化 ...

  7. iKcamp出品|微信小程序|工具安装+目录说明|基于最新版1.0开发者工具初中级教程分享

    iKcamp官网:http://www.ikcamp.com 访问官网更快阅读全部免费分享课程:<iKcamp出品|全网最新|微信小程序|基于最新版1.0开发者工具之初中级培训教程分享>. ...

  8. Redis4.0.0 安装及配置 (Linux — Centos7)

    本文中的两个配置文件可在这里找到 操作系统:Linux Linux发行版:Centos7 安装 下载地址,点这里Redis4.0.0.tar.gz 或者使用命令: wget http://downlo ...

  9. centos6 安装redis-4.0.9

    从redis官网下载Linux redis4.0.9版本,我下载的redis-4.0.9.tar.gz(目前最新稳定版),下载到/usr/local/src目录,如果没有就mkdir创建一个. 下载链 ...

随机推荐

  1. 使用$.getJSON("xx.json" ,function(data){ console.logy(data); })在本地获取 json数据

    使用 $.getJSON() 在本地获取 json数据  默认在谷歌,火狐等其他浏览器,不允许在本地获取服务器数据 所以不能在本地中使用 但是可以IE 11 中又可以使用,所以,测试时建议在IE浏览器 ...

  2. 关于 sublime 的插件 AdvancedNewFile 新建文件/文件夹 插件

    新建文件的插件: 快捷键:Ctrl + N 路径:当前目录下进行创建:js/index.js      表示在当前js目录下面创建index.js box      表示直接在当前目录下面创建一个bo ...

  3. django 渲染模板与 vue 的 {{ }} 冲突解决方法

    如果不可避免的在同一个页面里既有 django 渲染又有 vue 渲染的部分,可有 2 种方式解决 方法一: 采用 vue 的 delimiters  分隔符. new Vue({ delimiter ...

  4. sql server 标量函数的用法

    函数的内容是把汉字转换成拼音 select dbo.uf_GetSpellCode( book_class) from BOOK_MSG

  5. learning scala dependency injection

    println("Step 1: Create a trait which knows how to do create, read, update and delete operation ...

  6. Python多线程笔记(三),queue模块

    尽管在Python中可以使用各种锁和同步原语的组合编写非常传统的多线程程序,但有一种首推的编程方式要优于其他所有编程方式即将多线程程序组织为多个独立人物的集合,这些任务之间通过消息队列进行通信 que ...

  7. 关于 requestAnimationFrame 小结

    一.小谈 requestAnimationFrame: 说起 requestAnimationFrame,我们先看幅图: 相当一部分的浏览器的显示频率是16.7ms, 就是上图第一行的节奏,表现就是“ ...

  8. 2019ICPC徐州自我反省及未来打算

    徐州站结束了有好几天了,然而为了热爱的网络课(qdu-zpj网络课你值得信赖),一直没时间写个博客,今天又来说点心里话 今年的ICPC,就这样都打完了,可惜最终也是没能拿金,不过拿到了块银,也算保底吧 ...

  9. 搭建自己的博客(七):使用bootstrap框架美化导航栏

    前面发现自己写css代码以及很多功能太麻烦,故希望在自己的博客中引入bootstrap框架,bootstrap是一个非常强大的前端框架,简单易学容易上手.附上官网地址:bootstrap官网 我使用的 ...

  10. (转)实验文档5:企业级kubernetes容器云自动化运维平台

    部署对象式存储minio 运维主机HDSS7-200.host.com上: 准备docker镜像 镜像下载地址 复制 12345678910111213141516 [root@hdss7-200 ~ ...