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

网址: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. javascript动态合并表格相同的单元格

    <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Conten ...

  2. [NOIP 2018]旅行

    题目链接 题意简介:现有一个图,小Y要把它走完,每个点只去一次,路径字典序最小. 分析:这道题我认为很重要的一个点就是它的数据范围.它只有两种 m=n-1 或 m=n.我们先考虑第一种:m=n-1也就 ...

  3. 011——C#创建ecxel文件(附教程)

    (一)参考文献:[C#]创建表格(.xlsx)的典型方法 (二)视频教程:https://v.qq.com/x/page/t30068qfex5.html (三)下载地址:https://downlo ...

  4. Oracle 通过sqlnet.ora文件控制对Oracle数据库的访问

    一.通过sqlnet.ora文件控制对Oracle数据库的访问 出于数据安全考虑,对Oracle数据库的IP做一些限制,只有固定的IP才能访问.修改$JAVA_HOME/NETWORK/ADMIN/s ...

  5. js文件上传下载组件

    在Web应用系统开发中,文件上传和下载功能是非常常用的功能,今天来讲一下JavaWeb中的文件上传和下载功能的实现. 先说下要求: PC端全平台支持,要求支持Windows,Mac,Linux 支持所 ...

  6. learning scala Function Recursive Tail Call

    可以使用scala库,可以从字面上看出是在调用 递归函数: code import scala.util.control.TailCalls._ val arrayDonuts: Array[Stri ...

  7. 利用QSystemSemaphore和QSharedMemory实现进程间通讯

    https://blog.csdn.net/liji_digital/article/details/70547082 线程间的通讯可以由QSemaphore调控,以保证各个线程对同一资源的访问不冲突 ...

  8. Linux操作系统常用命令合集——第一篇-文件和目录操作(40个命令)

    一.选项和参数的区别        在经过上一次的系统安装后我们已经成功登陆,登陆LInux后,我们就可以在#或$符后面去输入命令,有的时候命令后面还会跟着“选项”(英文名:options)或“参数” ...

  9. 07_Kibana界面操作ES

    Kibana界面的API操作ES 1.创建索引 1.1 指定分片数量和备份数量 1.2 创建默认 2. 查看索引 2.1 查看单个索引设置 2.2 查看所有索引设置 3.文档管理 3.1 添加文档 3 ...

  10. tsnr--基于vpp+dpdk的高性能防火墙

    tsnr--基于vpp+dpdk的高性能防火墙 2019年01月31日 12:06:00 网络安全研发随想 阅读数:508   版权声明:本文为博主原创文章,未经博主允许不得转载. https://b ...