Skip to content

Deploy Redis Service⚓︎

1 Preparation⚓︎

1.1 Enviroment Information⚓︎

  • Information of Redis server:

1.2 Configure Repo⚓︎

yum -y install epel-release

2 Install and deploy Redis⚓︎

2.1 Install Redis with Yum⚓︎

yum install -y redis6

2.2 Configure Redis⚓︎

sed -i "s/bind" /etc/redis.conf
sed -i "561i maxmemory-policy allkeys-lru" /etc/redis.conf
sed -i "481i requirepass KXOeyNgDeTdpeu9q" /etc/redis.conf

2.3 Start Redis⚓︎

systemctl enable redis
systemctl start redis

3 Configure Firewall⚓︎

firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="" port protocol="tcp" port="6379" accept"
firewall-cmd --reload