安装redis use./install\ server.sh

zbdgwd5y  于 2021-06-09  发布在  Redis
关注(0)|答案(3)|浏览(411)

当我执行命令时 ./install_server.sh 发生错误。错误消息如下:此系统似乎使用systemd。请查看此目录中提供的示例服务单元文件,并进行调整和安装。对不起的!我不知道怎么解决这个问题,请帮帮我

% cd utils
% ./install_server.sh

错误消息

This 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!
wfauudbj

wfauudbj1#

vi ./install_server.sh

取消注解


# 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
9gm1akwq

9gm1akwq2#

您可以在下面安装redis-release-6.0并重试。试试5.0.5它在我的电脑上是有效的。我不知道确切的原因。

wqnecbli

wqnecbli3#

我遵循的步骤使它在我的系统中运行

注解掉下列行 redis-stable/utils/instal_server.sh 文件


# 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 然后在里面 redis-stable/srcsudo make install 如果显示错误 Hint: It's a good idea to run 'make test' ;) 返回redis stable并运行 make distclean 一次又一次 sudo make install 最后,通过运行 redis-server 至少要检查redis是否工作: redis-cli ping

相关问题