Redis is an in-memory data structure store which can be used as database, cache or message broker.
Redis is in-memory data structure store.
Can be used as:
- Database
- Cache
- Message Broker
Supports:
- Data structures (strings, hashes, lists, sets, sorted sets with range queries)
- Bitmaps
- Hyperloglogs
- Geospatial indexes with radius queries
Features:
- Built-in replication
- Lua scripting
- LRU eviction
- Transactions
- On-disk persistence
- High availability via Redis Sentinel and automatic partitioning with Redis Cluster
1
|
sudo yum -y install wget make gcc tcl
|
1
2
3
4
5
6
7
8
9
10
11
12
|
cd /tmp/
wget http://download.redis.io/releases/redis-3.2.6.tar.gz
tar zxvf redis-3.2.6.tar.gz
cd redis-3.2.6
make test
sudo make install
cd utils
# redis executable path - enter this path - /usr/local/bin/redis-server
sudo ./install_server.sh
|
1
2
3
4
5
6
|
# redis info
redis-cli info
# testing
redis-cli ping
PONG
|
1
2
3
4
5
|
sudo vim /etc/sysctl.conf
vm.overcommit_memory=1
# apply changes without restarting server
sudo sysctl vm.overcommit_memory=1
|
1
|
sudo chkconfig --add redis_6379
|
1
|
docker pull redis:4.0.2
|
1
|
docker run --name redis-6379 -p 6379:6379 -d redis:4.0.2
|
1
|
docker run --name some-app --link some-redis:redis -d application-that-uses-redis
|