---
title: "CentOS 8 に MariaDB Community Server 10.4 をインストール"
publish_date: 2019-10-01
updated_date: 2023-10-12
author: "MariaDB"
tags:
  - name: "CentOS8"
    url: "/ja/resources/blog/tag/centos8.md"
  - name: "MariaDB Community Server"
    url: "/ja/resources/blog/tag/mariadb-community-server.md"
---

# CentOS 8 に MariaDB Community Server 10.4 をインストール

2019-09-24 に CentOS 8 (8.0.1905) がリリースされました。CentOS 7.0 がリリースされたのが 2014 年 7 月ですので，5年ぶりのメジャーアップデートとなります。

MariaDB Corporation の web サイトの[ダウンロードページ](https://staging-mdb.com/downloads/)では，すでに CentOS 8 用の RPM tarball が配布されていますので，早速インストールを行ってみました。

### テスト環境

- CentOS 8.0.1905 x86\_64
- MariaDB Community Server 10.4.8 GA

### MariaDB Community Server 10.4 をインストール

curl や wget コマンドを使用し，CentOS 8(x86\_64) 用 tarball をダウンロードします。

```
curl -O https://downloads.mariadb.com/MariaDB/mariadb-10.4.8/yum/centos/mariadb-10.4.8-rhel-8-x86_64-rpms.tar

```

適当なディレクトリに展開します。

```
tar xvf mariadb-10.4.8-rhel-8-x86_64-rpms.tar

```

dnf localinstall を用いて RPM をインストールします。

```
sudo dnf localinstall -y \
 galera-4-26.4.2-1.rhel8.0.el8.x86_64.rpm \ 
 MariaDB-client-10.4.8-1.el8.x86_64.rpm \
 MariaDB-common-10.4.8-1.el8.x86_64.rpm \
 MariaDB-server-10.4.8-1.el8.x86_64.rpm \
 MariaDB-shared-10.4.8-1.el8.x86_64.rpm

```

mariadb service を有効化/起動します。

```
sudo systemctl enable mariadb
sudo systemctl start mariadb

```

MariaDB monitor で MariaDB Server に接続します。

```
$ sudo mariadb
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.4.8-MariaDB MariaDB Server

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)]>

```

特に問題なく MariaDB Server 10.4 のインストール，接続確認を行うことができました。