- 由于 keydb 官方文档没有alarmLinux安装的教程,所以需要使用源代码编译安装
|
1. 下载源码
wget https://github.com/Snapchat/KeyDB/archive/refs/tags/v6.3.4.zip |
2. 安装相关编译包
sudo yum install -y scl-utils epel-release
sudo dnf group install -y "Development Tools"
sudo yum install -y 'dnf-command(config-manager)'
sudo yum install -y dnf-plugins-core
sudo yum install -y libuuid-devel which libatomic
sudo yum install -y openssl openssl-devel curl-devel git
sudo yum install -y tcl-devel tcltls |
3. 编译项目
unzip KeyDB-6.3.4.zip
cd KeyDB-6.3.4
make |
编译成功后,输出如下
安装成功后,输出如下
4. 应用自启动
创建 systemd 启动服务文件 keydb.service
sudo vi /etc/systemd/system/keydb.service
[Unit]
Description=KeyDB
After=network.target
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/keydb-server /etc/keydb.conf
Type=notify
User=planck
Group=planck
RuntimeDirectory=keydb
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target |
开启应用自启动
sudo systemctl daemon-reload
sudo systemctl enable keydb.service
#启动应用
sudo systemctl start keydb.service |