Redis是memory-based的Key-Value資料庫…屬於NoSQL的一分支…
強項在於極快的寫入與讀取速度 (O(1))…多種儲存資料類型(key, list, hash, set and ordered set)…支援持久化儲存(persistent storage)…也有主從同步(master-slave)
詳情可見wiki:
http://zh.wikipedia.org/zh-tw/Redis
安裝方面很簡單…在centos/redhat下…用remi的yum repo就有最新版本
windows沒有直接支援…需要第3方的port…詳情見官網
http://redis.io/download
Remi repo 安裝:
Enterprise Linux 6 (with EPEL)
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
Enterprise Linux 5 (with EPEL)
wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
加好remi後…以yum來安裝redis
yum install redis --enablerepo=remi
redis的config在/etc/redis.conf…默認的設定已經蠻不錯…有需要可以修改
開始redis
service redis start
redis的port是6379…redis內也有client…
redis-cli
就可以登入localhost:6379的默認redis server。
==================
如果要compile source也很簡單, 以目前的最新版2.6.7為例:
wget http://redis.googlecode.com/files/redis-2.6.7.tar.gz
tar zxvf redis-2.6.7.tar.gz
cd redis-2.6.7
make
conf與redis-server / redis-cli在.src內