差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:centos7-redis [2020/07/03 09:20] – [安裝與啟動程序] jonathan_tsaitech:centos7-redis [2021/03/26 15:42] (目前版本) jonathan
行 1: 行 1:
-====== CentOS7 安裝 Redis5 ======+====== CentOS7/Debian10 安裝 Redis5 ======
  
   * CentOS7 from PVE6 CT-template   * CentOS7 from PVE6 CT-template
-  * 因為 EPEL 的 redis 版本只到 3 , 發現透過 IUS repo 可以安裝版本 4 或 5 +    * 因為 EPEL 的 redis 版本只到 3 , 發現透過 IUS repo 可以安裝版本 4 或 5  
 +  * Debian10 from PVE6 TurnKey CT-template
  
-===== 安裝啟動程序 ===== +===== CentOS7 安裝啟動程序 ===== 
-  * 安裝 <code sh>+  * 安裝 <cli>
 yum install -y https://repo.ius.io/ius-release-el7.rpm yum install -y https://repo.ius.io/ius-release-el7.rpm
 yum install redis5 yum install redis5
-</code+</cli
-  * 啟動 <code sh>+  * 啟動 <cli>
 systemctl enable redis systemctl enable redis
 systemctl start redis systemctl start redis
-</code>+</cli> 
 + 
 +===== Debian10 安裝啟動程序 ===== 
 +  * 安裝 <cli> 
 +sudo apt update 
 +sudo apt install redis-server 
 +</cli> 
 +  * 啟動 : 在上面的安裝後就會自動設定啟動程序 
 + 
 +===== Redis 啟動檢查 =====
   * 檢查 redis 服務版本狀態 <code sh>   * 檢查 redis 服務版本狀態 <code sh>
 redis-cli info server redis-cli info server
-</code>呈現結果如下:<xtermrtf># Server+</code>呈現結果如下:<cli># Server
 redis_version:5.0.9 redis_version:5.0.9
 redis_git_sha1:00000000 redis_git_sha1:00000000
行 36: 行 46:
 executable:/usr/bin/redis-server executable:/usr/bin/redis-server
 config_file:/etc/redis.conf config_file:/etc/redis.conf
-</xtermrtf>+</cli>
  
 <note warning> <note warning>
行 61: 行 71:
   * 觀察 redis 服務運作狀態(使用記憶體/連結數..) <code sh>   * 觀察 redis 服務運作狀態(使用記憶體/連結數..) <code sh>
 redis-cli --stat redis-cli --stat
-</code>顯示訊息大概會如下<xtermrtf>+</code>顯示訊息大概會如下<cli>
 ------- data ------ --------------------- load -------------------- - child - ------- data ------ --------------------- load -------------------- - child -
 keys       mem      clients blocked requests            connections keys       mem      clients blocked requests            connections
行 84: 行 94:
 1060       3.45M    8             2689 (+44)          9 1060       3.45M    8             2689 (+44)          9
 1060       3.45M    8             2690 (+1)           9 1060       3.45M    8             2690 (+1)           9
-</xtermrtf>+</cli>
  
   * 參考應用 : Wordpress Plugin - [[https://wordpress.org/plugins/w3-total-cache/|W3 Total Cache]]   * 參考應用 : Wordpress Plugin - [[https://wordpress.org/plugins/w3-total-cache/|W3 Total Cache]]
     * 需要安裝 php-redis 套件<code sh>     * 需要安裝 php-redis 套件<code sh>
 yum install php-redis yum install php-redis
-</code><xtermrtf>+</code><cli>
 Dependencies Resolved Dependencies Resolved
  
行 106: 行 116:
 ============================================================================================================================================================================================================================================= =============================================================================================================================================================================================================================================
 Install  1 Package (+4 Dependent packages) Install  1 Package (+4 Dependent packages)
-</xtermrtf>+</cli>
  
 ===== 參考網址 ===== ===== 參考網址 =====
   * https://blog.yowko.com/yum-install-redis5/   * https://blog.yowko.com/yum-install-redis5/
   * https://blog.csdn.net/mawming/article/details/51952411   * https://blog.csdn.net/mawming/article/details/51952411
 +  * https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-debian-10
  
-{{tag>memdb}}+{{tag>memdb redis debian centos}}
  
  • tech/centos7-redis.1593739239.txt.gz
  • 上一次變更: 2020/07/03 09:20
  • jonathan_tsai