Open In App

How to Install Redis for PHP in MacOS?

Last Updated : 05 Jul, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Redis stands for Remote Dictionary Server, it enables you to write long and complex code in a minimum number of lines and in a simple way. Using redid the number of lines of code required to store data, access it, and utilize it drastically decreases. The benefits of edit include performance, flexible data structure, simplicity, ease of use, replication, high availability, scalability and it is an open-source platform.

Requirements for Installing Redis

  1. Mac OS operating system
  2. Brew installed on macOS (if it is not installed refer to the article Homebrew for the installation process)

Installing Redis

Step 1: After installing brew by following the instructions mentioned in the above article open the common-line terminal. Once check whether the brew is up to date or not using command brew update.

brew update 

Brew-update

 

Step 2: Now enter the command brew and install Redis. 

brew install redis

Brew-install

 

Step 3: To start the brew service use the command mentioned below, 

brew services start redis

After entering the above command the service starts running.

Start-brew-service

 

Step 4: To verify the service is up and running use the commands mentioned,

redis-cli ping

If the server is up and running you get a response PONG

Verifying-service

 

Step 5: To stop the Redis enter the command,

brew services stop redis

Stopping-redis

 

To uninstall Redis

Enter the below-mentioned command, 

brew uninstall redis

After entering the command and following the instructions Redis will be uninstalled from the system.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads