Web Development - Redis Notes (mac)

The redis in this article is installed through brew (the latest stable version is installed by default)

It can be started by the agent of brew -- the agent is started by the default redis.conf (it is not recommended to change the default redis.conf file)

#服务器 redis默认安装完成后保存在路径 `/usr/local/bin`
#brew 默认安装在 /opt/homebrew/Cellar/redis/7.0.5/bin/ 下
#通过自己配置的redis.conf 启动 (推荐!!!)
redis-server /usr/local/bin/myRedisConfig/redis.conf

#测试可否连接 提示 pong则连接成功
redis-cli ping

#查看版本
redis-server -v 
#通过端口6379连接
redis-cli -p 6379
#退出连接
exit
#不保存关闭 redis 服务(需要先连接才能关闭)
shutdown

Guess you like

Origin blog.csdn.net/weixin_41606115/article/details/129030768