macOS 10 Install Redis standalone 單機模式 – IT 484 Post author:若雪 Post published:2021-02-13 Post category:IT / BigData / Redis Post comments:0 Comments Post last modified:2023-01-13 實作架設 Server ,從套件庫下載安裝,可以大幅地節省工程師開發與部署的時間,使用 brew 來達成,這是最簡單的方法。 Table of Contents Toggle 功能簡介主機架構安裝套件macOS 10 Install Redis standalone組態設定運行管理啟動服務停止服務狀態驗證測試連線心得分享原碼下載 功能簡介 Redis 是一個高性能鍵值儲存的記憶體型的資料庫,支援資料的持久化,可以將記憶體的資料儲存在磁碟,重啟後可以再重新載入,同時提供 list,set,zset,hash 等資料結構儲存,也支援資料備份,即主從模式的資料備份。 主機架構 建置單台的主機架構。 Node IP Port Master 192.168.1.100 6379 安裝套件 macOS 10 Install Redis standalone 從套件庫,使用 brew 命令安裝。 brew install redis 組態設定 vim /opt/homebrew/etc/redis.conf bind 0.0.0.0 port 6379 daemonize yes pidfile /opt/homebrew/var/run/redis_6379.pid logfile /opt/homebrew/var/log/redis/redis.log dir /opt/homebrew/var/db/redis databases 16 requirepass password appendonly yes 運行管理 啟動服務 安裝完成後,並不會自動啟動服務,使用 brew services start 命令來啟動服務。 brew services start redis 停止服務 啟動服務後,使用 brew services stop 命令終止服務運行。 brew services stop redis 狀態驗證 Install Redis macOS 啟動服務後,使用 brew services info 命令來查看服務狀況。 brew services info redis redis (homebrew.mxcl.redis) Running: v Loaded: v Schedulable: x User: admin PID: 67975 測試連線 使用命令列,連線服務。 redis-cli -a password info replication # Replication role:master redis-cli -a password 127.0.0.1:6379>exit 心得分享 macOS Install Redis 快速安裝後,便於個人電腦、筆電在開發研究或測試時使用,省略複雜的設定,所以沒有參數需要調整,簡單快速建置就能使用服務,除此之外還有其他平台: Centos 7 安裝 Redis 原碼下載 GitHub - ruoxueorg Tags: mac, macos, redis Read more articles Previous PostmacOS 10 Install Nginx – IT 484 Next Post開發環境 macOS IntelliJ – Spring Boot 168 EP 2 You Might Also Like macOS 10 Install Apache 2 – IT 484 2021-06-07 Centos 7 Install Redis sentinel 哨兵模式 – IT 484 2021-01-10 macOS 10 Install Consul standalone 單機模式 – IT 484 2021-02-04 發佈留言 取消回覆CommentEnter your name or username to comment Enter your email address to comment Enter your website URL (optional) 在瀏覽器中儲存顯示名稱、電子郵件地址及個人網站網址,以供下次發佈留言時使用。