1080*80 ad

Installing MariaDB on AlmaLinux 10

Installing the MariaDB database server on AlmaLinux 10 is a straightforward process, essential for setting up various applications requiring a robust SQL database. This guide outlines the key steps to get your MariaDB server up and running efficiently.

To begin, you will typically use the system’s package manager, dnf. The core package required is the MariaDB server itself. Once installed, you’ll need to start the service and configure it to launch automatically upon system boot. A critical final step is to secure the installation by running a dedicated script that handles essential security configurations, such as setting the root password and removing insecure default settings.

Here is a more detailed breakdown of how to accomplish this.

First, ensure your system’s package index is up-to-date. You can do this with the command:
sudo dnf update -y

Next, install the MariaDB server package. The standard command for this is:
sudo dnf install mariadb-server -y

This command downloads and installs the server software along with any necessary dependencies.

After the installation completes, the next crucial step is to start the MariaDB service. Use the systemctl command for this:
sudo systemctl start mariadb

You should also enable the service to ensure it automatically starts every time your system boots. This prevents you from having to manually start the database server after a reboot.
sudo systemctl enable mariadb

To verify that the service is active and running, you can check its status:
sudo systemctl status mariadb

The output should indicate that the service is active (running).

The final, and arguably most important, step is to secure your MariaDB installation. MariaDB comes with a script specifically designed for this purpose. Execute it with:
sudo mysqlsecureinstallation

This script will guide you through several steps, including setting a password for the root user, removing anonymous users, disallowing root login remotely, and removing the test database. It is highly recommended to answer yes to these prompts to enhance the security of your database server.

Once these steps are completed, your MariaDB database server is installed, running, and reasonably secure on your AlmaLinux 10 system, ready for you to create databases and users for your applications.

Source: https://centlinux.com/install-mariadb-on-almalinux-10/

900*80 ad

      1080*80 ad