1080*80 ad

Installing MariaDB 11 on Ubuntu 24.04

Installing MariaDB 11 on Ubuntu 24.04 requires adding the official repository to ensure you get the latest stable release and timely updates. Simply relying on the default Ubuntu repositories might provide an older version.

Here’s a comprehensive guide to get MariaDB 11 up and running:

First, you need to add the GPG key for the MariaDB repository. This key verifies the authenticity of the packages you download.

Next, add the repository configuration to your system’s sources list. You can do this by creating a new file within the /etc/apt/sources.list.d/ directory. The specific content for Ubuntu 24.04 (Noble Nginx) targeting MariaDB 11 will reference the correct distribution codename and MariaDB version.

After adding the key and the repository source, update your package lists to include the new MariaDB repository.

sudo apt update

Now, you can install the MariaDB server and client packages.

sudo apt install mariadb-server mariadb-client -y

The -y flag automatically confirms the installation prompts.

Once the installation is complete, it’s crucial to secure your new MariaDB setup. This involves tasks like setting the root password, removing anonymous users, disallowing remote root login, and removing the test database. Run the security script:

sudo mariadb-secure-installation

Follow the prompts carefully. It is highly recommended to set a strong root password and answer ‘Y’ to the security questions.

The MariaDB service should start automatically after installation. You can verify its status using systemd:

systemctl status mariadb

If it’s not running, you can start it with:

sudo systemctl start mariadb

To enable it to start on boot:

sudo systemctl enable mariadb

You can connect to the MariaDB server using the client to verify the installation and version.

sudo mariadb

Or, if you set a root password and want to log in as root:

mariadb -u root -p

Enter the password when prompted.

Inside the MariaDB shell, you can check the installed version:

SELECT VERSION();

This command should return the MariaDB 11 version number. Type exit; to leave the MariaDB shell.

By following these steps, you will have a properly installed and secured instance of MariaDB 11 running on your Ubuntu 24.04 server, ready for use with your applications. Remember to manage the service using systemctl and perform regular security audits.

Source: https://kifarunix.com/how-to-install-mariadb-11-on-ubuntu-24-04/

900*80 ad

      1080*80 ad