首页 > 数据库 >redis7.2 安装部署

redis7.2 安装部署

时间:2024-07-05 16:30:30浏览次数:14  
标签:gcc redis7.2 部署 make redis 7.2 https 安装

# redis7.2 安装部署
https://redis.io/download/
https://github.com/redis/redis/tree/7.2


wget https://github.com/redis/redis/archive/7.2.3.tar.gz


redis-7.2.3]# yum -y install gcc gcc-c++ systemd-devel

useradd redis -s /sbin/nologin -M
 


# 编译,生成systemd的启动模板
redis-7.2.3]# make USE_SYSTEMD=yes

# 使用默认路径就不用这个
make PREFIX=/opt/redis install

cat>/etc/profile.d/redis.sh<<EOF
export PATH=\$PATH:/opt/redis/bin
EOF

# 生成之后的文件
redis-7.2.3]# src/redis-server

# 生成的模板控制文件
redis-7.2.3]# ll utils/systemd-redis_server.service
utils]# cp systemd-redis_server.service /usr/lib/systemd/system/redis.service

# 修改配置文件启动
utils]# cat /usr/lib/systemd/system/redis.service
~]# cat /usr/lib/systemd/system/redis.service
[Unit]
Description=Redis data structure server
Documentation=https://redis.io/documentation
#Before=your_application.service another_example_application.service
#AssertPathExists=/var/lib/redis
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/opt/redis/bin/redis-server /opt/redis/conf/redis.conf
## Alternatively, have redis-server load a configuration file:
#ExecStart=/usr/local/bin/redis-server /path/to/your/redis.conf
LimitNOFILE=65535
NoNewPrivileges=yes
OOMScoreAdjust=-900
PrivateTmp=yes
# Type=notify
TimeoutStartSec=infinity
TimeoutStopSec=infinity
UMask=0077
User=redis
Group=redis
WorkingDirectory=/opt/redis

[Install]
WantedBy=multi-user.target

redis-7.2.3]# cp redis.conf sentinel.conf /opt/redis/conf/

# 修改配置文件
redis]# cat conf/redis.conf
bind 0.0.0.0

port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 16
always-show-logo no
set-proc-title yes
proc-title-template "{title} {listen-addr} {server-mode}"
locale-collate ""
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
rdb-del-sync-files no
dir /opt/redis/data
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync yes
repl-diskless-sync-delay 5
repl-diskless-sync-max-replicas 0
repl-diskless-load disabled
repl-disable-tcp-nodelay no
replica-priority 100
acllog-max-len 128
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
lazyfree-lazy-user-del no
lazyfree-lazy-user-flush no
oom-score-adj no
oom-score-adj-values 0 200 800
disable-thp yes
appendonly no
appendfilename "appendonly.aof"
appenddirname "appendonlydir"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes
aof-timestamp-enabled no
 
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-listpack-entries 512
hash-max-listpack-value 64
list-max-listpack-size -2
list-compress-depth 0
set-max-intset-entries 512
set-max-listpack-entries 128
set-max-listpack-value 64
zset-max-listpack-entries 128
zset-max-listpack-value 64
hll-sparse-max-bytes 3000
stream-node-max-bytes 4096
stream-node-max-entries 100
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
jemalloc-bg-thread yes

标签:gcc,redis7.2,部署,make,redis,7.2,https,安装
From: https://www.cnblogs.com/gshelldon/p/18286099

相关文章

  • 使用Terraform极速部署Next.js网站到S3
    「AWS?好像很难懂……」「试过用AWS,但按钮太多,搞不清楚……」「Terraform?没听说过……」其实,直到最近我也是这样想的。但即使是我,也能使用Terraform构建网站。在本文中,我将分享如何使用AWS和Terraform将Next.js网站部署到S3的过程!用到的工具TerraformNode.jsAWSCLI创建并......
  • fastapi部署服务
    安装pipinstallfastapiuvicorn创建一个FastAPI应用,例如main.py:fromfastapiimportFastAPIfrompydanticimportBaseModelapp=FastAPI()classRequestBody(BaseModel):content:[email protected]("/process/")asyncdefprocess_string(request_body......
  • 大模型Linux本地化[离线]部署(以DB-GPT为例)
    DB-GPT本地化[离线]部署由于Python相关依赖包的获取极度依赖pip,而Miniconda支持环境隔离和环境打包,所以离线部署本质就是比在线部署多一步环境打包,环境搬迁。所以本篇文章一样适用于在线部署,以CentOS7为例。资源获取DB-GPT官方说明文档DB-GPT源码下载地址Nvidia驱动......
  • 记一次aspnetcore发布部署流程初次使用k8s
    主题:aspnetcorewebapi项目,提交到gitlab,通过jenkins(gitlab的ci/cd)编译、发布、推送到k8s。关于gitlab、jenkins、k8s安装,都是使用docker启动服务。首先新建一个项目,为了方便浏览就把swaggerr非开发环境不展示去掉 下面就是需要准备Dockerfile和k8s.yaml文件,这里不应该用......
  • Nacos 2.x 系列【20】集群部署
    文章目录1.前言2.部署服务端2.1准备工作2.2集群节点配置2.3鉴权配置2.4配置数据源2.5配置IP2.6配置端口2.7启动集群3.部署模式3.1直连模式3.2地址服务器模式3.2.1地址服务器3.2.2配置3.3VIP模式(推荐)3.3.1Nginx3.3.1域名1.前言官方文档在实......
  • nvm的安装流程以及解决其中遇到的问题
    前序—github.com打不开怎么办打开网站http://tool.chinaz.com/dns/,在A类型中填写github.com,再点击监测按钮复制下面任意一个IP3.打开电脑文件C:\Windows\System32\drivers\etc下的host文件,用记事本打开4.在host文件的最后一行加入刚才复制的IP20.205.243.16......
  • linux部署cassandra
    Cassandra数据库是一个高度可扩展、分布式的NoSQL数据库系统,最初由Facebook开发,用于处理大规模数据集并提供高可用性和高性能。随着其开源和广泛应用,Cassandra已经成为Apache软件基金会的一个顶级项目。以下是关于Cassandra数据库的详细介绍:一、基本概述类型:Cassandra是一个开......
  • 安装Redis出现的问题
    当我使用brew下载redis时系统:macOS14$brewinstallredis报错信息:Error:git:unknownorunsupportedmacOSversion::dunnoError:'git'mustbeinstalledandinyourPATH!Warning:YouareusingmacOS14.Wedonotprovidesupportforthispre-releaseve......
  • VMware vSphere Tanzu部署_16_TKC集群节点VM密码获取
    SupervisorControlPlaneVM密码获取通过SSH方式登录vcentervcenter开启SSH服务通过SSH工具登录vcenter执行获取密码脚本在vcentershell模式下执行/usr/lib/vmware-wcp/decryptK8Pwd.py命令WARNING!TheremoteSSHserverrejectedX11forwardingrequest.Connect......
  • 基于Kube-Prometheus/v0.13.0的K8S监控部署
    Kube-Prometheus不同版本支持的Kubernetes版本信息如下:kube-prometheusstackKubernetes1.22Kubernetes1.23Kubernetes1.24Kubernetes1.25Kubernetes1.26Kubernetes1.27Kubernetes1.28release-0.10✔✔✗✗xxxrelease-0.11✗✔✔✗xxx......