环境准备
安装编译依赖
apt install -y libsystemd-dev libc6-dev在redis源码目录下执行 make 检查编译环境
如果报错缺失 cc 和 pkg-config, 则需要安装对应的依赖
apt install pkg-config
apt install gcc将redis安装到指定的目录下
make PREFIX=/home/van/apps/redis install写入 service 文件
[Unit]
Description=Redis Server
After=network.target
[Service]
ExecStart=/home/van/apps/redis/bin/redis-server /home/van/apps/redis/conf/redis.conf
[Install]
WantedBy=multi-user.target