LoginSignup
0
1

More than 1 year has passed since last update.

Ubuntuにmariadbをバージョン指定でインストールする方法

Posted at

Ubuntu20にmariadb10.4をインストールするのにハマったのでメモ。

mariadbをインストールする記事はあちこちにあるけど、バージョン指定してインストールする方法に関して記載がない。ここではバージョンを指定してインストールする方法を提示する。

「mariadb install repository」でググる

以下のページがヒットする。
https://mariadb.com/kb/en/mariadb-package-repository-setup-and-usage/
image.png

この中ごろにきてる

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash

がmariadbとその周辺ツールのインストールの基本。これでパッケージのリポジトリが指定できる。

基本はここに書かれている通りでいいのだが、途中にconfigration toolへのリンクがある
https://mariadb.org/download/?t=repo-config
一見するとインストール先のOSやLinuxのディストリビューション毎のセットアップができるように見えるが、接続先のミラーサーバーの署名が不正などの理由でUbuntu20上に10.4のリポジトリは登録できなかった。
結局はconfigration toolに頼るよりも

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash

だけで大半のことはできる。
そして肝心のバージョン指定方法は

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version="mariadb-10.4"

と、--mariadb-server-version という引数でバージョンを指定するだけ。これで10.4のリポジトリを指すので、あとは

sudo apt-get install mariadb-server mariadb-client

と本体をインストールする。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1