一.工具准备
- VMware 15( 7)

链接:
https://pan.baidu.com/s/1f5xW2d18vSHHhpz3KsZIHA
提取码:gpf7
- Xftp 5 & Xshell 5
链接:
https://pan.baidu.com/s/1gqe_M1fKQtIAT5BaNhj2BQ
提取码:utar
- 安装包
下载地址:
https://download.redis.io/releases/
二.安装Redis
2.1 查看 ip地址
[root@localhost ~]# ifconfig
2.2 Xshell连接Linux
2.3 Xftp连接linux
2.4 安装Redis
2.4.1 使用Xftp将Redis传输到Linux中
[root@localhost data]# cd program/
[root@localhost program]# ls
redis-3.2.11.tar.gz
2.4.2 解压Redis
[root@localhost program]# tar -zxvf redis-3.2.11.tar.gz
redis-3.2.11/
redis-3.2.11/.gitignore
2.4.3 进入到Redis目录下,编译Redis
[root@localhost program]# cd redis-3.2.11
[root@localhost redis-3.2.11]# ls
00-RELEASENOTES CONTRIBUTING deps Makefile README.md runtest runtest-sentinel srcutils
BUGS COPYING INSTALL MANIFESTO redis.conf runtest-cluster sentinel.conf tests
[root@localhost redis-3.2.11]# make
2.4.4 通过make test测试编译状态
[root@localhost redis-3.2.11]# make test
出现这段文字说明测试通过
o/ All tests passed without errors!
2.4.5 通过make install 完成安装
[root@localhost program]# mkdir redis
[root@localhost program]# cd redis-3.2.11
[root@localhost redis-3.2.11]# make install PREFIX=/whm/data/program/redis
安装完成后会有以下文件
[root@localhost redis-3.2.11]# cd ../redis
[root@localhost redis]# ls bin/
redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server
2.4.6 将redis.conf拷贝到redis目录下
[root@localhost redis-3.2.11]# cp redis.conf ../redis/redis.conf
[root@localhost redis-3.2.11]# cd ../redis
[root@localhost redis]# ls
bin redis.conf
2.4.7 启动redis
[root@localhost redis]# cd bin/
[root@localhost bin]# ./redis-server ../redis.conf
2.4.8 配置以后台进程启动redis
将 redis.conf 的daemonize参数设置为yes
[root@localhost bin]# vim ../redis.conf
配置完后启动redis
[root@localhost bin]# ./redis-server ../redis.conf
2.4.9 关闭redis
[root@localhost bin]# ./redis-cli shutdown
到这里Redis就安装完成了
胜象大百科







