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
sudoprivileges are required to install packages and manage system services. - Network Ports: Port
3306/tcpmust be accessible for database connections. - System Tools: The installation includes standard text editors (
nano,vim) and network utilities (net-tools,bind-utilsfor RHEL ordnsutilsfor 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-serverpackage is installed using theyumpackage manager. - On Ubuntu: The
mariadb-serverpackage is installed using theaptpackage 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
firewalldservice is configured to permanently allow traffic on port3306/tcpin thepubliczone. - Firewall Configuration (Ubuntu): The provided configuration includes commented-out instructions for
ufwto allow ports3306/tcpand22, 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:
or for Ubuntu: -
Enable the service on boot:
or for Ubuntu: -
Check service status:
or for Ubuntu:
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.