安装新版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创建一个. 下载链 ...
随机推荐
- 【安卓基础】ViewPager2的入门使用
之前的项目中使用过ViewPager,被坑过几次.如果你在RecyclerView中的Item使用ViewPager,你绝对会产生莫名其妙的问题,因为ViewPager在同一界面上不能有两个一样的ID ...
- HTML 002 基础
HTML 基础- 4个实例 HTML 标题 HTML 标题(Heading)是通过<h1> - <h6> 标签来定义的. 实例 <h1>这是一个标题</h1& ...
- QVariantMap 和 QVariant
typedef QVariantMap Synonym for(同义词) QMap<QString, QVariant>. QVariant类型的放入和取出必须是相对应的,你放入一个int ...
- Bzoj 2588 Spoj 10628. Count on a tree(树链剖分LCA+主席树)
2588: Spoj 10628. Count on a tree Time Limit: 12 Sec Memory Limit: 128 MB Description 给定一棵N个节点的树,每个点 ...
- docker部署springboot应用
1.安装运行node image docker pull java:8 2.将编译后的jar包上传到主机上 3.编写dockerfile,并创建镜像 Dockerfile FROM java:8MAI ...
- python 查看某个模块都有什么方法
1.看官方文档 https://docs.python.org/3/search.html?q=os&check_keywords=yes&area=default 2.看源码 3.d ...
- python学习:模块(第一节)
1.什么是模块? 如果你从 Python 解释器退出再进入,那么你定义的所有的方法和变量就都消失了.为此 Python 提供了一个办法,把这些定义存放在文件中,为一些脚本或者交互式的解释器实例使用,这 ...
- zabbix (二)安装
一.centos7源码安装zabbix3.x 1.安装前环境搭建 下载最新的yum源 #wget -P /etc/yum.repos.d http://mirrors.aliyun.com/repo/ ...
- (转)glances用法
借鉴:https://www.ibm.com/developerworks/cn/linux/1304_caoyq_glances/index.html glances 可以为 Unix 和 Linu ...
- openfoam变热物性参数的设置【转载】
转载自:http://blog.sina.com.cn/s/blog_9de422500102va73.html 物性参数在constant/thermophysicalProperties文件中设置 ...