CentOS 6.7 Linux系统下 安装redis3.0.7
来源:互联网 发布:盐城龙卷风 知乎 编辑:程序博客网 时间:2024/06/17 05:30
1.准备工作(先安装jdk,再安装redis,这里不做讲解)
[root@DHC share]# yum -y install gcc gcc-C++libstdc++-devel
2.下载安装文件
到官网http://redis.io/ 下载最新stable版 Redis-3.0.7.tar.gz
wgethttp://download.redis.io/releases/redis-3.0.7.tar.gz
3.解压文件
[root@DHC share]# tar -xvf redis-3.0.7.tar.gz
[root@DHC share]# ls
applications info Java man redis-3.0.7 redis-3.0.7.tar.gz
[root@DHC share]# cd redis-3.0.7
4.编译
[root@DHC redis-3.0.7]# make (如果make不成功使用make MALLOC=libc)
cd src &&make all
make[1]: Enteringdirectory `/usr/local/share/redis-3.0.7/src'
rm -rf redis-serverredis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof *.o*.gcda *.gcno *.gcov redis.info lcov-html
(cd ../deps&& make distclean)
……………………
CC redis-check-aof.o
LINK redis-check-aof
Hint: It's a goodidea to run 'make test' ;)
make[1]: Leavingdirectory `/usr/local/share/redis-3.0.7/src'
[root@DHC redis-3.0.7]#
5.测试编译(可选)
[root@DHC redis-3.0.7]# make test
cd src &&make test
make[1]: Enteringdirectory `/usr/local/share/redis-3.0.7/src'
You need tcl 8.5 ornewer in order to run the Redis test
make[1]: *** [test]Error 1
make[1]: Leavingdirectory `/usr/local/share/redis-3.0.7/src'
make: *** [test]Error 2
(出错了 安装tcl)
[root@DHC redis-3.0.7]# yum -y install tcl
然后再执行 make test 就不错报了
6.安装到指定目录
[root@DHC redis-3.0.7]# pwd
/usr/local/share/redis-3.0.7
[root@DHC redis-3.0.7]# ls
00-RELEASENOTES BUGS CONTRIBUTING COPYING deps INSTALL Makefile MANIFESTO README redis.conf runtest runtest-cluster runtest-sentinel sentinel.conf src tests utils
[root@DHC redis-3.0.7]# make PREFIX=/usr/local/share/redis-3.0.7 install
cd src &&make install
make[1]: Enteringdirectory `/usr/local/share/redis-3.0.7/src'
Hint: It's a goodidea to run 'make test' ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
make[1]: Leavingdirectory `/usr/local/share/redis-3.0.7/src'
[root@DHC redis-3.0.7]# ls(多出个bin目录)
00-RELEASENOTES bin BUGS CONTRIBUTING COPYING deps INSTALL Makefile MANIFESTO README redis.conf runtest runtest-cluster runtest-sentinel sentinel.conf src tests utils
[root@DHC redis-3.0.7]# cd bin/
[root@DHC bin]#ll
total 15468
-rwxr-xr-x. 1 rootroot 4589147 Feb 19 01:06 redis-benchmark
-rwxr-xr-x. 1 rootroot 22185 Feb 19 01:06 redis-check-aof
-rwxr-xr-x. 1 rootroot 45403 Feb 19 01:06redis-check-dump
-rwxr-xr-x. 1 rootroot 4698362 Feb 19 01:06 redis-cli
lrwxrwxrwx. 1 rootroot 12 Feb 19 01:06 redis-sentinel-> redis-server
-rwxr-xr-x. 1 rootroot 6471327 Feb 19 01:06 redis-server
7.启动服务
[root@DHC redis-3.0.7]# ./bin/redis-server redis.conf
6546:M 19 Feb01:10:36.132 * Increased maximum number of open files to 10032 (it wasoriginally set to 1024).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0.7 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 6546
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
6546:M 19 Feb01:10:36.158 # WARNING: The TCP backlog setting of 511 cannot be enforcedbecause /proc/sys/net/core/somaxconn is set to the lower value of 128.
6546:M 19 Feb01:10:36.160 # Server started, Redis version 3.0.7
6546:M 19 Feb01:10:36.160 # WARNING overcommit_memory is set to 0! Background save may failunder low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to/etc/sysctl.conf and then reboot or run the command 'sysctlvm.overcommit_memory=1' for this to take effect.
6546:M 19 Feb01:10:36.160 # WARNING you have Transparent Huge Pages (THP) support enabled inyour kernel. This will create latency and memory usage issues with Redis. Tofix 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 berestarted after THP is disabled.
6546:M 19 Feb 01:10:36.161 * The server is now readyto accept connections on port 6379
启动成功
- CentOS 6.7 Linux系统下 安装redis3.0.7
- Linux下安装Redis3
- CentOS下安装Redis3集群
- Redis3安装(linux系统)
- linux下安装redis3.2
- linux下redis3.2.5安装
- Linux下安装Redis3.2.5
- linux下安装redis3.2
- linux下安装redis3.2
- centos安装redis3为系统服务
- [置顶]centos安装redis3为系统服务
- CentOS 7 安装 redis3.0.7 详细步骤
- 【Redis】一 CentOS 6.7 redis3 集群安装
- LINUX系统中安装Redis3.2.8
- LINUX系统中安装Redis3.2.8
- LINUX系统中安装Redis3.2.8
- centos安装redis3.0
- CentOS安装Redis3.2.1
- [Android Exercise]仿微信游戏界面PART.1—ConstraintLayout和RecyclerView的应用
- 使用mmenu制作侧边抽屉菜单
- 对Java中递归的再思考
- git checkout v4.12
- JAVA用UDP实现通信
- CentOS 6.7 Linux系统下 安装redis3.0.7
- 领域模型驱动设计(Domain Driven Design)入门概述
- bzoj1295 [SCOI2009]最长距离(spfa)
- jdk update 和 jdk SE Developer Kit的区别
- java:常见加密解密算法的实现:MD5/SHA/HMAC/DES/PBE/AES/RSA/D-H
- MySQL中explain命令的type指标讲解
- 实现歌词滚动
- angularjs DIV滚动条置底
- Android探索之旅(第二十八篇)BaseActivity,BaseFragment封装必要点