Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel: How to start redis on mac?

Tags:

php

redis

laravel

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?

like image 372
Peter Lur Avatar asked Oct 26 '17 00:10

Peter Lur


People also ask

How do I start Redis server?

To start Redis client, open the terminal and type the command redis-cli. This will connect to your local server and now you can run any command. In the above example, we connect to Redis server running on the local machine and execute a command PING, that checks whether the server is running or not.

Does Redis work on Mac?

Installing Redis on Mac There are two ways to install Redis on Mac: Installing Redis from scratch. Using package management software, like Homebrew.


1 Answers

You can install the redis server via brew install redis. Be sure to start the redis daemon by running brew services start redis.

like image 93
Alex Barker Avatar answered Oct 12 '22 17:10

Alex Barker