Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis

to stop it, just run:

brew services stop redis

Or, if you don't want/need a background service you can just run:

redis-server /usr/local/etc/redis.conf

Test if Redis server is running.

redis-cli ping

If it replies “PONG”, then it’s good to go!

Location of Redis configuration file.

/usr/local/etc/redis.conf

Uninstall Redis and its files.

brew uninstall redis
rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
@alonre
Copy link

alonre commented Sep 17, 2021

Great, thanks! 👍

@Gogicool-geek
Copy link

Gogicool-geek commented Sep 21, 2021

Thanks!

@RuslanSevrukov
Copy link

RuslanSevrukov commented Sep 23, 2021

The BEST!

@CyprianTinasheAarons
Copy link

CyprianTinasheAarons commented Sep 30, 2021

Thanks

@denys-kobzar
Copy link

denys-kobzar commented Oct 19, 2021

How to run brew redis with loaded specific module ?
for example "redis-server --loadmodule ./target/release/librejson.dylib" for adding json module, but how can i do it with brew version of redis ? thx in advance

@gagandeepsingh-dev
Copy link

gagandeepsingh-dev commented Oct 26, 2021

Thanks

@virendra-maurya
Copy link

virendra-maurya commented Oct 27, 2021

Thanks @tomysmile

@utsavo-afk
Copy link

utsavo-afk commented Nov 11, 2021

Thank you!!

@elliottwu-noodoe
Copy link

elliottwu-noodoe commented Nov 26, 2021

Thanks, nice and clean.

@sameer-azazi-tw
Copy link

sameer-azazi-tw commented Nov 26, 2021

Thanks

@SaschaHeyer
Copy link

SaschaHeyer commented Nov 30, 2021

Thanks, always come back here :D:D

@saulhappy
Copy link

saulhappy commented Dec 1, 2021

Should be the second result when searching for Redis!

@z851103999
Copy link

z851103999 commented Dec 3, 2021

thank you

@nkpremices
Copy link

nkpremices commented Dec 7, 2021

Thank you

@aamnapm
Copy link

aamnapm commented Dec 12, 2021

Thanks

@hoist1999
Copy link

hoist1999 commented Dec 19, 2021

Great thanks.

@WadeShuler
Copy link

WadeShuler commented Dec 21, 2021

For myself for future reference, or anyone else interested :)

You can make redis run in the background and add helpful aliases to start/stop/test redis:

In your redis.conf, /usr/local/etc/redis.conf, set daemonize yes, and it will run in the background.

Then add the following aliases:

alias redis.start="redis-server /usr/local/etc/redis.conf"
alias redis.stop="pkill redis-server"
alias redis.test="redis-cli ping"

@Wizkaley
Copy link

Wizkaley commented Dec 30, 2021

Thank You

@gitNavV
Copy link

gitNavV commented Jan 19, 2022

Thanks!

@ihsanbazli
Copy link

ihsanbazli commented Jan 23, 2022

many thanks!

@pleblond
Copy link

pleblond commented Jan 28, 2022

Thanks

@tolumide-ng
Copy link

tolumide-ng commented Jan 28, 2022

Thank you!

@balagopal-waterlabs
Copy link

balagopal-waterlabs commented Feb 2, 2022

Thanks its working

@SalashnyiTaras
Copy link

SalashnyiTaras commented Feb 4, 2022

thanks you!

@idmitrymolchanov
Copy link

idmitrymolchanov commented Feb 7, 2022

Thanks!

@heeropunjabi
Copy link

heeropunjabi commented Feb 13, 2022

thank you!

@adamsiem
Copy link

adamsiem commented Feb 16, 2022

Perfect!

@alekseyl-workato
Copy link

alekseyl-workato commented Feb 18, 2022

If you need to configure brew-driven redis, then configuration could be found here:

/opt/homebrew/etc/redis.conf

@DataGreed
Copy link

DataGreed commented Mar 17, 2022

To restart redis after an upgrade:

  brew services restart redis

Or, if you don't want/need a background service you can just run:

  /usr/local/opt/redis/bin/redis-server /usr/local/etc/redis.conf

@Goodnessuc
Copy link

Goodnessuc commented Jun 22, 2022

This is saving lives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment