Detailed steps for installing MariaDB on SLES and OpenSUSE using the `zypper` package manager, including repository configuration and package installation.
On SLES, OpenSUSE, and other similar Linux distributions, it is highly recommended to install the relevant RPM packages from MariaDB's repository using zypper.
This page walks you through the simple installation steps using zypper.
We currently have ZYpp repositories for the following Linux distributions:
SUSE Linux Enterprise Server (SLES) 12
SUSE Linux Enterprise Server (SLES) 15
OpenSUSE 15
OpenSUSE 42
If you want to install MariaDB with zypper, then you can configure zypper to install from MariaDB Corporation's MariaDB Package Repository by using the .
MariaDB Corporation provides a MariaDB Package Repository for several Linux distributions that use zypper to manage packages. This repository contains software packages related to MariaDB Server, including the server itself, , , , and . The MariaDB Package Repository setup script automatically configures your system to install packages from the MariaDB Package Repository.
To use the script, execute the following command:
Note that this script also configures a repository for and a repository for MariaDB Tools, which currently only contains and its dependencies.
See for more information.
If you want to install MariaDB with zypper, then you can configure zypper to install from MariaDB Foundation's MariaDB Repository by using the .
The MariaDB Foundation provides a MariaDB repository for several Linux distributions that use zypper to manage packages. This repository contains software packages related to MariaDB Server, including the server itself, , , , and . The MariaDB Repository Configuration Tool can easily generate the appropriate commands to add the repository for your distribution.
For example, if you wanted to use the repository to install on SLES 15, then you could use the following commands to add the MariaDB zypper repository:
If you wish to pin the zypper repository to a specific minor release, or if you would like to downgrade to a specific minor release, then
you can create a zypper repository with the URL hard-coded to that specific minor release.
So if you can't find the repository of a specific minor release at yum.mariadb.org, then it would be a good idea to check the archive.
For example, if you wanted to pin your repository to on SLES 15, then you could use the following commands to add the MariaDB zypper repository:
MariaDB's zypper repository can be updated to a new major release. How this is done depends on how you originally configured the repository.
If you configured zypper to install from MariaDB Corporation's MariaDB Package Repository by using the , then you can update the major release that the repository uses by running the script again.
If you configured zypper to install from MariaDB Foundation's MariaDB Repository by using the , then you can update the major release that the repository uses by removing the repository for the old version and adding the repository for the new version.
First, you can remove the repository for the old version by executing the following command:
After that, you can add the repository for the new version. For example, if you wanted to use the repository to install on SLES 15, then you could use the following commands to add the MariaDB zypper repository:
After that, the repository should refer to .
Before MariaDB can be installed, you also have to import the GPG public key that is used to verify the digital signatures of the packages in our repositories. This allows the zypper and rpm utilities to verify the integrity of the packages that they install.
The id of our GPG public key is 0xcbcb082a1bb943db. The short form of the id
is 0x1BB943DB. The full key fingerprint is:
The utility can be used to import this key. For example:
Once the GPG public key is imported, you are ready to install packages from the repository.
After the zypper repository is configured, you can install MariaDB by executing the command. The specific command that you would use would depend on which specific packages that you want to install.
To Install the most common packages, execute the following command:
To Install MariaDB Server, execute the following command:
The process to install MariaDB Galera Cluster with the MariaDB zypper repository is practically the same as installing standard MariaDB Server.
Galera Cluster support has been included in the standard MariaDB Server packages, so you will need to install the MariaDB-server package, as you normally would.
You also need to install the galera-4 package to obtain the 4 wsrep provider library.
To install MariaDB Galera Cluster, you could execute the following command:
If you haven't yet imported the MariaDB GPG public key, then zypper will prompt you to
import it after it downloads the packages, but before it prompts you to install them.
See for more information on MariaDB Galera Cluster.
has been included as the client library. However, the package name for the client library has not been changed.
To Install the clients and client libraries, execute the following command:
To install , execute the following command:
Some may also need to be installed.
For example, to install the password validation plugin, execute the following command:
The MariaDB zypper repository also contains packages. These package may be needed when .
To install for the most common packages, execute the following command:
To install for MariaDB Server, execute the following command:
has been included as the client library. However, the package name for the client library has not been changed.
To install for the clients and client libraries, execute the following command:
To install for , execute the following command:
For some , may also need to be installed.
For example, to install for the password validation plugin, execute the following command:
The MariaDB zypper repository contains the last few versions of MariaDB. To show what versions are available, use the following command:
In the output you will see the available versions.
To install an older version of a package instead of the latest version we just need to specify the package name, a dash, and then the version number. And we only need to specify enough of the version number for it to be unique from the other available versions.
However, when installing an older version of a package, if zypper has to install dependencies, then it will automatically choose to install the latest versions of those packages. To ensure that all MariaDB packages are on the same version in this scenario, it is necessary to specify them all.
The packages that the MariaDB-server package depend on are: MariaDB-client,
MariaDB-shared, and MariaDB-common. Therefore, to install from this zypper
repository, we would do the following:
The rest of the install and setup process is as normal.
After the installation is complete, you can .
If you are using , then keep in mind that the first node will have to be .
This page is licensed: CC BY-SA / Gnu FDL
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bashsudo zypper addrepo --gpgcheck --refresh https://yum.mariadb.org/10.6/sles/15/x86_64 mariadb
sudo zypper --gpg-auto-import-keys refreshsudo zypper removerepo mariadb
sudo zypper addrepo --gpgcheck --refresh https://yum.mariadb.org/10.6.21/sles/15/x86_64 mariadbsudo zypper removerepo mariadbsudo zypper addrepo --gpgcheck --refresh https://yum.mariadb.org/10.6/sles/15/x86_64 mariadb
sudo zypper --gpg-auto-import-keys refresh1993 69E5 404B D5FC 7D2F E43B CBCB 082A 1BB9 43DBsudo rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDBsudo zypper install MariaDB-server galera-4 MariaDB-client MariaDB-shared MariaDB-backup MariaDB-commonsudo zypper install MariaDB-serversudo zypper install MariaDB-server MariaDB-client galera-4sudo zypper install MariaDB-client MariaDB-sharedsudo zypper install MariaDB-backupsudo zypper install MariaDB-cracklib-password-checksudo zypper install MariaDB-server-debuginfo MariaDB-client-debuginfo MariaDB-shared-debuginfo MariaDB-backup-debuginfo MariaDB-common-debuginfosudo zypper install MariaDB-server-debuginfosudo zypper install MariaDB-client-debuginfo MariaDB-shared-debuginfosudo zypper install MariaDB-backup-debuginfosudo zypper install MariaDB-cracklib-password-check-debuginfozypper search --details MariaDB-serversudo zypper install MariaDB-server-10.6.21 MariaDB-client-10.6.21 MariaDB-shared-10.6.21 MariaDB-backup-10.6.21 MariaDB-common-10.6.21