Redis入门——1.Redis安装

Linux Redis 使用安装

一,安装

​ redis官网链接

​ http://download.redis.io/releases/redis-5.0.5.tar.gz

1.选择最新稳定版本stable或最新版redis,复制官网链接 通过 wget 指令安装

[root@VM_0_10_centos bin]# cd /usr/local/src
[root@VM_0_10_centos src]# wget http://download.redis.io/releases/redis-5.0.5.tar.gz
[root@VM_0_10_centos src]# cd redis-5.0.5/
[root@VM_0_10_centos redis-5.0.5]# make
[root@VM_0_10_centos redis-5.0.5]# make test #检查环境是否有问题
[root@VM_0_10_centos redis-5.0.5]# make PREFIX=/usr/local/redis install #安装到指定路径

2.install安装成功后得到如下文件

[root@VM_0_10_centos redis]# cd bin
[root@VM_0_10_centos bin]# ll
total 32736
-rwxr-xr-x 1 root root 4366608 Oct 15 15:31 redis-benchmark  # redis性能测试工具
-rwxr-xr-x 1 root root 8111816 Oct 15 15:31 redis-check-aof  # 检查aof日志工具
-rwxr-xr-x 1 root root 8111816 Oct 15 15:31 redis-check-rdb  # 检查rdb日志工具
-rwxr-xr-x 1 root root 4806840 Oct 15 15:31 redis-cli        # 连接用的客户端
lrwxrwxrwx 1 root root      12 Oct 15 15:31 redis-sentinel -> redis-server
-rwxr-xr-x 1 root root 8111816 Oct 15 15:31 redis-server     # redis服务进程

3.复制 redis.confredis 目录

[root@VM_0_10_centos redis-5.0.5]# cd /usr/local/redis/
[root@VM_0_10_centos redis]# cp /usr/local/src/redis-5.0.5/redis.conf ./
[root@VM_0_10_centos redis]# ls
bin  redis.conf

4.通过指令启动redis

[root@VM_0_10_centos redis]# ./bin/redis-server ./redis.conf 

5.redis 以后台进程的形式运行

[root@VM_0_10_centos redis]# vim redis.conf 
daemonize yes   # 修改配置文件  daemonize 为 yes

6.启动redis,使用指令

[root@VM_0_10_centos redis]# ./bin/redis-cli 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值