#make进行编译
[liangjiaojiao@hadoop100 redis-6.2.1]$ make
一、错误1
#执行命令完成安装
make MALLOC=libc
二、 错误
步骤:1.cd 到redis文件中的src目录
2.chmod +x mkreleasehdr.sh
3.make
三、编译成功
四、安装
make install
五、验证 【默认安装在/usr/local/bin】
[root@hadoop100 redis-6.2.1]# cd /usr/local/bin
[root@hadoop100 bin]# ls
redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server
六、推荐使用后台启动
即先将redis-6.2.1文件下的redis.conf复制到其它目录
[root@hadoop100 redis-6.2.1]# ls
00-RELEASENOTES COPYING MANIFESTO runtest-cluster src
BUGS deps README.md runtest-moduleapi tests
CONDUCT INSTALL redis.conf runtest-sentinel TLS.md
CONTRIBUTING Makefile runtest sentinel.conf utils
[root@hadoop100 redis-6.2.1]# cp redis.conf /etc/redis.conf
后台启动设置 daemonize no 改成 yes
#启动
[root@hadoop100 bin]# redis-server /etc/redis.conf
#查看进程状态-》是否启动成功
[root@hadoop100 bin]# ps -ef | grep redis
liangji+ 6301 1 0 19:37 ? 00:00:07 file-roller /home/liangjiaojiao/下载/redis6.2.1安装文件.zip
root 12165 1 0 20:55 ? 00:00:00 redis-server 127.0.0.1:6379
root 12187 11183 0 20:56 pts/7 00:00:00 grep --color=auto redis
#用客户端访问 redis-cli
[root@hadoop100 bin]# redis-cli
127.0.0.1:6379> ping
PONG
七、Redis关闭
#方法一:杀掉进程
[root@hadoop100 bin]# ps -ef | grep redis
liangji+ 6301 1 0 19:37 ? 00:00:07 file-roller /home/liangjiaojiao/下载/redis6.2.1安装文件.zip
root 12318 1 0 21:00 ? 00:00:00 redis-server 127.0.0.1:6379
root 12329 11183 0 21:00 pts/7 00:00:00 grep --color=auto redis
[root@hadoop100 bin]# kill -9 12318
[root@hadoop100 bin]# ps -ef | grep redis
liangji+ 6301 1 0 19:37 ? 00:00:07 file-roller /home/liangjiaojiao/下载/redis6.2.1安装文件.zip
root 12345 11183 0 21:00 pts/7 00:00:00 grep --color=auto redis
#方法二:单实例关闭 redis-cli shutdown
[root@hadoop100 bin]# ps -ef | grep redis
liangji+ 6301 1 0 19:37 ? 00:00:07 file-roller /home/liangjiaojiao/下载/redis6.2.1安装文件.zip
root 12626 1 0 21:19 ? 00:00:00 redis-server 127.0.0.1:6379
root 12659 11183 0 21:19 pts/7 00:00:00 grep --color=auto redis
[root@hadoop100 bin]# redis-cli
127.0.0.1:6379> shutdown
not connected>