2023-7-3 13:30| 发布者: herosrx| 查看: 315| 评论: 0
/opt/homebrew/opt/redis/opt/homebrew/etc/redis.conf
brew install redis
brew install redis @6.2.10
redis-server -v
brew uninstall redis
brew services start redis
brew services stop redis
brew services restart redis
启动方式1:
redis-cli -h 127.0.0.1 -p 6379
备注(关于上述-h 和 -p参数):
1)-h 命令参数Server hostname (default: 127.0.0.1). Redis服务IP2) -p 命令参数Server port (efault: 6379). Redis服务端口
启动方式2:因为默认ip就是127.0.0.1,所以本地连接的话,-h参数可以不加
redis-cli -p 6379
启动方式3:同理可以简化成,如下:
redis-cli
/opt/homebrew/opt/redis/bin/redis-server /opt/homebrew/etc/redis.conf
redis-server /opt/homebrew/etc/redis.conf
评论
|手机版|小黑屋|老宋 ( 备案中... )
GMT+8, 2024-9-21 04:19 , Processed in 0.065575 second(s), 19 queries , Gzip On.
Powered by Discuz! X3.5
© 2001-2024 Discuz! Team.