19

I'm working on the front end for a web app, but I'm trying to learn as much of the backend setup as I can as well. I am setting up redis on a new computer myself, but running into a few hiccups.

The wget command cannot be found, so I assume it Linux only? I am following these instructions to install redis on Mac OS 10.7. I have redis 2.0.0 installed, but while attempting to install 2.4.4 using the same commands, I am told redis-server, redis-cli, redis-benchmark cannot be found, and I can't copy them to /usr/local/bin.

I could not find an update command to bring redis up to the most recent version. I don't think it should be this difficult to install the most recent version on redis on Mac OS, but I can't see what I am doing wrong.

4 Answers 4

43

So far as I know, typing:

 $ brew upgrade redis 

should work, where $ indicates your command line. If it complains about HomeBrew not being installed, you can obtain that here. Brew is an excellent package manager, and a great way of taking care of your files.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! I forgot I had homebrew installed before. MAkes everything a lot easier.
11

If you're not using brew, then these steps will help you get up to date.

First, find the location of your installed redis-server instance before updating. In my case, it was in /usr/local/bin/, but it might also be in /usr/bin/. If it's not here, you can type which redis-server to find the location.

Next, download the redis tar file from https://redis.io/download, then install it from the directory it downloaded to:

cd Downloads tar xzf redis-X.Y.Z.tar.gz cd redis-X.Y.Z make test make 

Next, we'll move the new installed redis to the location where the current instance is running:

sudo mv src/redis-server /usr/local/bin sudo mv src/redis-cli /usr/local/bin 

Now you should be ready to use redis-server and redis-cli in the new version.

PS - I also moved the redis-benchmark, redis-sentinel, redis-check-aof, and redis-check-dump files because they were also already in /usr/local/bin.

Ref: http://jasdeep.ca/2012/05/installing-redis-on-mac-os-x/

Comments

6

It would be better to follow this way.

$ brew update

$brew upgrade redis

1 Comment

$brew upgrade redis will automatically run an update on brew first.
1

Create a bash file...

cd ~ nano .update_redis 

Go into the tmp directory and download the latest stable version

cd /tmp wget http://download.redis.io/redis-stable.tar.gz 

Decompress the files

tar xvzf redis-stable.tar.gz 

Compile

cd redis-stable make 

Copy the bin programs

cp src/redis-cli /usr/bin/ cp src/redis-server /usr/bin/ cp src/redis-benchmark /usr/bin/ 

Set Permissions

chmod 755 /usr/bin/redis-cli chmod 755 /usr/bin/redis-server chmod 755 /usr/bin/redis-benchmark 

Execute

bash .update_redis 

1 Comment

Thanks for sharing an answer that doesn't rely on Homebrew, but could you add more detail around what the "paste this" block does? There are a lot of steps there, and developers should know what they are doing before executing all of it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.