Created
January 18, 2019 01:30
-
-
Save nfhipona/caad3ee80682583962b5c1facdcf5c8b to your computer and use it in GitHub Desktop.
Instruction to redis on Mac, Ubuntu and Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to start and stop Redis server on Mac, Linux, and Windows? | |
October 30, 2018 | |
In this post, we will show you some quick ways to start and stop Redis database server on multiple operating systems: macOS, Linux, Windows. | |
``1. On macOS`` | |
Getting started with Redis is quite easy and straightforward. Using Homebrew, you can get it up and running within a couple of commands: | |
To install Redis on Mac: | |
brew install redis | |
Launch Redis on computer starts. | |
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents | |
Start Redis server via “launchctl”. | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist | |
Start Redis server using configuration file. | |
redis-server /usr/local/etc/redis.conf | |
Stop Redis on autostart on computer start. | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist | |
Or easier, you can use brew service: | |
start Redis server: | |
brew services start redis | |
stop Redis server: | |
brew services stop redis | |
restart Redis server: | |
brew services restart redis | |
If you feel uncomfortable working with command lines, use DBngin. It’s a hassle-free way to manage the local Redis database servers. It’s just one click to start, another click to turn off. | |
No dependencies, no command line required, multiple drivers, multiple versions and multiple ports. And it’s free. | |
DBngin local server | |
``2. On Windows`` | |
Open Run Window by Winkey + R | |
Type services.msc | |
Search Redis service | |
Click stop, start or restart the service option. | |
``3. On Ubuntu`` | |
To install Redis on Ubuntu, it’s a lot of works to do. There’s a comprehensive guide on how to install Redis server on Ubuntu 16.04. If you haven’t done it before, go take a look. | |
To start Redis server: | |
sudo systemctl start redis | |
To start Redis automatically when your server boots: | |
sudo systemctl enable redis | |
To restart Redis server: | |
sudo systemctl restart redis | |
To stop redis | |
sudo systemctl stop redis | |
source: https://tableplus.io/blog/2018/10/how-to-start-stop-restart-redis.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment