「Redis」:修訂間差異
跳至導覽
跳至搜尋
(未顯示同一使用者於中間所作的 13 次修訂) | |||
第1行: | 第1行: | ||
'''Redis'''是一套NoSQL。 | '''Redis'''是一套NoSQL。 | ||
== 安裝 == | |||
在[[Ubuntu]]下可以直接安裝官方的APT Repository: | |||
<syntaxhighlight lang="bash"> | |||
sudo add-apt-repository -y ppa:redislabs/redis; sudo apt install -y redis; sudo apt clean | |||
</syntaxhighlight> | |||
如果只要裝client端的話: | |||
<syntaxhighlight lang="bash"> | |||
sudo add-apt-repository -y ppa:redislabs/redis; sudo apt install -y redis-tools; sudo apt clean | |||
</syntaxhighlight> | |||
== 設定 == | |||
這邊假定Redis放在內部信任網路裡。 | |||
修改<code>/etc/redis/redis.conf</code>,把預設只聽localhost的部份改成所有界面都聽,然後把<code>protected-mode</code>關閉: | |||
<syntaxhighlight lang="apache"> | |||
bind * -::* | |||
protected-mode no | |||
</syntaxhighlight> | |||
如果要打開密碼認證,舊版的設定方式是這樣: | |||
<syntaxhighlight lang="apache"> | |||
bind * -::* | |||
protected-mode yes | |||
requirepass PassW0rd | |||
</syntaxhighlight> | |||
設定開機啟動: | |||
<syntaxhighlight lang="bash"> | |||
sudo systemctl enable redis-server.service | |||
</syntaxhighlight> | |||
== 外部連結 == | == 外部連結 == |
於 2023年8月11日 (五) 08:02 的最新修訂
Redis是一套NoSQL。
安裝
在Ubuntu下可以直接安裝官方的APT Repository:
sudo add-apt-repository -y ppa:redislabs/redis; sudo apt install -y redis; sudo apt clean
如果只要裝client端的話:
sudo add-apt-repository -y ppa:redislabs/redis; sudo apt install -y redis-tools; sudo apt clean
設定
這邊假定Redis放在內部信任網路裡。
修改/etc/redis/redis.conf
,把預設只聽localhost的部份改成所有界面都聽,然後把protected-mode
關閉:
bind * -::*
protected-mode no
如果要打開密碼認證,舊版的設定方式是這樣:
bind * -::*
protected-mode yes
requirepass PassW0rd
設定開機啟動:
sudo systemctl enable redis-server.service
外部連結
- 官方網站 (英文)