AlmaLinux 8.4にRedisをインストールする
OSバージョンの確認
# cat /etc/redhat-release
AlmaLinux release 8.4 (Electric Cheetah)
1.リポジトリを確認
# dnf module list redis
AlmaLinux 8 - AppStream Name Stream Profiles Summary redis 5 [d] common [d] Redis persistent key-value database redis 6 common [d] Redis persistent key-value database ヒント: [d]efault, [e]nabled, [x]disabled, [i]nstalled
2.redisをインストール
# sudo dnf install -y @redis
3.自動起動を設定
# sudo systemctl enable --now redis Created symlink /etc/systemd/system/multi-user.target.wants/redis.service → /usr/lib/systemd/system/redis.service.
4.ステータスを確認
# sudo systemctl status redis ● redis.service - Redis persistent key-value database Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor prese> Drop-In: /etc/systemd/system/redis.service.d mqlimit.conf Active: active (running) since Sun 2021-10-03 15:11:45 JST; 44s ago
バージョンの確認
# redis-server -v Redis server v=5.0.3 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=afde0cacc2a8bd4d
Redis起動
# redis-cli 127.0.0.1:6379> set key1 yamada OK 127.0.0.1:6379> get key1 "yamada"