Dieuz's avatar
Level 1

How to start redis on mac? [Solved]

I am trying to get redis working in my Laravel project on Mac.

Here is what I did so far:

  1. I ran "composer require predis/predis" succesfully

  2. I can see the predis folder in vendor folder

  3. My CACHE_DRIVER has been set to redis in the cache.php and .env file

When I try to run redis in my project, I get the following error:

Connection refused [tcp://127.0.0.1:6379]

Based on what I read online, it seems like my redis server is not started. How can I start it?

0 likes
6 replies
Cronix's avatar

Have you actually installed redis (the server)? You installed the php predis package to interface with it, but didn't mention whether you actually installed redis.

robrogers3's avatar

yep brew install redis

brew tap homebrew/services

brew services start redis

3 likes
meduz's avatar

Worked for me, too! It could be nice to mark @robrogers3’s answer as the best answer, for people reaching this thread.

Please or to participate in this conversation.