![]() ![]() You could, alternatively, replace this IP address with your server’s domain name. Replace 192.0.2.0 with your server’s IP address. The example below listens for both local and remote connections. Then, modify or add a line for bind, indicating your server’s IP address or domain name. Open the nf Redis configuration file, typically located at /etc/redis/. You can usually open the port using the following commands: sudo firewall-cmd -zone=public -add-port=6379/tcp -permanent Take a look at our guide Introduction to FirewallD on CentOS for more information on using FirewallD. On CentOS and Fedora, you can use FirewallD. Typically, you can open the port using the following commands: sudo ufw allow 6379 See our How to Configure a Firewall with UFW guide for more information on using UFW. ![]() ![]() On Debian and Ubuntu, you can do so using UFW. Open port 6379 on your system’s firewall. To connect to your Redis server remotely, you first need to open the appropriate port in your firewall and bind Redis to an address. Use the AUTH command with only one argument to authenticate by password: AUTH admin-password Use the -a flag to authenticate by password on the command line: redis-cli -a admin-password OKīoth options above also support password-only authentication. If the password provided via AUTH command matches the password in the /etc/redis/nf configuration file, the server replies with the OK status code and starts accepting commands. The command is used as follows: AUTH example-user password Using the CLI interface: The CLI has an AUTH command which authenticates a connection given a username and password. Use the -user flag to provide a username and the -pass flag to provide a password as shown below: redis-cli -user example-user -pass password Using command-line options: In this case, you provide the username and password of your Redis user as part of the command to start the Redis CLI. Redis gives you the following two ways of authenticating your connection: From there, you need to authenticate your connection to be able to view and modify the Redis database on the server. The Redis CLI automatically connects to a local Redis server when you run the redis-cli command. On AlmaLinux, CentOS, and Fedora, the default location is usually /etc/nf. Generally, on Debian and Ubuntu, the location defaults to the above. Replace /etc/redis/nf throughout this guide with the actual location of your Redis server’s configuration file. Be sure to use the drop down menu at the top of that page to select your Linux distribution and get the appropriate steps. You may also wish to set the timezone, configure your hostname, create a limited user account, and harden SSH access.įollow the instructions in our How to Install and Configure Redis on Ubuntu 20.04 guide to install a Redis server and command-line interface (CLI). See our Getting Started with Linode and Creating a Compute Instance guides.įollow our Setting Up and Securing a Compute Instance guide to update your system. If you have not already done so, create a Linode account and Compute Instance. The guide then goes into details on creating, populating, and saving a Redis database. It explains how to connect to a Redis server that is located locally or remotely. This tutorial gets you started using Redis. It works exceptionally well for caching, messaging, and other data storage contexts where quick, and low-latency storage is needed. Redis is an open-source NoSQL database used for in-memory storage of data structures. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |