redis安装,救救孩子吧

redis-server就可以运行

systemctl start redis.service
一用上面的就报错

host ~]# systemctl start redis.service
Job for redis.service failed because the control process exited with error code. See "systemctl status redis.service" and "journalctl -xe" for details.

下面是错误的细节

[root@localhost ~]# systemctl status redis.service
● redis.service - redis-server
   Loaded: loaded (/etc/systemd/system/redis.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/redis.service.d
           └─limit.conf, override.conf
   Active: failed (Result: exit-code) since Sun 2023-05-21 23:31:24 CST; 28s ago
  Process: 2801 ExecStart=/usr/bin/redis-server ~/Documents/redis-6.2.6/redis.conf (code=exited, status=1/FAILURE)

May 21 23:31:24 localhost.localdomain systemd[1]: Starting redis-ser...
May 21 23:31:24 localhost.localdomain redis-server[2801]: 2801:C 21 ...
May 21 23:31:24 localhost.localdomain systemd[1]: redis.service: con...
May 21 23:31:24 localhost.localdomain systemd[1]: Failed to start re...
May 21 23:31:24 localhost.localdomain systemd[1]: Unit redis.service...
May 21 23:31:24 localhost.localdomain systemd[1]: redis.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

下面是另外的日志
 

[root@localhost ~]# journalctl -xe
-- Subject: Unit redis.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit redis.service has begun starting up.
May 21 23:31:24 localhost.localdomain redis-server[2801]: 2801:C 21 May
May 21 23:31:24 localhost.localdomain systemd[1]: redis.service: contro
May 21 23:31:24 localhost.localdomain systemd[1]: Failed to start redis
-- Subject: Unit redis.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit redis.service has failed.
-- 
-- The result is failed.
May 21 23:31:24 localhost.localdomain systemd[1]: Unit redis.service en
May 21 23:31:24 localhost.localdomain systemd[1]: redis.service failed.
May 21 23:31:24 localhost.localdomain polkitd[701]: Unregistered Authen
lines 2611-2628/2628 (END)
 

下面是我系统文件的细节

[Unit]
Description=redis-server
After=network.target
After=network-online.target    #增加
Wants=network-online.target    #增加

[Service]
Type=forking
ExecStart=/usr/local/bin/redis-server /root/Documents/redis-6.2.6/redis.conf
PrivateTmp=true

[Install]
WantedBy=multi-user.target
~                               

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值