在Linux中安装Redis而且远程访问c++
Step1:进入到 须要安装的路径下redis
Step2: cd 到下载后的路径进行解压,解压后 cd redis-5.0.5/ 中server
Step3:须要编译c语言,安装gcc ,执行命令 yum install gcc-c++blog
Step4: 执行make命令 进行编译,编译成功后 执行 src/redis-serverip
Step5: 将 redis 在后台运行,并在远程访问:get
(1)注释掉redis.conf中的"bind 127.0.0.1"io
(2) redis.conf中的"protected-mode yes" 改成"protected-mode no", 去掉保护模式编译
(3)redis.conf中的"daemonize no"改成"daemonize yes",是否之后台程序去运行table
(4) redis.conf中的"requirepass your password" 一行能够注释掉,,变成免登陆
(5)src/redis-server redis.conf , 启动程序
(6)执行 ps -ef | grep redis , 确认redis 后台程序已经启动
(7) 用 Redis Desktop Manager 远程链接 Redis (关闭防火墙 service iptables stop)