banner
Apr 2, 2022
106 Views

Cài nhiều redis instances trên cùng 1 máy chủ

Written by
banner

Tải file config ở đây và đưa vào các thư mục tương ứng

Chạy các lệnh sau để phân quyền

chmod -R 777 /etc/redis/
chmod -R 777 /var/lib/redis*
chmod -R 777 /etc/init.d/redis-server*

Start

systemctl enable redis-server_6380
systemctl enable redis-server_6381
systemctl enable redis-server_6382
systemctl enable redis-server_6383
systemctl enable redis-server_6384
systemctl enable redis-server_6385
systemctl enable redis-server_6386
systemctl enable redis-server_6387
systemctl enable redis-server_6388
systemctl enable redis-server_6389

systemctl start redis-server_6380
systemctl start redis-server_6381
systemctl start redis-server_6382
systemctl start redis-server_6383
systemctl start redis-server_6384
systemctl start redis-server_6385
systemctl start redis-server_6386
systemctl start redis-server_6387
systemctl start redis-server_6388
systemctl start redis-server_6389

Test

redis-cli -p 6380 info server | egrep "process_id|tcp_port|config_file"

Article Tags:
· ·
Article Categories:
config · dev
banner

Leave a Reply

Your email address will not be published. Required fields are marked *