I need to install redis version 5.0.14 on my mac using brew.
I have tried multiple ways like brew install [email protected], [email protected], redis@50, redis@5 but nothing seems to work!!
I was able to find out on https://formulae.brew.sh/ that the options that can be installed using brew are redis, [email protected], [email protected] . But I need to install redis 5.0.14 or basically above 5.0.6 because that is the version we have on our production. Can anyone help me out on this?
I have seen a way here that suggests to checkout specific homebrew formulae version but that would become too messy if something goes wrong. I would prefer a straight forward way if there is one.
CodePudding user response:
Given how good docker is on macOS, I have taken to using that rather than homebrew for lots of version-related problems.
With docker:
- I can pull any version I want,
- it's all isolated from my core macOS,
- just as performant,
- readily deletable,
- simple to have many versions,
- switchable between versions,
- repeatable across platforms and
- configurable by script.
Official image here.
So, in concrete terms, you can run Redis 5.0.14 as a daemon like this:
docker run --name some-redis -d redis:5.0.14
CodePudding user response:
The version you're looking for is not available on brew unfortunately.
bruno@pop-os ~> brew info --json redis | jq -r '.[].versioned_formulae[]'
[email protected]
[email protected]
You could get the source code from here: https://github.com/redis/redis/releases/tag/5.0.14
extract it to some directory, to run Redis with the default configuration just type:
% cd src
% ./redis-server
If you want to provide your redis.conf, you have to run it using an additional parameter (the path of the configuration file):
% cd src
% ./redis-server /path/to/redis.conf
It is possible to alter the Redis configuration by passing parameters directly as options using the command line. Examples:
% ./redis-server --port 9999 --replicaof 127.0.0.1 6379
% ./redis-server /etc/redis/6379.conf --loglevel debug
All the options in redis.conf are also supported as options using the command line, with exactly the same name.
Optionally you could use Docker, docker run --name some-redis -d redis:5.0.14