下载安装包

官网下载https://redis.io/download

解压

tar -zxvf redis-6.0.5.tar.gz

进入目录开始编译安装

cd  redis-6.0.5

make

redis配置

开户守护进程配置,修改内容如下

daemonize yes

系统启动脚本配置

[Unit]

Description=redis_server

After=network.target

[Service]

Type=forking

PIDFile=/var/run/redis_6379.pid

ExecStart=/opt/software/redis-5.0.3/src/redis-server /opt/software/redis-5.0.3/redis.conf

ExecReload=/opt/software/redis-5.0.3/src/redis-server -s reload

ExecStop=/opt/software/redis-5.0.3/src/redis-server -s quit

PrivateTmp=true

[Install]

WantedBy=multi-user.target

生效

systemctl daemon-reload

开机自启

systemctl enable redis 

文章来源于互联网,如有雷同请联系站长删除:centos安装redis,自己编译安装非rpm

发表评论