Home > System Tutorial > LINUX > Redis installation and setup operation guide on CentOS7

Redis installation and setup operation guide on CentOS7

WBOY
Release: 2024-01-08 11:41:22
forward
652 people have browsed it

Installation settings

Download tar package:

wget -c http://download.redis.io/releases/redis-3.2.4.tar.gz

Unzip and install

tar zxvf redis-3.2.4.tar.gz

mkdir /usr/local/redis

make PREFIX=/usr/local/redis install

Set environment variables

vim /etc/profile

export REDIS_HOME=/usr/local/redis

export PATH=$PATH:$REDIS_HOME/bin

:wq

source /etc/profile or . /etc/profile

Create redis service

cd /root/redis-3.2.4/utils

./install_server.sh

Just hit Enter all the way

The default service name in the /etc/init.d directory is redis_6379

Redis installation and setup operation guide on CentOS7

service redis_6379 status

service redis_6379 start

service redis_6379 stop

remote access

Add firewall

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

firewall-cmd --reload Restart the firewall

vim /etc/redis/6379.conf

Password requirepass 123456

Comments bind 127.0.0.1

Modify protected-mode no

The above is the detailed content of Redis installation and setup operation guide on CentOS7. For more information, please follow other related articles on the PHP Chinese website!

source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template