个人云服务器启动redis

  引用博客 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
原文地址:https://www.cnblogs.com/yanqb/p/14480364.html