redis单主机多实例
假設(shè)我們服務器上面已經(jīng)安裝好了redis;
可參看:http://www.cnblogs.com/super-d2/p/3819385.html
下面我們來配置redis單主機多實例:
我們首先拷貝兩份文件:
[root@infa redis-2.8.12]# cp /etc/redis.conf /etc/redis6380.conf
[root@infa redis-2.8.12]# cp /etc/redis.conf /etc/redis6381.conf
一、配置6380端口
?[root@infa ~]# vim /etc/redis6380.conf
[root@infa redis-2.8.12]# src/redis-server /etc/redis6380.conf
可以看到6380端口已經(jīng)啟動起來
登錄6380端口:
二、同理我們配置6381端口:
[root@infa redis-2.8.12]# src/redis-server /etc/redis6381.conf
可以看到6381端口也已經(jīng)啟動起來
登錄6381端口
查看進程:
二、配置主從:
修改從庫配置:
[root@infa redis-2.8.12]# vim /etc/redis6380.conf
[root@infa redis-2.8.12]# vim /etc/redis6381.conf
主庫
從庫:
可以看到主從數(shù)據(jù)實現(xiàn)同步;
目前存在的一個問題,我沒法將兩個從庫配置為開機啟動;
來源:https://www.cnblogs.com/super-d2/p/3855229.html
與50位技術(shù)專家面對面20年技術(shù)見證,附贈技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的redis单主机多实例的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 中控屏行车记录仪一体机怎么调时间和日期?
- 下一篇: 徐燕时在三分之一缘分中开的是什么车?