yanqb

 

 

  引用博客 https://www.cnblogs.com/kelelipeng/p/13088319.html

  1、在目录/usr/local/redis/redis-4.0.6 输入下面命令启动redis:

  后台启动 ./bin/redis-server& ./redis.conf     (./bin/redis-server ./redis.conf)

好像用(  ./bin/redis-server  ./redis.conf  )启动成功了

 

 
redis 远程连接方法

解决方法

1、修改redis服务器的配置文件vi redis.conf

注释以下绑定的主机地址# bind 127.0.0.1

2、

config   set   protected-mode"no"    或者config set requirepass 123 ->123是密码注意:开启 6379端口 

3、远程连接$ redis-cli -h 138.138.138.138  -p  6379 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
解决方法
1、修改redis服务器的配置文件
vi redis.conf
 
注释以下绑定的主机地址
 
# bind 127.0.0.1
 
vim  redis.conf
 
bind  0.0.0.0
 
protected-mode   no
 
2、修改redis服务器的参数配置
修改redis的守护进程为no,不启用
 
127.0.0.1:6379> config  set   daemonize  "no"
 
OK
 
修改redis的保护模式为no,不启用
 
127.0.0.1:6379> config   set   protected-mode"no"
 
OK
 
或者
 
config set requirepass 123 ->123是密码
 
注意:开启 6379端口
  
 
3、远程连接
$ redis-cli -138.138.138.138  -p  6379

分类:

技术点:

相关文章:

  • 2021-04-18
  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
  • 2021-08-01
  • 2022-01-22
猜你喜欢
  • 2021-05-03
  • 2022-12-23
  • 2021-10-20
  • 2021-05-13
  • 2021-05-09
  • 2021-07-13
  • 2021-12-10
相关资源
相似解决方案