顯示具有 Redis 標籤的文章。 顯示所有文章
顯示具有 Redis 標籤的文章。 顯示所有文章

2019年7月4日 星期四

Ubuntu 安装 Redis

sudo apt-get update
sudo apt-get install redis-server

啟動 Redis
redis-server

查看 redis 是否啟動?
redis-cli
以上命令將打開以下終端:

redis 127.0.0.1:6379>
輸入 PING 命令
會顯示 PONG
表示已經成功安裝了redis

要注意的是
外部無法連線
必須做一些設定
sudo vi /etc/redis/redis.conf
預設為
bind 127.0.0.1
要修改為
# 供外部 IP 連線
bind 0.0.0.0

加入以下設定,設定登入密碼
requirepass 你的密碼






































重啟 redis server
sudo /etc/init.d/redis-server restart

C# 可用 CSRedisCore 套件做操作

安裝 Windows Redis

1.Redis的下載地址:
https://github.com/MicrosoftArchive/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.msi

2.Redis Desktop Manager 下載地址:
https://github.com/uglide/RedisDesktopManager/releases/download/0.9.3/redis-desktop-manager-0.9.3.817.exe

3.
開啟 CMD
輸入指令
cd C:\Program Files\Redis
redis-server redis.windows-service.conf
啟動服務

4.開啟 Redis Desktop Manager 輸入 localhost 點選連線即可






































C# 可用 CSRedisCore 套件做操作

Visual Studio 2017/2019 推薦的擴充功能與更新

參考文章: 覺得 Google 的 Blogger 不太順手?透過 HTML 的 iframe 移花接木 HackMD