Redis单机版搭建


title: "Redis单机版搭建"

createTime: 2022-01-04T20:43:11+08:00
updateTime: 2022-01-04T20:43:11+08:00
draft: false
author: "name"
tags: ["redis"]
categories: ["install"]
description: "测试的"

redis单机版搭建

安装环境

安装步骤

  1. 进入安装目录

    • cd /usr/local/redis (编译目录)
  2. 下载redis并解压到指定目录

  3. 编译安装redis

    • cd /usr/local/redis/redis-5.0.7
    • make
    • make install
  4. 修改redis.conf配置文件

    • vim redis.conf
    text 复制代码
    daemonize no -->    daemonize yes
    bind 127.0.0.1 -->  # bind 127.0.0.1
    requirepass 123   指定密码123
  5. 复制几个配置文件

    • cd /usr/local/redis/redis-5.0.7
    • cp redis.conf /etc/
    • cp ./src/redis-server /usr/bin/
    • cp ./src/redis-cli /usr/bin/
  6. 第五步:启动redis

    • redis-server /etc/redis.conf (当前机器任意目录)
  7. 测试连接

    • redis-cli (当前机器任意目录)
  8. 如果连不上可以看看后面的问题

    • 关闭防火墙服务
      • systemctl status firewalld.service 查看防火墙状态
      • systemctl stop firewalld.service 关闭防火墙
      • systemctl disable firewalld.service 禁止开机启动防火墙

文章来源

相关推荐
小满、1 天前
MySQL :实用函数、约束、多表查询与事务隔离
数据库·mysql·事务·数据库函数·多表查询
百***35331 天前
PostgreSQL_安装部署
数据库·postgresql
thekenofdis1 天前
Lua脚本执行多个redis命令提示“CROSSSLOT Keys in request don‘t hash to the same slot“问题
redis·lua·哈希算法
君不见,青丝成雪1 天前
网关整合验签
大数据·数据结构·docker·微服务·系统架构
rayylee1 天前
生活抱怨与解决方案app
数据库·生活
Lucifer三思而后行1 天前
使用 BR 备份 TiDB 到 AWS S3 存储
数据库·tidb·aws
百***17071 天前
Oracle分页sql
数据库·sql·oracle
qq_436962181 天前
数据中台:打破企业数据孤岛,实现全域资产化的关键一步
数据库·人工智能·信息可视化·数据挖掘·数据分析
linuxxx1101 天前
django测试缓存命令的解读
python·缓存·django