Ubuntu 20.04にMariaDB 10.6をインストールする

2021年10月1日

1.OSの確認
# cat /etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"

2.標準MariaDBの確認
# sudo apt info mariadb-server

Package: mariadb-server
Version: 1:10.3.31-0ubuntu0.20.04.1
Priority: optional
Section: universe/database
Source: mariadb-10.3
Origin: Ubuntu

3.リポジトリへの登録

# sudo apt-get install software-properties-common dirmngr apt-transport-https
# sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
# sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.yongbok.net/mariadb/repo/10.6/ubuntu focal main'

4.パッケージを更新
# sudo apt update

5.MariaDBを確認
# sudo apt info mariadb-server

Package: mariadb-server
Version: 1:10.6.4+maria~focal
Priority: optional
Section: database
Source: mariadb-10.6

6.MariaDB 10.6系をインストール
# sudo apt install mariadb-server

7.動作確認

# sudo mariadb

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 45
Server version: 10.6.4-MariaDB-1:10.6.4+maria~focal mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select version();
+-------------------------------------+
| version() |
+-------------------------------------+
| 10.6.4-MariaDB-1:10.6.4+maria~focal |
+-------------------------------------+
1 row in set (0.001 sec)

 

Ubuntu 20.04

Posted by arkgame