Setting up and using the MariaDB Package Repository
Overview
A convenient shell script to set up MariaDB repositories is available at https://downloads.mariadb.com/MariaDB/mariadb_repo_setup. It can be executed like this:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
The script supports GNU/Linux operating systems officially supported under MariaDB Enterprise subscriptions (though a MariaDB Enterprise subscription is not required to use the repository). As of May 2017, these include:
- Red Hat Enterprise Linux (RHEL)/CentOS 6 and 7
- Debian 7 (wheezy) and 8 (jessie)
- Ubuntu 14.04 LTS (trusty) and 16.04 LTS (xenial)
- SUSE Linux Enterprise Server (SLES) 12
This will set up repositories for MariaDB Server/Cluster, MariaDB MaxScale, and a tools repository that includes Percona XtraBackup and its dependencies.
The script will also install trusted keys used to sign MariaDB software packages.
By default, the repositories will be set up to install the latest GA version of MariaDB Server/Cluster and the latest version of MaxScale. This behavior can be changed by giving options to the script.
To provide options to the script, you must tell bash to expect them by executing bash with the options -s --
, like this:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --help
Options
Option | Description |
---|---|
--help | Display a usage message and exit. |
--mariadb-server-version= <version> | Override the default MariaDB Server version. By default, the script will use 'mariadb-10.1'. |
--mariadb-maxscale-version= <version> | Override the default MariaDB MaxScale version. By default, the script will use 'latest'. |
--skip-key-import | Skip importing GPG signing keys. |
--skip-server | Skip the 'MariaDB Server' repository. |
--skip-maxscale | Skip the 'MaxScale' repository. |
--skip-tools | Skip the 'Tools' repository. |
--write-to-stdout | Write output to stdout instead of to the OS's repository configuration. This will also skip importing GPG keys and updating the package cache on platforms where that behavior exists. |
Examples
To set up the MariaDB Repository to install MariaDB Server 10.0, execute mariadb_repo_setup
like this:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=mariadb-10.0