惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy International News Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
O
OpenAI News
Cloudbric
Cloudbric
Google Online Security Blog
Google Online Security Blog
Schneier on Security
Schneier on Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
NISL@THU
NISL@THU
N
News and Events Feed by Topic
T
Tenable Blog
S
Security @ Cisco Blogs
N
News and Events Feed by Topic
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
V
Visual Studio Blog
P
Proofpoint News Feed
Webroot Blog
Webroot Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Jina AI
Jina AI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
L
LangChain Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东

博客园 - 笨功夫才是真功夫

TortoiseSVN实现excel文件差异比对(集成ExcelMerge)[转] git仓库迁移 centos7.6 nginx配置ssl证书 在Debian12上安装mysql 8.0 Mysql8.0设置大小写不敏感解决方案[转] debian下常见问题 vue开发环境搭建 bash脚本的输入参数解析 python常用脚本 mysql数据库备份脚本 docker环境下安装RabbitMQ Linux系统设置开机启动(草稿) 在Windows10部署kibana Elasticsearch监控 Flink cdc实践(陆续更新) 在windows下安装mysql 8.1 VMware虚拟机开机自动启动 停止windows10的系统更新 elasticsearch安装-集群 elasticsearch安装-单实例
redis安装和运维
笨功夫才是真功夫 · 2024-03-11 · via 博客园 - 笨功夫才是真功夫

一 安装

1 安装redis单例

操作系统:debian 12

1.1 在linux中安装

# 直接安装, 开机自启动
apt install redis-server

# 检查安装情况
systemctl status redis-server

systemctl start redis-server   # 启动
systemctl stop redis-server    # 停止
systemctl restart redis-server # 重启
# 检查是否已经设置开机自动启动
systemctl is-enabled redis-server  
systemctl enable  redis-server     # 设置为开机自动启动
systemctl disable redis-server     # 禁止开机自动启动



# 配置远程访问
vim /etc/redis/redis.conf
#a 注释
bind 127.0.0.1 ::1
#b 修改保护模式为no
protected-mode no
# 重新redis
systemctl restart redis-server

#在其他电脑上验证连通性
telnet xxx 6379

卸载

直接使用apt卸载

apt purge --auto-remove redis-server

手动删除redis命令和配置文件:

 whereis redis-server

 whereis redis-cli

 rm /usr/bin/redis-*
 rm -rf /etc/redis/
 rm -rf /var/log/redis/
 rm -rf /var/log/redis/
 rm -rf /var/lib/redis/
 rm /etc/init.d/redis-server

1.2 在docker中安装

# 拉镜像
docker pull redis:6.2.6

# 下载redis.conf文件, 注意需匹配版本
# 本地新建目录/dockerapp/redis/conf|data|logs
# 运行容器
docker run --restart=always --hostname redis01 --name redis6.2.6 \
        -p 6379:6379 \
        -v /dockerapp/redis/conf/redis.conf:/etc/redis/redis.conf \
        -v /dockerapp/redis/data:/data \
        -v /dockerapp/redis/logs:/logs \
        -d redis:6.2.6 redis-server /etc/redis/redis.conf
# 检查容器情况
docker ps
docker exec -it xxxxxx /bin/bash

# 检查挂在目录的情况
ls /dockerapp/redis/data

#在其他电脑上验证连通性
telnet xxx 6379