[root@HadoopNode00 ~]# yum install gcc-c++
[root@HadoopNode00 ~]# yum install gcc-c++
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
extras/primary_db | 29 kB 00:00
updates | 3.4 kB 00:00
Package gcc-c++-4.4.7-23.el6.x86_64 already installed and latest version
Nothing to do
// 解压Redis
[root@HadoopNode00 ~]# tar -zxf redis-4.0.10.tar.gz
// make
[root@HadoopNode00 redis-4.0.10]# make
...
Hint: It's a good idea to run 'make test' ;)
make[1]: Leaving directory `/root/redis-4.0.10/src'
// 修改配置文件
[root@HadoopNode00 redis-4.0.10]# vi redis.conf
bind HadoopNode00
protected-mode no
daemonize yes
// 启动Redis + redis.conf
[root@HadoopNode00 redis-4.0.10]# ./src/redis-server redis.conf
48297:C 20 Dec 16:39:42.521 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
48297:C 20 Dec 16:39:42.521 # Redis version=4.0.10, bits=64, commit=00000000, modified=0, pid=48297, just started
48297:C 20 Dec 16:39:42.521 # Configuration loaded
// 客户端连接Redis服务
[root@HadoopNode00 redis-4.0.10]# ./src/redis-cli -h HadoopNode00 -p 6379
HadoopNode00:6379>
// 启动服务
[root@localhost redis-4.0.10]# ./src/redis-server
30582:C 20 Dec 16:19:41.296 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
30582:C 20 Dec 16:19:41.296 # Redis version=4.0.10, bits=64, commit=00000000, modified=0, pid=30582, just started
30582:C 20 Dec 16:19:41.296 # Warning: no config file specified, using the default config. In order to specify a config file use ./src/redis-server /path/to/redis.conf
30582:M 20 Dec 16:19:41.297 * Increased maximum number of open files to 10032 (it was originally set to 1024).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 4.0.10 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 30582
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
30582:M 20 Dec 16:19:41.304 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
30582:M 20 Dec 16:19:41.304 # Server initialized
30582:M 20 Dec 16:19:41.305 # 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.
30582:M 20 Dec 16:19:41.305 # 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.
30582:M 20 Dec 16:19:41.305 * Ready to accept connections
// 客户端连接Redis
[root@localhost redis-4.0.10]# ls
00-RELEASENOTES BUGS COPYING INSTALL MANIFESTO runtest runtest-sentinel src utils
1 CONTRIBUTING deps Makefile README.md runtest-cluster sentinel.conf tests
[root@localhost redis-4.0.10]# ./src/redis-cli -p 6379
127.0.0.1:6379>