CentOS 6.7 Linux系统下 安装redis3.0.7
2017-09-06 17:13
501 查看
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
启动成功
[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 Linux系统下安装Redis过程和配置参数说明
- hadoop系列之一安装linux系统CentOS6.7
- CentOS Linux系统下安装Redis过程和配置参数说明
- CentOS6.7 linux系统下安装Nginx
- Linux下centos系统安装redis和php-redis
- CentOS Linux系统下安装Redis过程和配置参数说明
- 在linux(centos)系统安装redis教程
- CentOS6.7 linux系统下安装jdk
- 通过网络安装Linux(CentOS)系统的方法
- 在linux系统(CentOS)上安装中文支持包
- [转]Linux(CentOS 6.2)系统上安装Mplayer播放器
- 2,Linux系统centos在vmware下的安装
- Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因
- centos 5.6 linux安装系统后的基本优化
- XP系统下用虚拟机安装centos 5.6(Linux系统)图文教程(一)—“快速安装”
- Linux(Centos5.5) redis 安装及redisphp拓展安装应用
- XP系统下安装Linux Centos5.4 的过程与体会
- 为CentOS5.8 linux系统的firefox浏览器安装中文语言包和flash插件
- Linux(Centos6。0) redis 安装及redisphp拓展安装应用和redis.conf 的详细解析
- 为CentOS5.8 linux系统的firefox浏览器安装中文语言包和flash插件