当前位置:网站首页>Redis:安装使用
Redis:安装使用
2022-07-31 05:10:00 【?vsVSvs??】
安装 Redis
windows 环境安装
方法一.自己下载安装包
默认端口:6379
下载连接 https://github.com/tporadowski/redis/releases
解压
双击redis-server.exe启动服务端
双击redis-cli.exe启动客户端连接服务端
在客户端输入 “ping”,出现“PONG”,即证明连接成功
方法二.下载phpstudy(用这个也行)
下载 软件
下载完成
解压 并把下面两个软件下载好 服务端
和 客户端
配置扩展
再把Redis
扩展 加入到php.ini中
配置全局环境
然后在把redis 加入到全局中
这里的路径就是你在phpstudy 里面redis客户端的路径了
启动 redis 服务端
然后再进入终端 输入 redis-server.exe
启动 redis 服务端
注意:如何后面没有加上配置文件可能会出现下面这个情况:
讲的是 没有使用默认的conf文件:Warning: no config file specified, using the default config. In order to specify a config file use redis-server.exe /path/to/redis.conf
那就得到你redis-server.exe 目录下 运行 :redis-server.exe redis.windows.conf
也可以这样:
启动redis客户端
再打开一下终端窗口输入:redis-cli.exe -h 127.0.0.1 -p 6379
输入 ping
显示 pong
就表示好了
Linux下安装
下载linux压缩包 【redis-5.0.5.tar.gz】
通过FlashFXP把压缩包传送到服务器
解压缩
tar -zxvf redis-5.0.5.tar.gz
编译redis
使用gcc -v 命令查看gcc版本已经是4.8.5了,于是就没有再次安装,直接执行make,安装完之后再次make,出现图片内容即可。
进入/usr/local/bin
cd /usr/local/bin/
### [太懒了不写了:具体信息点这里](https://baijiahao.baidu.com/s?id=1722728002073366376&wfr=spider&for=pc)
边栏推荐
猜你喜欢
随机推荐
账号或密码多次输入错误,进行账号封禁
变量的解构赋值
Flink sink redis writes to Redis
剑指offer基础版 ----- 第28天
Flask 的初识
C语言如何分辨大小端
【LeetCode-SQL每日一练】——2. 第二高的薪水
剑指offer专项突击版 ---- 第1天
Quickly master concurrent programming --- the basics
初涉C语言
uni-app进阶之生命周期【day8】
剑指offer专项突击版 ---- 第2天
解决响应式数据依赖响应式数据无响应问题
Kubernetes加入集群的TOKEN值过期
运用flask框架发送短信验证码的流程及具体代码
Interviewer: If the order is not paid within 30 minutes, it will be automatically canceled. How to do this?
闭包(四)----IIFE
The interviewer asked me how to divide the database and the table?Fortunately, I summed up a set of eight-part essays
The process and specific code of sending SMS verification code using flask framework
Distributed transaction processing solution big PK!