How to Install Redis for PHP in MacOS?
Last Updated :
05 Jul, 2022
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
- Mac OS operating system
- 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
Step 2: Now enter the command brew and install Redis.
brew install redis
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.
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
Step 5: To stop the Redis enter the command,
brew services stop 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.
Share your thoughts in the comments
Please Login to comment...