当使用源码安装redis的时候,在utils目录下执行
sh install_server.sh
会有如下提示:
Welcome to the redis service installer
This script will help you easily set up a running redis serverThis systems seems to use systemd.
Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!
#bail if this system is managed by systemd
#_pid_1_exe="$(readlink -f /proc/1/exe)"
#if [ "${_pid_1_exe##*/}" = systemd ]
#then
# echo "This systems seems to use systemd."
# echo "Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!"
# exit 1
#fi
根据代码提示,你应该需要安装 tcl tk 两个包
ubuntu:
sudo apt-get install -y tcl tk
RedHat:
sudo yum install tcl tk
然后执行
[root@01 redis-7.0.1]# make -j4 && make install
时,还会提示错误
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
#include <jemalloc/jemalloc.h>
此时在目录下执行
[root@01 redis-7.0.1]# make distclean
[root@01 redis-7.0.1]# make -j4 && make install
安装成功