当前位置:网站首页>Redis (1) installation and configuration
Redis (1) installation and configuration
2022-08-04 11:43:00 【who is huang huang】
活动地址:CSDN21天学习挑战赛
一.介绍
``
- Redis就是一款NoSQL.
- NoSQL -> 非关系型数据库 -> Not Only SQL.
- Key-Value:Redis...
- 文档型:ElasticSearch,Solr,Mongodb...
- 面向列:Hbase,Cassandra...
- 图形化:Neo4j...
- 除了关系型数据库都是非关系型数据库.
- NoSQL只是一种概念,泛指非关系型数据库,和关系型数据库做一个区分.
``
二.安装
1.首先去下载安装包
2.放在你的user/local下
3.解压文件

4.进入解压后的文件中
注意:因为我们没有配置redis的环境,So we can only enter hereredisinside the package to startredis
5.安装gcc插件

指令:yum install gcc
gcc是一个环境,因为redis是用c写的,So this environment is needed
同理nginx也是
6. 输入make

7.启动Redis

指令:src/redis-server注意:Redis的默认端口是6379
联想:tomcat 8080
Mysql 3306
8.备份redis.conf

指令:cp redis.conf redis.conf.bak
9.配置redis.conf
9.1 Starts in the background at startup
按Esc进入命令行模式回顾:The mode that comes in is the command mode
不要按i进入插入模式
输入命令:/daemon 搜索daemon
找到这一段
即
9.2 开启远程连接
目的:为了实现在windowsThe above code is used to operateRedis原因:redisRemote connections are not allowed by default
or first passvi redis.conf进入配置文件中
This time I have to change two places
第一步 关闭保护模式 protected-mode no
/protect-mode
第二步,配置redis密码 requirepass 123

Password is disabled by default
Give him a password,For example, Huang Huang here is set to him123
第三步 注释掉 bind 127.0.0.1 xxx


三.Start when no password is setredis

查看进程状态,我们的redis进程是否启动
ps -ef|grep
查看redis是否连接成功
四.Activated when a password is setredis
Log in the old way
Found that I can't log in,Because we didn't enter a password,Enter your password and try to log in
五.关闭redis

关闭操作:
1.Go to the command line first
src/redis-cli
2.Output close statementSHUTDOWN去关闭redis
3.See if the thread is closed ps -ef|grep redis


边栏推荐
猜你喜欢
随机推荐
字节技术官亲码算法面试进阶神技太香了
Xilinx VIVADO 中 DDR3(Naive)的使用(3)仿真测试
【目标检测】yolov2特征提取网络------Darknet19结构解析及tensorflow和pytorch实现
mysqldump远程备份数据库
【VBox】解决复制VBox虚拟机后提示硬盘UUID 已经存在的问题
Mysql数据类型
超美星空特效,你Get了吗?
如何过一个充满科技感的七夕?华为告诉你
隐私计算与数据流通:关系、作用及功能
MySQL 45 讲 | 11 怎么给字符串字段加索引?
*W3C* 标准组织
多行函数;group_by分组;having分组后筛选;单表查询总结
十一、网络规划设计
到底什么是JS原型
HyperLynx仿真(一)LineSim简单介绍
你知道吗?那些专属于代码的浪漫~
【LeetCode】232.用栈实现队列
Leetcode brush questions - 543. Diameter of binary trees, 617. Merging binary trees (recursive solution)
从数学角度和编码角度解释 熵、交叉熵、KL散度
Leetcode Brush Questions - Path Sum











