安装Redis

一.工具准备

  • VMware 15(centos 7)
链接:
https://pan.baidu.com/s/1f5xW2d18vSHHhpz3KsZIHA
提取码:gpf7
  • Xftp 5 & Xshell 5
链接:
https://pan.baidu.com/s/1gqe_M1fKQtIAT5BaNhj2BQ
提取码:utar
  • redis安装包
下载地址:
https://download.redis.io/releases/
二.安装Redis2.1 查看linux ip地址[root@localhost ~]# ifconfig2.2 Xshell连接Linux
安装Redis

文章插图
 
2.3 Xftp连接linux
安装Redis

文章插图
【安装Redis】 
2.4 安装Redis2.4.1 使用Xftp将Redis传输到Linux中[root@localhost data]# cd program/[root@localhost program]# lsredis-3.2.11.tar.gz2.4.2 解压Redis[root@localhost program]# tar -zxvf redis-3.2.11.tar.gz redis-3.2.11/redis-3.2.11/.gitignore2.4.3 进入到Redis目录下 , 编译Redis[root@localhost program]# cd redis-3.2.11[root@localhost redis-3.2.11]# ls00-RELEASENOTESCONTRIBUTINGdeps MakefileREADME.mdruntestruntest-sentinelsrcutilsBUGS COPYINGINSTALLMANIFESTOredis.confruntest-clustersentinel.conf tests[root@localhost redis-3.2.11]# make2.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-benchmarkredis-check-aofredis-check-rdbredis-cliredis-sentinelredis-server2.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]# lsbinredis.conf2.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

文章插图
 
配置完后启动redis
[root@localhost bin]# ./redis-server ../redis.conf 2.4.9 关闭redis[root@localhost bin]# ./redis-cli shutdown到这里Redis就安装完成了




    推荐阅读