- Redis Enterprise
Ensure that Docker is installed in your system.
If you're new, refer https://docs.docker.com/docker-for-mac/install/ to install Docker on Mac.
To pull and start the Redis Enterprise Software Docker container, run this docker run command in the terminal or command-line for your operating system.
Note: On Windows, make sure Docker is configured to run Linux-based containers.
In the web browser on the host machine, go to https://localhost:8443 to see the Redis Enterprise Software web console.
Click Setup to start the node configuration steps.
In the Node Configuration settings, enter a cluster FQDN such as demo.redislabs.com. Then click Next button.
Enter your license key, if you have one. If not, click the Next button to use the trial version.
Enter an email and password for the admin account for the web console.
These credentials are also used for connections to the REST API. Click OK to confirm that you are aware of the replacement of the HTTPS SSL/TLS certificate on the node, and proceed through the browser warning.
Select “redis database” and the “single region” deployment, and click Next.
Enter a database name such as demodb and click Activate to create your database
You now have a Redis database!
After you create the Redis database, you are ready to store data in your database. redis-cli is a built-in simple command-line tool to interact with Redis database. Run redis-cli, located in the /opt/redislabs/bin directory, to connect to port 12000 and store and retrieve a key in database1
Ensure that Docker is installed in your system. Follow https://docs.docker.com/engine/install/ if you haven’t installed yet.
Execute the following command to run Redis container in the background in a “detached” mode.
where, myredis is the name of Docker container -d represent running Redis in a background in a “detached” mode. redis is the name of Docker Image that it fetches from Docker Hub.
The below CLI uses the first three alphanumeric character of Container ID and opens up "sh" shell of Redis Docker container:
Execute the below command to test the Redis server:
Please note: By default, Redis has 0-15 indexes for databases, you can change that number databases NUMBER in redis.conf.
In order to enable persistence, you have to pass the "appendonly" option as "yes" as shown in the below example:
If persistence is enabled, data is stored in the VOLUME /data, which can be used with --volumes-from some-volume-container or -v /docker/host/dir:/data