在 CentOS 7 中通过配置文件启动 Redis 服务,步骤和命令如下:
1、确认 Redis 配置文件位置
find / -name redis.conf搜索
2、启动命令(通过配置文件)
redis-server /path/to/redis.conf
替换/path/to/redis.conf为你的配置文件实际路径
3、查看进程是否启动成功
ps -ef | grep redis
4、连接客户端验证
redis-cli -a 密码
ping
或者直接
sudo systemctl start redis