Could not connect to Redis at 127.0.0.1:6379: Connection refused
1
2
3
4
5
|
[root@rongle bin]# redis-cli
Could not connect to Redis at 127.0.0.1:6379: Connection refused
[root@rongle /]# redis-server /etc/redis.conf
[root@rongle /]# redis-cli
redis 127.0.0.1:6379>
|
在安裝好redis擴展 嘗試鏈接redis時,客戶端打不開,緣由是須要先開啓服務端,這須要先配置——redis
1.找到redis.conf 並修改 daemonize no 爲 daemonize yes ,這樣就能夠默認啓動就後臺運行spa
1
|
[root@rongle conf.d]# vi /etc/redis.conf
|
2.開啓客戶端要確保服務端啓動code
1
|
[root@rongle /]# redis-server /etc/redis.conf
|
3.啓動客戶端不成功要退出再進行下一步server
如今就能夠正常訪問了blog
1
2
3
|
[root@rongle /]# redis-server /etc/redis.conf
[root@rongle /]# redis-cli
redis 127.0.0.1:6379>
|