Introduction
If you're just getting started with Redis, installing this in-memory data store is the first task you'll need to accomplish. The steps required for the installation will vary somewhat depending on the operating system you're using on your local machine. In this article, we'll provide step-by-step instructions to install Redis on macOS and various distributions of Linux.
Prerequisites
Before you proceed with your Redis installation, make sure you have some experience using the sudo
privilege to log into your system. If you're running Windows or macOS, you can install Redis by clicking on the download link for the interactive installer. Alternatively, you can use Homebrew on macOS to install it. We'll provide detailed instructions on that process later in our tutorial.
Install Redis on Linux
Preface Redis is a high-performance key value database. The emergence of redis, to a large extent, compensates for the lack of key / value storage such as memcached. In some cases, it can play a good complementary role in relational database. Using ANSI C language to write, support network, can be based on memory. Mac: Install Redis using Homebrew (see instructions above). Linux: Install Redis from source (see instructions above). Docker: Install Redis as a Docker container (see instructions above). This is good for Mac and Windows platforms. Windows: Download and install Redis msi package from MicrosoftArchive page. The package installs redis-cli.exe. Mac os 8.0. Medis - GUI for Redis - how do I download the app on PC? If you want to download the software on your pc or mac, you could either first visit the Mac store or Windows AppStore and search for the app OR you can easily use any of the download links we provided above under the 'Download and Install' header section to download the application. Red is a front-end client for Redis that makes it easy to get started visually with Redis concepts, while also showing what commands are being run to make things happen. It is a fantastic learning.
If you're using an Ubuntu distribution of Linux, you can install Redis using the APT-GET repository.
First, you'll need to update the system update manager package. This will ensure that you have the latest version before you attempt to install anything:
sudoapt-get update |
Using sudo
allows you to access the root permissions required for this task.
Next, complete your Redis installation using the install
command:
Finally, enable the Redis server with the following command:
sudo systemctl enable redis-server |
You'll be prompted for a password for authentication purposes. Input the password and then hit ENTER.
The output of the command will look like this:
Synchronizing state of redis-server.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable redis-server |
If you have a Red Hat distribution of Linux such as CentOS, use the YUM
repository to handle your Redis installation by enabling the REMI repository:
sudoyum install epel-release yum-utils sudoyum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm |
Next, enable the config manager package with the following command:
Last but not least, complete the Redis installation using yum
:
sudoyum install redis |
![Download Download](http://downmagaz.com/uploads/posts/2015-09/1441433326_back-street-heroes-2015-10.jpg)
After installing Redis, enable it with the systemctl
command:
You can also check the status of the Redis database using the sudo
system command in the terminal:
sudo systemctl status redis |
Install Redis on macOS
If you're running macOS X on a Mac, you can use the Homebrew package manager for your Redis installation. The following command will download the Homebrew package using cURL and install it with Ruby:
/usr/bin/ruby -e'$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)' |
![Download Redis For Mac Download Redis For Mac](https://rdm.dev/static/img/v2/home-intro.jpg?v=2020)
After installing Redis, enable it with the systemctl
command:
You can also check the status of the Redis database using the sudo
system command in the terminal:
sudo systemctl status redis |
Install Redis on macOS
If you're running macOS X on a Mac, you can use the Homebrew package manager for your Redis installation. The following command will download the Homebrew package using cURL and install it with Ruby:
/usr/bin/ruby -e'$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)' |
Install Redis using Homebrew
First, update your package manager so it can get the latest version of the Redis database:
Then complete your Redis installation using the command:
brew install redis |
Enable and start the Redis services
After completing the Redis installation, you'll want to restart the service:
If you want to run Redis in the background, use the command shown below:
redis-server /usr/local/etc/redis.conf |
NOTE: This will start the Redis service using the specified configuration file.
The following command will all of the Redis .plist
files to the LaunchAgents
directory. This causes the service to start automatically whenever Mac OSX is rebooted:
ln-sfv/usr/local/opt/redis/*.plist ~/Library/LaunchAgents |
Redis Desktop
Verify Redis is running
The final step in the installation process is to test if the Redis server is running. Connect to the Redis client interface with redis-cli
, and then use the ping
command to get a response from the server:
~$ redis-cli 127.0.0.1:6379>ping PONG 127.0.0.1:6379> |
Redis For Windows 10
Conclusion
Installing Redis may seem like an intimidating process if you're not even sure where to begin. Having step-by-step instructions makes the task a simple one to accomplish. In this article, we showed you how to complete a Redis installation in a variety of environments. With this tutorial to guide you, you'll be able to handle a Redis installation in any of the major operating systems.