Linux 安裝Redis4.0.8【yum安裝】

1.下載yum源
yum install epel-release
2.安裝redis
 
3.啓動redis
yum installredis # 啓動redis
 service redis start
  # 中止redis
  service redis stop
  # 查看redis運行狀態
  service redis status
  # 查看redis進程
  ps  -ef |  grep  redis
 4.設置開機啓動
   systemctl start redis
 5.鏈接redis 
  # 進入本機redis
  redis-cli
  # 列出全部key
  keys *
 6.修改下配置,容許遠程鏈接,默認無密碼

  # 打開redis配置文件html

  vi /etc/redis.confredis

  # 找到 bind 127.0.0.1 將其註釋bash

  # 找到 protected-mode yes 將其改成spa

  protected-mode norest

 7.重啓redis服務code

   systemctl restart redis.servicehtm

 

 

原文出處:https://www.cnblogs.com/jin-nuo/p/11997477.htmlblog

相關文章
相關標籤/搜索