CentOS7下安装Redis5.0.2
1、下载redis 地址 http://download.redis.io/releases/redis-5.0.2.tar.gz
2、解压tar -zxf redis-5.0.2.tar.gz
3、缺少gcc环境需要yum install gcc -y
3.1 make编译
3.2 报错:
[root@lang redis-5.0.2]# make
cd src && make all
make[1]: Entering directory `/usr/local/redis-4.0.10/src'
CC adlist.o
In file included from adlist.c:34:
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/usr/local/redis-4.0.10/src'
make: *** [all] Error 2
redis解压目录下有个README.md文件中有如下一段话:
Selecting a non-default memory allocator when building Redis is done by setting the `MALLOC` environment variable. Redis is compiled and linked against libc malloc by default, with the exception of jemalloc being the default on Linux systems. This default was picked because jemalloc has proven to have fewer fragmentation problems than libc malloc.
To force compiling against libc malloc, use:
% make MALLOC=libc
To compile against jemalloc on Mac OS X systems, use:
% make MALLOC=jemalloc
4、编译加上MALLOC=libc 即可
#make MALLOC=libc
5、运行redis

修改配置文件 redis.conf
daemonize no 改为 yes 后台运行:
protected-mode yes 改为no 可以不用输入密码登陆
daemonize yes 改为no
requirepass "xiaoqi@Redis" 这里可以设置自己想要设置的密码/默认是加#的,去掉即可
bind 127.0.0.1 表示只可以本机访问,要是远程访问需要注释掉(前面加#号即可)
6、带配置文件后台启动
[root@lang redis-5.0.2]# src/redis-server redis.conf
7897:C 06 Dec 2018 06:25:57.484 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
7897:C 06 Dec 2018 06:25:57.484 # Redis version=5.0.2, bits=64, commit=00000000, modified=0, pid=7897, just started
7897:C 06 Dec 2018 06:25:57.484 # Configuration loaded
[root@lang redis-5.0.2]# ps -ef | grep redis
root 7898 1 4 06:25 ? 00:00:00 src/redis-server *:6379
root 7903 2880 0 06:25 pts/1 00:00:00 grep redis
[root@lang redis-5.0.2]#src/redis-clt 127.0.0.1 #可以测试是否可以本地进入redis
CentOS7下安装Redis5.0.2的更多相关文章
- CentOS7.6下安装Redis5.0.7
此次安装是在CentOS7下安装Redis5.0.7 一.首先准备Redis安装包 这里下载的是 redis-5.0.7.tar.gz 安装包,并将其直接放在了 root ⽬录下 压缩包下载地址:ht ...
- Centos7.4下安装Redis5.0
一.下载Redis Redis下载地址:https://redis.io/download 二.安装依赖包 安装Redis之前需要安装c++命令 yum install gcc-c++ 三.上传并解压 ...
- CentOS7中安装redis5.0
1. 环境介绍 CentOS7 (未安装Development Tools) 2. 下载Redis5.0-rc3 wget -O redis-5.0-rc3.tar.gz https://github ...
- CENTOS7下安装REDIS4.0.11
拷贝收藏私用,别无他意,原博客地址: https://www.cnblogs.com/zuidongfeng/p/8032505.html 1.安装redis 第一步:下载redis安装包 wget ...
- Linux下安装Redis5.0.2
1.下载redis 地址 http://download.redis.io/releases/redis-5.0.2.tar.gz 2.解压tar -zxf redis-5.0.2.tar.gz 3. ...
- Linux 下安装 redis5.0
1.redis 安装 wget http://download.redis.io/rele... tar -zxvf redis-5.0.5.tar.gz cd redis-5.0.5.tar.gz ...
- centos7下安装mysql8.0.12及设置权限
一.mysql版本介绍 mysql的官网为:https://www.mysql.com/ 在官网上可以看到多个版本,主要版本如下, 1.MySQL Community Server 社区版本,开源免费 ...
- Centos7下安装MySQL8.0.23-小白的开始
首先简单介绍一下什么叫MySQL: 数据库简而言之就是存储数据的仓库,为了方便数据的存储和管理,它将数据按照特定的规律存储在磁盘上.是为了实现一定的目的,按照某种规则组织起来的数据的集合: MySQL ...
- Mac下安装redis5.0 与命令
参考链接:https://blog.csdn.net/zyp1376308302/article/details/84257606 参开链接2:https://www.cnblogs.com/guan ...
随机推荐
- Python全栈之路----常用模块----hashlib加密模块
加密算法介绍 HASH Python全栈之路----hash函数 Hash,一般翻译做“散列”,也有直接音译为”哈希”的,就是把任意长度的输入(又叫做预映射,pre-image),通过散列 ...
- Mawawa CSS 学习之旅 Display
CSS 类型之 Display 更新时间: 2018-2-10: 一个良好的布局结构从 display 开始! 分类:外部值.内部值.列表值.属性值.混合值.显示值.全局值: 一.外部值 作用:主要用 ...
- ASCII工具类
对字符串简单的加密解密 描述:加密的时候对每个字符转成ASCII的时候进行 +1操作,最后用 “/” 拼接,解密原理相反. /** * ASCII 工具类 * Created by Administr ...
- UE4 材质编辑
1.颜色反转(纹理颜色白变黑,黑变白)
- python中常见的报错,总结一下,以后看。
AttributeError 试图访问一个对象没有的属性,比如,乔峰.nameIOError 输入.输出异常:基本上无法打开文件ImportError 无法引入模块或者是包:基本上是路径问题,或者是名 ...
- Resin安装配置
在linux下安装Resin过程整理 下载Resin, http://caucho.com/products/resin/download#download 检查JDK是否安装,环境是否配置 ...
- 学习笔记TF053:循环神经网络,TensorFlow Model Zoo,强化学习,深度森林,深度学习艺术
循环神经网络.https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/3_NeuralNetworks/re ...
- 引擎设计跟踪(九.14.3.2) Deferred shading的后续实现和优化
最近完成了deferred shading和spot light的支持, 并作了一部分优化. 之前forward shading也只支持方向光, 现在也支持了点光源和探照光. 对于forward sh ...
- websocket 2 rest api
需要开发一个prometheus 的exporter 使用jmespath 获取对应metrics的数据,并进行转换处理,但是因为那个服务 提供的接口是通过websoket 的实时api,所以基于no ...
- C 函数传参问题
1. 传指针 传入指针时会改变指针指向的内容 2. 传变量 传入变量,不会改变变量的内容,只是使用变量的数据