我用了官方的docker镜像(https://hub.docker.com/r/btpanel/baota),但是安装以后,redis一直无法启动,详情如下:
1、php8.1 + redis7.2.4,启动redis提示:redis服务启动失败
2、但是redis的日志又显示,启动成功:
- 12344:C 25 Jul 2024 19:28:12.747 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
- 12344:C 25 Jul 2024 19:28:12.747 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=12344, just started
- 12344:C 25 Jul 2024 19:28:12.747 * Configuration loaded
- 12344:M 25 Jul 2024 19:28:12.747 * monotonic clock: POSIX clock_gettime
- _._
- _.-``__ ''-._
- _.-`` `. `_. ''-._ Redis 7.2.4 (00000000/0) 64 bit
- .-`` .-```. ```\/ _.,_ ''-._
- ( ' , .-` | `, ) Running in standalone mode
- |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
- | `-._ `._ / _.-' | PID: 12344
- `-._ `-._ `-./ _.-' _.-'
- |`-._`-._ `-.__.-' _.-'_.-'|
- | `-._`-._ _.-'_.-' | https://redis.io
- `-._ `-._`-.__.-'_.-' _.-'
- |`-._`-._ `-.__.-' _.-'_.-'|
- | `-._`-._ _.-'_.-' |
- `-._ `-._`-.__.-'_.-' _.-'
- `-._ `-.__.-' _.-'
- `-._ _.-'
- `-.__.-'
- 12344:M 25 Jul 2024 19:28:12.748 * Server initialized
- 12344:M 25 Jul 2024 19:28:12.748 * Ready to accept connections tcp
复制代码 3、[root@pptter dd-vote-back-end]# /etc/init.d/redis start
redis is running! (1429)
4、宝塔后台数据库-redis也显示状态正常
但是!但是!就无法连接redis,我在服务器上正常的程序,在本地也提示:
- Error: Class "Redis" not found in file /www/wwwroot/dd-vote-back-end/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php on line 81
复制代码
这个要怎么处理
|
|