Techieindoor

Redis – How to install redis on Mac OS X

Here, We will see How to install redis on Mac OS X. There are many ways to install and use redis on Mac OS X.

Installation by using Homebrew

Command: Run given below command on mac terminal.

brew install redis

During installation, Just ignore the notification messages.

Note: If you do not have brew command, then you can follow given below steps:

Start redis server

There are many ways to start redis server. You can choose any one of them.

Start Redis server using configuration file:

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

By default, redis.conf file persist into 
"/usr/local/etc/redis.conf" location in the 
system.

Start Redis server via “launchctl“:

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Start Redis server on computer starts:

ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

Run Redis as a background service:

brew services start redis 

Stop redis server

There are many ways to stop redis server.

brew services stop redis 

Uninstallation by using Homebrew

$ brew uninstall redis
$ rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Get Redis package information.

$ brew info redis

Test if Redis server is running.

$ redis-cli ping

It will reply "pong" message.

To learn more about golang, Please refer given below link:

https://www.techieindoor.com/go-lang-tutorial/

References:

https://golang.org/doc/
https://golang.org/pkg/
Exit mobile version