Redis
Redis is an open-source in-memory data structure store that can be used as a database, cache, and message broker.
Installation from source
Download redis-stable
sh
wget https://download.redis.io/redis-stable.tar.gzCompile redis-stable
sh
tar -xzvf redis-stable.tar.gz
cd redis-stable
makeInstall redis-stable
sh
sudo make installRun redis-server
sh
redis-serverCreate redis.conf
sh
sudo cp ./redis.conf /etc/redis.confCreate service
sh
sudo vim /etc/systemd/system/redis.servicesh
[Unit]
Description=Redis Server
After=network.target
[Service]
ExecStart=/usr/local/bin/redis-server /etc/redis.conf
ExecStop=/usr/local/bin/redis-server shutdown
Restart=always
[Install]
WantedBy=multi-user.target/etc/systemd/system/redis.service
Reload and start service
sh
sudo systemctl daemon-reload
sudo systemctl enable redis.service
sudo systemctl start redis.serviceCheck status
sh
sudo systemctl status redis.serviceDebian with APT
sh
sudo apt install lsb-release curl gpg -ysh
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.listsh
sudo apt update
sudo apt install redis -ysh
sudo service redis startmacOS with Homebrew
sh
brew install redissh
brew services start redis