Centos7 安装redis3.2.10(源码包安装)
来源:互联网 发布:淘宝服务公司 编辑:程序博客网 时间:2024/05/22 13:13
Centos7 安装redis3.2.10(源码包安装)
1.redis的最新版官方下载地址
[root@localhost ~]# wget http://download.redis.io/releases/redis-3.2.10.tar.gz
2.解压安装包
[root@localhost ~]# tar -zxvf redis-3.2.10.tar.gz
3.将解压好的文件夹重命名为mysql
[root@localhost local]# mv 解压出来的文件夹名 redis
4.移动redis到/usr/loca/下
[root@localhost ~] mv redis /usr/local/
5.编译安装redis
[root@localhost local] yum install gcc make -y
[root@localhost local] cd redis
[root@localhost redis] make 说明:如果没有明显的错误,则表示编译成功
[root@localhost redis] make install
安装所遇问题
在安装成功之后,可以运行测试,确认Redis的功能是否正常
[root@localhost redis] make test
出现报错:
You need tcl 8.5 or newer in order to run the Redis testmake:
*** [test] Error 1
解决方式
安装tcl
[root@localhostredis]wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
[root@localhost redis] tar xzvf tcl8.6.1-src.tar.gz -C /usr/local/
[root@localhost redis] cd tcl8.6.1/unix/
[root@localhost unix] ./configure
[root@localhost unix] make
[root@localhost unix] make install
再次执行make test 正常
6.修改配置文件
[root@localhost src]# vi ../redis.conf
daemonize 如果需要在后台运行,把该项改为yes
7.启动redis
[root@localhost src]#./redis-server ../redis.conf
redis.conf 的配置信息
1、daemonize 如果需要在后台运行,把该项改为yes
2、pidfile 配置多个pid的地址 默认在/var/run/redis.pid
3、bind 绑定ip,设置后只接受来自该ip的请求
4、port 监听端口,默认是6379
5、loglevel 分为4个等级:debug verbose notice warning
6、logfile 用于配置log文件地址
7、databases 设置数据库个数,默认使用的数据库为0
8、save 设置redis进行数据库镜像的频率。
9、rdbcompression 在进行镜像备份时,是否进行压缩
10、dbfilename 镜像备份文件的文件名
11、Dir 数据库镜像备份的文件放置路径
12、Slaveof 设置数据库为其他数据库的从数据库
13、Masterauth 主数据库连接需要的密码验证
14、Requriepass 设置 登陆时需要使用密码
15、Maxclients 限制同时使用的客户数量
16、Maxmemory 设置redis能够使用的最大内存
17、Appendonly 开启append only模式
18、Appendfsync 设置对appendonly.aof文件同步的频率(对数据进行备份的第二种方式)
19、vm-enabled 是否开启虚拟内存支持 (vm开头的参数都是配置虚拟内存的)
20、vm-swap-file 设置虚拟内存的交换文件路径
21、vm-max-memory 设置redis使用的最大物理内存大小
22、vm-page-size 设置虚拟内存的页大小
23、vm-pages 设置交换文件的总的page数量
24、vm-max-threads 设置VM IO同时使用的线程数量
25、Glueoutputbuf 把小的输出缓存存放在一起
26、hash-max-zipmap-entries 设置hash的临界值
27、Activerehashing 重新hash
- Centos7 安装redis3.2.10(源码包安装)
- Centos7安装Redis3.0
- centos7安装redis3.2.1
- centos7安装redis3.2
- CentOS7下安装redis3
- centos7 安装redis3.06
- Centos7安装redis3.0
- centos7 redis3.2安装
- centos7安装redis3.2.8
- Centos7安装部署Redis3.2.9 (普通用户)
- centos7安装redis3.2.5集群
- centos7 yum安装redis3.2.8
- CentOS7上安装Redis3.2.8
- centos7安装redis3.2.5集群
- CentOS7下安装redis3.2.9
- centos7.2 安装redis3.2.6
- CentOS7源码包安装apache
- Jedis调用之Centos7安装部署redis3.2.8(一)
- Centos7 安装nginx1.10
- Jmeter Response Time Graph
- 人脸检测--Supervised Transformer Network for Efficient Face Detection
- Hibernate异常
- 阿大声道
- Centos7 安装redis3.2.10(源码包安装)
- LeetCode 3 Longest Substring Without Repeating Characters
- JAVA设计模式之单例模式
- 这是史上最全的云栖大会珍贵花絮_看完倍感骄傲!
- 【HTML5】简单实现QQ聊天气泡效果
- 卷积神经网络中用1*1 卷积有什么作用或者好处呢?
- 解决img标签在div中的空隙
- Centos7安装zookeeper3.3.6
- 前端之css-Hack