Skip to content

Deployment Overview of MariaDB on Server

Prerequisites and Basic Requirements

The deployment requires a Linux server running either Red Hat Enterprise Linux (RHEL) or Ubuntu. The following conditions must be met before proceeding:

  • Operating System: RHEL or Ubuntu.
  • Privileges: Root access or sudo privileges are required to install packages and manage system services.
  • Network Ports: Port 3306/tcp must be accessible for database connections.
  • System Tools: The installation includes standard text editors (nano, vim) and network utilities (net-tools, bind-utils for RHEL or dnsutils for Ubuntu).

Application Installation Process

The database server is installed using the native package manager for the specific operating system. The version installed corresponds to the latest stable release available in the default repositories for the respective distribution.

  • On RHEL: The mysql-server package is installed using the yum package manager.
  • On Ubuntu: The mariadb-server package is installed using the apt package manager.

The installation process also includes the following auxiliary tools: - nano and vim for text editing. - net-tools for network configuration. - bind-utils (RHEL) or dnsutils (Ubuntu) for DNS utilities. - htop (Ubuntu only) for system monitoring.

Access Rights and Security

Network access to the database is controlled via the system firewall. The configuration ensures that the database port is explicitly allowed in the public zone.

  • Firewall Configuration (RHEL): The firewalld service is configured to permanently allow traffic on port 3306/tcp in the public zone.
  • Firewall Configuration (Ubuntu): The provided configuration includes commented-out instructions for ufw to allow ports 3306/tcp and 22, but these are not active in the current deployment state.

Databases

The database service is managed by systemd. Upon installation, the service is automatically started and enabled to launch on system boot.

  • Service Name (RHEL): mysqld
  • Service Name (Ubuntu): mariadb.service

The database listens on the standard port 3306. Connection details and storage locations follow the default configurations provided by the respective package managers.

Starting, Stopping, and Updating

Service management is handled through systemd. The following commands are used to control the database service:

  • Start the service:

    systemctl start mysqld
    
    or for Ubuntu:
    systemctl start mariadb.service
    

  • Enable the service on boot:

    systemctl enable mysqld
    
    or for Ubuntu:
    systemctl enable mariadb.service
    

  • Check service status:

    systemctl status mysqld
    
    or for Ubuntu:
    systemctl status mariadb.service
    

Updates to the database software are performed using the native package manager (yum for RHEL, apt for Ubuntu) to upgrade the mysql-server or mariadb-server packages respectively.

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