0
点赞
收藏
分享

微信扫一扫

CentOS8 2种方式安装redis

陆佃 2023-08-17 阅读 11

方式一

1、安装

yum install redis

2、编辑配置文件

vim /etc/redis.conf

#requirepass那行并打开注释,在后面写自己的密码,如下

requirepass yourpassword

将bind 后 127.0.0.1 改为 内网IP # 为安全起见,请勿使用 0.0.0.0

protected-mode yes 改为 protected-mode no # 关闭保护模式

daemonize no 改为 daemonize yes # 开启守护进程

3、启动

systemctl start redis

//重启

systemctl stop redis

4、开启自启动

systemctl enable redis

5、开放防火墙端口(如有需要)

firewall-cmd --zone=public --add-port=80/tcp --permanent

firewall-cmd --zone=public --add-port=6379/tcp --permanent

//重启防火墙

systemctl restart firewalld

————————————————————————————————————————————————————————————————

方式二

wget https://download.redis.io/releases/redis-6.0.9.tar.gz

tar xzf redis-6.0.9.tar.gz

cd redis-6.0.9

make

make install


举报

相关推荐

centos8安装redis

Centos8安装Redis

centos8安装Containerd

centos8安装rabbitMQ

centos8安装RabbitMq

centos8安装ollama

0 条评论