Skip to content

Deployment Overview of Redis on Server

Prerequisites and Basic Requirements

The following requirements must be met before deploying Redis on the server:

  • Operating System: Ubuntu

  • Privileges: Root or sudo access is required to install packages and modify configuration files.

  • Network: The server must have network connectivity to download the redis-server package.

  • Ports: Port 6379 is used for Redis communication.

File and Directory Structure

The Redis installation utilizes the following standard directory structure:

  • Configuration file: /etc/redis/redis.conf

  • Service name: redis-server

Application Installation Process

Redis is installed as a native system package using the apt package manager. The installation process includes:

  • Installing the redis-server package.

  • Updating the configuration file to set the bind address, port, supervision mode, and password.

  • Enabling and starting the service immediately after configuration.

Access Rights and Security

Security is enforced through the following configurations:

  • Bind Address: Redis is configured to bind only to 127.0.0.1, restricting access to local connections only.

  • Authentication: A password is required for all connections, defined by the requirepass directive in the configuration file.

  • Firewall: External access is inherently blocked by the bind address setting, but additional firewall rules may be applied at the OS level if needed.

Databases

Redis operates as an in-memory data store. The configuration specifies:

  • Connection Method: TCP connection on port 6379.

  • Storage Location: Data is stored in memory, with persistence options managed by default Redis settings (not explicitly modified in the provided configuration).

  • Authentication: All connections must provide the configured password.

Starting, Stopping, and Updating

Redis is managed as a systemd service. The following commands are used to control the service:

  • Start the service: systemctl start redis-server

  • Stop the service: systemctl stop redis-server

  • Restart the service: systemctl restart redis-server

  • Enable the service to start on boot: systemctl enable redis-server

  • Check the service status: systemctl status redis-server

Available Ports for Connection

The following port is configured for Redis:

  • Port 6379: Default Redis port for client connections.

Location of Configuration Files and Data

  • Configuration File: /etc/redis/redis.conf

  • Service Unit: Managed by systemd under the name redis-server.

Permission Settings

The configuration file /etc/redis/redis.conf is modified to enforce security settings. File permissions are managed by the operating system and the redis-server package installation process.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×