RedisDesktopManager 管理 redis Failed to stop firewall.service: Unit firewall.service not loaded.

本文介绍如何在Linux环境下关闭防火墙并禁止其开机启动,同时提供了详细的步骤来修改Redis配置文件,确保Redis能够正常运行。

1.关闭防火墙

1.[root@localhost ~]# systemctl status firewalld //防火墙状态

2.systemctl stop firewall//关闭

3.关闭开机启动防火墙

systemctl disable firewalld

 

出现问题

Failed to stop firewall.service: Unit firewall.service not loaded.

执行

pkill -f firewalld

systemctl start firewalld

再次关闭

感谢大佬 https://www.cnblogs.com/spll/p/9804469.html

 

2.修改redis.conf

 

[root@localhost redis-6.2.3]# ll

备份 cp redis.conf bak_redis.conf

vim redis.conf

esc  +/bind          找到

注释掉

protected-mode no

esc +  :wq + 回车
 

[root@localhost redis-6.2.3]# cd src/
[root@localhost src]# ./redis-server ../redis.conf &
 

 

 

[root@localhost redis]# systemctl start redis Job for redis.service failed because a timeout was exceeded. See "systemctl status redis.service" and "journalctl -xe" for details. [root@localhost redis]# systemctl status redisredis.service - Redis persistent key-value database Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/redis.service.d └─limit.conf, override.conf Active: failed (Result: timeout) since 一 2025-10-13 15:17:46 CST; 1min 8s ago Process: 77154 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=0/SUCCESS) 10月 13 15:17:16 localhost.localdomain systemd[1]: Starting Redis persistent key-value database... 10月 13 15:17:46 localhost.localdomain systemd[1]: redis.service start operation timed out. Terminating. 10月 13 15:17:46 localhost.localdomain systemd[1]: Failed to start Redis persistent key-value database. 10月 13 15:17:46 localhost.localdomain systemd[1]: Unit redis.service entered failed state. 10月 13 15:17:46 localhost.localdomain systemd[1]: redis.service failed. [root@localhost redis]# journalctl -xe 10月 13 15:16:11 localhost.localdomain nm-dispatcher[77045]: req:1 'dhcp4-change' [ens33]: start running ordered scripts... 10月 13 15:16:11 localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service. -- Subject: Unit NetworkManager-dispatcher.service has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit NetworkManager-dispatcher.service has finished starting up. -- -- The start-up result is done. 10月 13 15:17:11 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/firstboot-graphical.service:14] Support for option SysVStartPrio 10月 13 15:17:11 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/mdcheck_start.timer:12] Failed to parse calendar specification, 10月 13 15:17:11 localhost.localdomain systemd[1]: mdcheck_start.timer lacks value setting. Refusing. 10月 13 15:17:11 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/firstboot-graphical.service:14] Support for option SysVStartPrio 10月 13 15:17:12 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/mdcheck_start.timer:12] Failed to parse calendar specification, 10月 13 15:17:12 localhost.localdomain systemd[1]: mdcheck_start.timer lacks value setting. Refusing. 10月 13 15:17:16 localhost.localdomain polkitd[769]: Registered Authentication Agent for unix-process:77148:1253363 (system bus name :1.418 10月 13 15:17:16 localhost.localdomain systemd[1]: Starting Redis persistent key-value database... -- 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. 10月 13 15:17:46 localhost.localdomain systemd[1]: redis.service start operation timed out. Terminating. 10月 13 15:17:46 localhost.localdomain systemd[1]: Failed to start Redis persistent key-value database. -- 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. 10月 13 15:17:46 localhost.localdomain systemd[1]: Unit redis.service entered failed state. 10月 13 15:17:46 localhost.localdomain systemd[1]: redis.service failed. 10月 13 15:17:46 localhost.localdomain polkitd[769]: Unregistered Authentication Agent for unix-process:77148:1253363 (system bus name :1.41 [12]+ 已停止 journalctl -xe [root@localhost redis]# sudo firewall-cmd --zone=public --add-port=6379/tcp --permanent success [root@localhost redis]# sudo firewall-cmd --reload success [root@localhost redis]# systemctl start redis Job for redis.service failed because a timeout was exceeded. See "systemctl status redis.service" and "journalctl -xe" for details. [root@localhost redis]#
10-14
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值