环境准备redis: https://github.com/redis/redis/archive/refs/tags/7.2.3.zip安装编译依赖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