- 最新版の手順じゃないと思った人
- いろんなサイトを見ても途中経過が記載してなく不安になる人
- 操作通りしたが動かない人
概要
CentOS 7.9 の標準の yum リポジトリでは MariaDB 5.5 が提供されていますが、新しくサーバーを構築する際には最新バージョンの MariaDB をインストールしたいですね。
本稿では CentOS 7.9 に MariaDB 10.6.4 を yum でインストールする手順について解説します。
MariaDBのインストール前の準備
OSのバージョン確認
CentOSのバージョンを確認します。
cat /etc/redhat-release コマンドでバージョンを確認します。
1 2 3 | [root@localhost ~] # cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [root@localhost ~] # |
デェフォルトMariaDBインストールの確認
既にインストールされているかを確認します。
yum list installed | grep mariadb コマンドで確認します。
1 2 3 | [root@localhost ~] # yum list installed | grep mariadb mariadb-libs.x86_64 1:5.5.68-1.el7 @anaconda [root@localhost ~] # |
リポジトリファイルの作成と確認
MariaDB公式サイトに用意されてますのでこれを利用します。
上記の外部サイトをクリックすると下記の画面が表示されます。

Choose a distribution の CentOS7(x86_64) を選択してください。

Choose a MariaDB Server version の 10.6 を選択してください。

Mirror の場所が自動で表示されます。
画面にリポジトリファイルの内容が表示(下記の赤枠)されますので、この内容をメモ帳などにコピーします。

viコマンドでリポジトリ用の mariadb.repo ファイルを作成します。
vi /etc/yum.repos.d/mariadb.repo
最後の行に「enable=1」を追加します。これはリポジトリを有効にするために指定するためです。
# MariaDB 10.6 CentOS repository list - created 2021-11-08 12:58 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
baseurl = https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/yum/10.6/centos7-amd64
gpgkey=https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
enable=1
リポジトリはenable=1で有効してますので、指定無しでyumコマンドを実行します。
MariaDB10.6.4のインストール
インストールパッケージの確認
インストール前にパッケージの内容を確認します。
yum info MariaDB-server MariaDB-client MariaDB-devel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | [root@localhost ~] # yum info MariaDB-server MariaDB-client MariaDB-devel 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: mirrors. cat .net * extras: mirrors. cat .net * updates: mirrors. cat .net 利用可能なパッケージ 名前 : MariaDB-client アーキテクチャー : x86_64 バージョン : 10.6.4 リリース : 1.el7.centos 容量 : 14 M リポジトリー : mariadb 要約 : MariaDB: a very fast and robust SQL database server URL : http: //mariadb .org ライセンス : GPLv2 説明 : MariaDB: a very fast and robust SQL database server : : It is GPL v2 licensed, which means you can use the it free of charge under the : conditions of the GNU General Public License Version 2 (http: //www .gnu.org /licenses/ ). : : MariaDB documentation can be found at https: //mariadb .com /kb : MariaDB bug reports should be submitted through https: //jira .mariadb.org 名前 : MariaDB-devel アーキテクチャー : x86_64 バージョン : 10.6.4 リリース : 1.el7.centos 容量 : 8.1 M リポジトリー : mariadb 要約 : MariaDB: a very fast and robust SQL database server URL : http: //mariadb .org ライセンス : GPLv2 説明 : MariaDB: a very fast and robust SQL database server : : It is GPL v2 licensed, which means you can use the it free of charge under the : conditions of the GNU General Public License Version 2 (http: //www .gnu.org /licenses/ ). : : MariaDB documentation can be found at https: //mariadb .com /kb : MariaDB bug reports should be submitted through https: //jira .mariadb.org 名前 : MariaDB-server アーキテクチャー : x86_64 バージョン : 10.6.4 リリース : 1.el7.centos 容量 : 25 M リポジトリー : mariadb 要約 : MariaDB: a very fast and robust SQL database server URL : http: //mariadb .org ライセンス : GPLv2 説明 : MariaDB: a very fast and robust SQL database server : : It is GPL v2 licensed, which means you can use the it free of charge under the : conditions of the GNU General Public License Version 2 (http: //www .gnu.org /licenses/ ). : : MariaDB documentation can be found at https: //mariadb .com /kb : MariaDB bug reports should be submitted through https: //jira .mariadb.org 名前 : mariadb-devel アーキテクチャー : i686 エポック : 1 バージョン : 5.5.68 リリース : 1.el7 容量 : 757 k リポジトリー : base /7/x86_64 要約 : Files for development of MariaDB /MySQL applications URL : http: //mariadb .org ライセンス : GPLv2 with exceptions and LGPLv2 and BSD 説明 : MariaDB is a multi-user, multi-threaded SQL database server. This : package contains the libraries and header files that are needed for : developing MariaDB /MySQL client applications. : MariaDB is a community developed branch of MySQL. 名前 : mariadb-devel アーキテクチャー : x86_64 エポック : 1 バージョン : 5.5.68 リリース : 1.el7 容量 : 757 k リポジトリー : base /7/x86_64 要約 : Files for development of MariaDB /MySQL applications URL : http: //mariadb .org ライセンス : GPLv2 with exceptions and LGPLv2 and BSD 説明 : MariaDB is a multi-user, multi-threaded SQL database server. This : package contains the libraries and header files that are needed for : developing MariaDB /MySQL client applications. : MariaDB is a community developed branch of MySQL. 名前 : mariadb-server アーキテクチャー : x86_64 エポック : 1 バージョン : 5.5.68 リリース : 1.el7 容量 : 11 M リポジトリー : base /7/x86_64 要約 : The MariaDB server and related files URL : http: //mariadb .org ライセンス : GPLv2 with exceptions and LGPLv2 and BSD 説明 : MariaDB is a multi-user, multi-threaded SQL database server. It is a : client /server implementation consisting of a server daemon (mysqld) : and many different client programs and libraries. This package contains : the MariaDB server and some accompanying files and directories. : MariaDB is a community developed branch of MySQL. [root@localhost ~] # |
インストールコマンド
下記のコマンドで3つのパッケージをインストールします。
yum -y install MariaDB-devel MariaDB-client MariaDB-server
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | [root@localhost ~] # yum -y install MariaDB-devel MariaDB-client MariaDB-server 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: mirrors. cat .net * extras: mirrors. cat .net * updates: mirrors. cat .net 依存性の解決をしています --> トランザクションの確認を実行しています。 ---> パッケージ MariaDB-client.x86_64 0:10.6.4-1.el7.centos を インストール --> 依存性の処理をしています: libpmem.so.1(LIBPMEM_1.0)(64bit) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(File::Temp) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(File::Copy) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(DBI) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(Data::Dumper) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(strict) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(File::Basename) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(Sys::Hostname) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(Fcntl) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(File::Path) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(vars) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(Getopt::Long) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: /usr/bin/perl のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: MariaDB-common のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(IPC::Open3) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: perl(Exporter) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: libpmem.so.1()(64bit) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: libpcre2-8.so.0()(64bit) のパッケージ: MariaDB-client-10.6.4-1.el7.centos.x86_64 ---> パッケージ MariaDB-devel.x86_64 0:10.6.4-1.el7.centos を インストール ---> パッケージ MariaDB-server.x86_64 0:10.6.4-1.el7.centos を インストール --> 依存性の処理をしています: rsync のパッケージ: MariaDB-server-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: galera-4 のパッケージ: MariaDB-server-10.6.4-1.el7.centos.x86_64 --> 依存性の処理をしています: lsof のパッケージ: MariaDB-server-10.6.4-1.el7.centos.x86_64 --> トランザクションの確認を実行しています。 ---> パッケージ MariaDB-common.x86_64 0:10.6.4-1.el7.centos を インストール --> 依存性の処理をしています: MariaDB-compat のパッケージ: MariaDB-common-10.6.4-1.el7.centos.x86_64 ---> パッケージ galera-4.x86_64 0:26.4.9-1.el7.centos を インストール --> 依存性の処理をしています: socat のパッケージ: galera-4-26.4.9-1.el7.centos.x86_64 --> 依存性の処理をしています: libboost_program_options-mt.so.1.53.0()(64bit) のパッケージ: galera-4-26.4.9-1.el7.centos.x86_64 ---> パッケージ libpmem.x86_64 0:1.5.1-2.1.el7 を インストール ---> パッケージ lsof .x86_64 0:4.87-6.el7 を インストール ---> パッケージ pcre2.x86_64 0:10.23-2.el7 を インストール ---> パッケージ perl.x86_64 4:5.16.3-299.el7_9 を インストール --> 依存性の処理をしています: perl-libs = 4:5.16.3-299.el7_9 のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Socket) >= 1.3 のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Scalar::Util) >= 1.10 のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl-macros のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl-libs のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(threads::shared) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(threads) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(constant) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Time::Local) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Time::HiRes) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Storable) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Socket) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Scalar::Util) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Pod::Simple::XHTML) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Pod::Simple::Search) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Filter::Util::Call) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(File::Spec::Unix) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(File::Spec::Functions) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(File::Spec) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Cwd) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: perl(Carp) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 --> 依存性の処理をしています: libperl.so()(64bit) のパッケージ: 4:perl-5.16.3-299.el7_9.x86_64 ---> パッケージ perl-DBI.x86_64 0:1.627-4.el7 を インストール --> 依存性の処理をしています: perl(RPC::PlServer) >= 0.2001 のパッケージ: perl-DBI-1.627-4.el7.x86_64 --> 依存性の処理をしています: perl(RPC::PlClient) >= 0.2000 のパッケージ: perl-DBI-1.627-4.el7.x86_64 ---> パッケージ perl-Data-Dumper.x86_64 0:2.145-3.el7 を インストール ---> パッケージ perl-Exporter.noarch 0:5.68-3.el7 を インストール ---> パッケージ perl-File-Path.noarch 0:2.09-2.el7 を インストール ---> パッケージ perl-File-Temp.noarch 0:0.23.01-3.el7 を インストール ---> パッケージ perl-Getopt-Long.noarch 0:2.40-3.el7 を インストール --> 依存性の処理をしています: perl(Pod::Usage) >= 1.14 のパッケージ: perl-Getopt-Long-2.40-3.el7.noarch --> 依存性の処理をしています: perl(Text::ParseWords) のパッケージ: perl-Getopt-Long-2.40-3.el7.noarch ---> パッケージ rsync .x86_64 0:3.1.2-10.el7 を インストール --> トランザクションの確認を実行しています。 ---> パッケージ MariaDB-compat.x86_64 0:10.6.4-1.el7.centos を インストール ---> パッケージ boost-program-options.x86_64 0:1.53.0-28.el7 を インストール ---> パッケージ perl-Carp.noarch 0:1.26-244.el7 を インストール ---> パッケージ perl-Filter.x86_64 0:1.49-3.el7 を インストール ---> パッケージ perl-PathTools.x86_64 0:3.40-5.el7 を インストール ---> パッケージ perl-PlRPC.noarch 0:0.2020-14.el7 を インストール --> 依存性の処理をしています: perl(Net::Daemon) >= 0.13 のパッケージ: perl-PlRPC-0.2020-14.el7.noarch --> 依存性の処理をしています: perl(Net::Daemon::Test) のパッケージ: perl-PlRPC-0.2020-14.el7.noarch --> 依存性の処理をしています: perl(Net::Daemon::Log) のパッケージ: perl-PlRPC-0.2020-14.el7.noarch --> 依存性の処理をしています: perl(Compress::Zlib) のパッケージ: perl-PlRPC-0.2020-14.el7.noarch ---> パッケージ perl-Pod-Simple.noarch 1:3.28-4.el7 を インストール --> 依存性の処理をしています: perl(Pod::Escapes) >= 1.04 のパッケージ: 1:perl-Pod-Simple-3.28-4.el7.noarch --> 依存性の処理をしています: perl(Encode) のパッケージ: 1:perl-Pod-Simple-3.28-4.el7.noarch ---> パッケージ perl-Pod-Usage.noarch 0:1.63-3.el7 を インストール --> 依存性の処理をしています: perl(Pod::Text) >= 3.15 のパッケージ: perl-Pod-Usage-1.63-3.el7.noarch --> 依存性の処理をしています: perl-Pod-Perldoc のパッケージ: perl-Pod-Usage-1.63-3.el7.noarch ---> パッケージ perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 を インストール ---> パッケージ perl-Socket.x86_64 0:2.010-5.el7 を インストール ---> パッケージ perl-Storable.x86_64 0:2.45-3.el7 を インストール ---> パッケージ perl-Text-ParseWords.noarch 0:3.29-4.el7 を インストール ---> パッケージ perl-Time-HiRes.x86_64 4:1.9725-3.el7 を インストール ---> パッケージ perl-Time-Local.noarch 0:1.2300-2.el7 を インストール ---> パッケージ perl-constant.noarch 0:1.27-2.el7 を インストール ---> パッケージ perl-libs.x86_64 4:5.16.3-299.el7_9 を インストール ---> パッケージ perl-macros.x86_64 4:5.16.3-299.el7_9 を インストール ---> パッケージ perl-threads.x86_64 0:1.87-4.el7 を インストール ---> パッケージ perl-threads-shared.x86_64 0:1.43-6.el7 を インストール ---> パッケージ socat.x86_64 0:1.7.3.2-2.el7 を インストール --> トランザクションの確認を実行しています。 ---> パッケージ perl-Encode.x86_64 0:2.51-7.el7 を インストール ---> パッケージ perl-IO-Compress.noarch 0:2.061-2.el7 を インストール --> 依存性の処理をしています: perl(Compress::Raw::Zlib) >= 2.061 のパッケージ: perl-IO-Compress-2.061-2.el7.noarch --> 依存性の処理をしています: perl(Compress::Raw::Bzip2) >= 2.061 のパッケージ: perl-IO-Compress-2.061-2.el7.noarch ---> パッケージ perl-Net-Daemon.noarch 0:0.48-5.el7 を インストール ---> パッケージ perl-Pod-Escapes.noarch 1:1.04-299.el7_9 を インストール ---> パッケージ perl-Pod-Perldoc.noarch 0:3.20-4.el7 を インストール --> 依存性の処理をしています: perl(parent) のパッケージ: perl-Pod-Perldoc-3.20-4.el7.noarch --> 依存性の処理をしています: perl(HTTP::Tiny) のパッケージ: perl-Pod-Perldoc-3.20-4.el7.noarch ---> パッケージ perl-podlators.noarch 0:2.5.1-3.el7 を インストール --> トランザクションの確認を実行しています。 ---> パッケージ perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 を インストール ---> パッケージ perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 を インストール ---> パッケージ perl-HTTP-Tiny.noarch 0:0.033-3.el7 を インストール ---> パッケージ perl-parent.noarch 1:0.225-244.el7 を インストール --> 依存性解決を終了しました。 依存性を解決しました ============================================================================================================== Package アーキテクチャー バージョン リポジトリー 容量 ============================================================================================================== インストール中: MariaDB-client x86_64 10.6.4-1.el7.centos mariadb 14 M MariaDB-devel x86_64 10.6.4-1.el7.centos mariadb 8.1 M MariaDB-server x86_64 10.6.4-1.el7.centos mariadb 25 M 依存性関連でのインストールをします: MariaDB-common x86_64 10.6.4-1.el7.centos mariadb 81 k MariaDB-compat x86_64 10.6.4-1.el7.centos mariadb 2.2 M boost-program-options x86_64 1.53.0-28.el7 base 156 k galera-4 x86_64 26.4.9-1.el7.centos mariadb 9.6 M libpmem x86_64 1.5.1-2.1.el7 base 59 k lsof x86_64 4.87-6.el7 base 331 k pcre2 x86_64 10.23-2.el7 base 201 k perl x86_64 4:5.16.3-299.el7_9 updates 8.0 M perl-Carp noarch 1.26-244.el7 base 19 k perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 base 32 k perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 base 57 k perl-DBI x86_64 1.627-4.el7 base 802 k perl-Data-Dumper x86_64 2.145-3.el7 base 47 k perl-Encode x86_64 2.51-7.el7 base 1.5 M perl-Exporter noarch 5.68-3.el7 base 28 k perl-File-Path noarch 2.09-2.el7 base 26 k perl-File-Temp noarch 0.23.01-3.el7 base 56 k perl-Filter x86_64 1.49-3.el7 base 76 k perl-Getopt-Long noarch 2.40-3.el7 base 56 k perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k perl-IO-Compress noarch 2.061-2.el7 base 260 k perl-Net-Daemon noarch 0.48-5.el7 base 51 k perl-PathTools x86_64 3.40-5.el7 base 82 k perl-PlRPC noarch 0.2020-14.el7 base 36 k perl-Pod-Escapes noarch 1:1.04-299.el7_9 updates 52 k perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k perl-Pod-Usage noarch 1.63-3.el7 base 27 k perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k perl-Socket x86_64 2.010-5.el7 base 49 k perl-Storable x86_64 2.45-3.el7 base 77 k perl-Text-ParseWords noarch 3.29-4.el7 base 14 k perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k perl-Time-Local noarch 1.2300-2.el7 base 24 k perl-constant noarch 1.27-2.el7 base 19 k perl-libs x86_64 4:5.16.3-299.el7_9 updates 690 k perl-macros x86_64 4:5.16.3-299.el7_9 updates 44 k perl-parent noarch 1:0.225-244.el7 base 12 k perl-podlators noarch 2.5.1-3.el7 base 112 k perl-threads x86_64 1.87-4.el7 base 49 k perl-threads-shared x86_64 1.43-6.el7 base 39 k rsync x86_64 3.1.2-10.el7 base 404 k socat x86_64 1.7.3.2-2.el7 base 290 k トランザクションの要約 ============================================================================================================== インストール 3 パッケージ (+43 個の依存関係のパッケージ) 総ダウンロード容量: 73 M インストール容量: 346 M Downloading packages: 警告: /var/cache/yum/x86_64/7/mariadb/packages/MariaDB-common-10 .6.4-1.el7.centos.x86_64.rpm: ヘッダー V4 DSA /SHA1 Signature、鍵 ID 1bb943db: NOKEY MariaDB-common-10.6.4-1.el7.centos.x86_64.rpm の公開鍵がインストールされていません (1 /46 ): MariaDB-common-10.6.4-1.el7.centos.x86_64.rpm | 81 kB 00:00:00 (2 /46 ): MariaDB-compat-10.6.4-1.el7.centos.x86_64.rpm | 2.2 MB 00:00:01 (3 /46 ): MariaDB-devel-10.6.4-1.el7.centos.x86_64.rpm | 8.1 MB 00:00:02 警告: /var/cache/yum/x86_64/7/base/packages/boost-program-options-1 .53.0-28.el7.x86_64.rpm: ヘッダー V3 RSA /SHA256 Signature、鍵 ID f4a80eb5: NOKEY boost-program-options-1.53.0-28.el7.x86_64.rpm の公開鍵がインストールされていません (4 /46 ): boost-program-options-1.53.0-28.el7.x86_64.rpm | 156 kB 00:00:00 (5 /46 ): MariaDB-client-10.6.4-1.el7.centos.x86_64.rpm | 14 MB 00:00:06 (6 /46 ): libpmem-1.5.1-2.1.el7.x86_64.rpm | 59 kB 00:00:00 (7 /46 ): pcre2-10.23-2.el7.x86_64.rpm | 201 kB 00:00:00 (8 /46 ): perl-Carp-1.26-244.el7.noarch.rpm | 19 kB 00:00:00 (9 /46 ): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm | 32 kB 00:00:00 (10 /46 ): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm | 57 kB 00:00:00 (11 /46 ): perl-DBI-1.627-4.el7.x86_64.rpm | 802 kB 00:00:00 (12 /46 ): perl-Data-Dumper-2.145-3.el7.x86_64.rpm | 47 kB 00:00:00 (13 /46 ): perl-Encode-2.51-7.el7.x86_64.rpm | 1.5 MB 00:00:00 (14 /46 ): perl-Exporter-5.68-3.el7.noarch.rpm | 28 kB 00:00:00 (15 /46 ): perl-File-Path-2.09-2.el7.noarch.rpm | 26 kB 00:00:00 (16 /46 ): perl-File-Temp-0.23.01-3.el7.noarch.rpm | 56 kB 00:00:00 (17 /46 ): perl-Filter-1.49-3.el7.x86_64.rpm | 76 kB 00:00:00 (18 /46 ): perl-Getopt-Long-2.40-3.el7.noarch.rpm | 56 kB 00:00:00 (19 /46 ): perl-HTTP-Tiny-0.033-3.el7.noarch.rpm | 38 kB 00:00:00 (20 /46 ): perl-IO-Compress-2.061-2.el7.noarch.rpm | 260 kB 00:00:00 (21 /46 ): perl-Net-Daemon-0.48-5.el7.noarch.rpm | 51 kB 00:00:00 (22 /46 ): perl-PathTools-3.40-5.el7.x86_64.rpm | 82 kB 00:00:00 (23 /46 ): perl-PlRPC-0.2020-14.el7.noarch.rpm | 36 kB 00:00:00 perl-Pod-Escapes-1.04-299.el7_9.noarch.rpm の公開鍵がインストールされていません.9 MB /s | 37 MB 00:00:07 ETA (24 /46 ): perl-Pod-Escapes-1.04-299.el7_9.noarch.rpm | 52 kB 00:00:00 (25 /46 ): perl-Pod-Perldoc-3.20-4.el7.noarch.rpm | 87 kB 00:00:00 (26 /46 ): perl-Pod-Simple-3.28-4.el7.noarch.rpm | 216 kB 00:00:00 (27 /46 ): lsof -4.87-6.el7.x86_64.rpm | 331 kB 00:00:00 (28 /46 ): perl-Pod-Usage-1.63-3.el7.noarch.rpm | 27 kB 00:00:00 (29 /46 ): perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm | 36 kB 00:00:00 (30 /46 ): perl-Socket-2.010-5.el7.x86_64.rpm | 49 kB 00:00:00 (31 /46 ): perl-Storable-2.45-3.el7.x86_64.rpm | 77 kB 00:00:00 (32 /46 ): perl-Time-HiRes-1.9725-3.el7.x86_64.rpm | 45 kB 00:00:00 (33 /46 ): perl-Time-Local-1.2300-2.el7.noarch.rpm | 24 kB 00:00:00 (34 /46 ): perl-constant-1.27-2.el7.noarch.rpm | 19 kB 00:00:00 (35 /46 ): perl-libs-5.16.3-299.el7_9.x86_64.rpm | 690 kB 00:00:00 (36 /46 ): perl-macros-5.16.3-299.el7_9.x86_64.rpm | 44 kB 00:00:00 (37 /46 ): perl-parent-0.225-244.el7.noarch.rpm | 12 kB 00:00:00 (38 /46 ): perl-podlators-2.5.1-3.el7.noarch.rpm | 112 kB 00:00:00 (39 /46 ): perl-threads-1.87-4.el7.x86_64.rpm | 49 kB 00:00:00 (40 /46 ): perl-threads-shared-1.43-6.el7.x86_64.rpm | 39 kB 00:00:00 (41 /46 ): rsync -3.1.2-10.el7.x86_64.rpm | 404 kB 00:00:00 (42 /46 ): socat-1.7.3.2-2.el7.x86_64.rpm | 290 kB 00:00:00 (43 /46 ): perl-5.16.3-299.el7_9.x86_64.rpm | 8.0 MB 00:00:01 (44 /46 ): perl-Text-ParseWords-3.29-4.el7.noarch.rpm | 14 kB 00:00:00 (45 /46 ): galera-4-26.4.9-1.el7.centos.x86_64.rpm | 9.6 MB 00:00:03 (46 /46 ): MariaDB-server-10.6.4-1.el7.centos.x86_64.rpm | 25 MB 00:00:06 -------------------------------------------------------------------------------------------------------------- 合計 5.9 MB /s | 73 MB 00:00:12 file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 から鍵を取得中です。 Importing GPG key 0xF4A80EB5: Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>" Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5 Package : centos-release-7-9.2009.0.el7.centos.x86_64 (@anaconda) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 https: //ftp .yz.yamagata-u.ac.jp /pub/dbms/mariadb/yum/RPM-GPG-KEY-MariaDB から鍵を取得中です。 Importing GPG key 0x1BB943DB: Userid : "MariaDB Package Signing Key <package-signing-key@mariadb.org>" Fingerprint: 1993 69e5 404b d5fc 7d2f e43b cbcb 082a 1bb9 43db From : https: //ftp .yz.yamagata-u.ac.jp /pub/dbms/mariadb/yum/RPM-GPG-KEY-MariaDB Running transaction check Running transaction test Transaction test succeeded Running transaction インストール中 : MariaDB-compat-10.6.4-1.el7.centos.x86_64 1 /46 インストール中 : MariaDB-common-10.6.4-1.el7.centos.x86_64 2 /46 インストール中 : rsync -3.1.2-10.el7.x86_64 3 /46 インストール中 : pcre2-10.23-2.el7.x86_64 4 /46 インストール中 : libpmem-1.5.1-2.1.el7.x86_64 5 /46 インストール中 : lsof -4.87-6.el7.x86_64 6 /46 インストール中 : 1:perl-parent-0.225-244.el7.noarch 7 /46 インストール中 : perl-HTTP-Tiny-0.033-3.el7.noarch 8 /46 インストール中 : perl-podlators-2.5.1-3.el7.noarch 9 /46 インストール中 : perl-Pod-Perldoc-3.20-4.el7.noarch 10 /46 インストール中 : 1:perl-Pod-Escapes-1.04-299.el7_9.noarch 11 /46 インストール中 : perl-Encode-2.51-7.el7.x86_64 12 /46 インストール中 : perl-Text-ParseWords-3.29-4.el7.noarch 13 /46 インストール中 : perl-Pod-Usage-1.63-3.el7.noarch 14 /46 インストール中 : 4:perl-macros-5.16.3-299.el7_9.x86_64 15 /46 インストール中 : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 16 /46 インストール中 : perl-Exporter-5.68-3.el7.noarch 17 /46 インストール中 : perl-constant-1.27-2.el7.noarch 18 /46 インストール中 : perl-Socket-2.010-5.el7.x86_64 19 /46 インストール中 : perl-Time-Local-1.2300-2.el7.noarch 20 /46 インストール中 : perl-Carp-1.26-244.el7.noarch 21 /46 インストール中 : perl-Storable-2.45-3.el7.x86_64 22 /46 インストール中 : perl-PathTools-3.40-5.el7.x86_64 23 /46 インストール中 : perl-Scalar-List-Utils-1.27-248.el7.x86_64 24 /46 インストール中 : 1:perl-Pod-Simple-3.28-4.el7.noarch 25 /46 インストール中 : perl-File-Temp-0.23.01-3.el7.noarch 26 /46 インストール中 : perl-File-Path-2.09-2.el7.noarch 27 /46 インストール中 : perl-threads-shared-1.43-6.el7.x86_64 28 /46 インストール中 : perl-threads-1.87-4.el7.x86_64 29 /46 インストール中 : perl-Filter-1.49-3.el7.x86_64 30 /46 インストール中 : 4:perl-libs-5.16.3-299.el7_9.x86_64 31 /46 インストール中 : perl-Getopt-Long-2.40-3.el7.noarch 32 /46 インストール中 : 4:perl-5.16.3-299.el7_9.x86_64 33 /46 インストール中 : perl-Data-Dumper-2.145-3.el7.x86_64 34 /46 インストール中 : perl-Net-Daemon-0.48-5.el7.noarch 35 /46 インストール中 : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 36 /46 インストール中 : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 37 /46 インストール中 : perl-IO-Compress-2.061-2.el7.noarch 38 /46 インストール中 : perl-PlRPC-0.2020-14.el7.noarch 39 /46 インストール中 : perl-DBI-1.627-4.el7.x86_64 40 /46 インストール中 : MariaDB-client-10.6.4-1.el7.centos.x86_64 41 /46 インストール中 : socat-1.7.3.2-2.el7.x86_64 42 /46 インストール中 : boost-program-options-1.53.0-28.el7.x86_64 43 /46 インストール中 : galera-4-26.4.9-1.el7.centos.x86_64 44 /46 インストール中 : MariaDB-server-10.6.4-1.el7.centos.x86_64 45 /46 Two all-privilege accounts were created. One is root@localhost, it has no password, but you need to be system 'root' user to connect. Use, for example, sudo mysql The second is mysql@localhost, it has no password either, but you need to be the system 'mysql' user to connect. After connecting you can set the password, if you would need to be able to connect as any of these users with a password and without sudo See the MariaDB Knowledgebase at https: //mariadb .com /kb or the MySQL manual for more instructions. Please report any problems at https: //mariadb .org /jira The latest information about MariaDB is available at https: //mariadb .org/. You can find additional information about the MySQL part at: <div class= "linkcard" ><div class= "lkc-external-wrap" ><a class= "lkc-link no_icon" href= "https://dev.mysql.com" target= "_blank" rel= "external noopener" ><div class= "lkc-card" ><div class= "lkc-info" ><div class= "lkc-favicon" ><img decoding= "async" src= "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAHaTzTgAAAAMSURBVAjXY2AgDQAAADAAAceqhY4AAAAASUVORK5CYII=" alt= "" width= "16" height= "16" data-src= "https://www.google.com/s2/favicons?domain=dev.mysql.com" class= "lazyload" data-eio-rwidth= "16" data-eio-rheight= "16" ><noscript><img decoding= "async" src= "https://www.google.com/s2/favicons?domain=dev.mysql.com" alt= "" width= "16" height= "16" data-eio= "l" />< /noscript >< /div ><div class= "lkc-domain" >dev.mysql.com< /div ><div class= "lkc-share" > <div class= "lkc-sns-x" >8 Posts< /div > <div class= "lkc-sns-hb" >71 Users< /div > <div class= "lkc-sns-po" >202 Pockets< /div >< /div >< /div ><div class= "lkc-content" ><figure class= "lkc-thumbnail" ><img decoding= "async" class= "lkc-thumbnail-img lazyload" src= "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABsAQAAAAC0yiqUAAAAAnRSTlMAAHaTzTgAAAAUSURBVDjLY2AYBaNgFIyCUTCcAQAF6AABKUVa4QAAAABJRU5ErkJggg==" width= "100px" height= "108px" alt= "" data-src= "https://s.wordpress.com/mshots/v1/https%3A%2F%2Fdev.mysql.com?w=200" data-eio-rwidth= "100" data-eio-rheight= "108" ><noscript><img decoding= "async" class= "lkc-thumbnail-img" src= "https://s.wordpress.com/mshots/v1/https%3A%2F%2Fdev.mysql.com?w=200" width= "100px" height= "108px" alt= "" data-eio= "l" />< /noscript >< /figure ><div class= "lkc-title" >MySQL :: Developer Zone< /div ><div class= "lkc-url" title= "https://dev.mysql.com" >https: //dev .mysql.com< /div >< /div ><div class= "clear" >< /div >< /div >< /a >< /div >< /div > Consider joining MariaDB's strong and vibrant community: <div class= "linkcard" ><div class= "lkc-external-wrap" ><a class= "lkc-link no_icon" href= "https://mariadb.org/get-involved/" target= "_blank" rel= "external noopener" ><div class= "lkc-card" ><div class= "lkc-info" ><div class= "lkc-favicon" ><img decoding= "async" src= "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAHaTzTgAAAAMSURBVAjXY2AgDQAAADAAAceqhY4AAAAASUVORK5CYII=" alt= "" width= "16" height= "16" data-src= "https://www.google.com/s2/favicons?domain=mariadb.org" class= "lazyload" data-eio-rwidth= "16" data-eio-rheight= "16" ><noscript><img decoding= "async" src= "https://www.google.com/s2/favicons?domain=mariadb.org" alt= "" width= "16" height= "16" data-eio= "l" />< /noscript >< /div ><div class= "lkc-domain" >MariaDB.org< /div >< /div ><div class= "lkc-content" ><figure class= "lkc-thumbnail" ><img decoding= "async" class= "lkc-thumbnail-img lazyload" src= "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWAQAAAAAUekxPAAAAAnRSTlMAAHaTzTgAAAAaSURBVEjH7cExAQAAAMKg9U9tDQ+gAACAdwMLuAABXZHjmQAAAABJRU5ErkJggg==" width= "100px" height= "108px" alt= "" data-src= "//shimaichi.blog/wp-content/uploads/pz-linkcard/cache/d91ab26e85e66a0827491c4029efbc1dba48aaa4d3ece2b645d68325d5de2645.jpeg" data-eio-rwidth= "150" data-eio-rheight= "150" ><noscript><img decoding= "async" class= "lkc-thumbnail-img" src= "//shimaichi.blog/wp-content/uploads/pz-linkcard/cache/d91ab26e85e66a0827491c4029efbc1dba48aaa4d3ece2b645d68325d5de2645.jpeg" width= "100px" height= "108px" alt= "" data-eio= "l" />< /noscript >< /figure ><div class= "lkc-title" >Contribute - MariaDB.org< /div ><div class= "lkc-url" title= "https://mariadb.org/get-involved/" >https: //mariadb .org /get-involved/ < /div ><div class= "lkc-excerpt" >MariaDB is an Open Source project that thrives thanks to its community. MariaDB Foundation handles all community contributions in a timely manner. There are many ways to contribute to MariaDB. … Continue reading "Contribute" < /div >< /div ><div class= "clear" >< /div >< /div >< /a >< /div >< /div > インストール中 : MariaDB-devel-10.6.4-1.el7.centos.x86_64 46 /46 検証中 : perl-HTTP-Tiny-0.033-3.el7.noarch 1 /46 検証中 : boost-program-options-1.53.0-28.el7.x86_64 2 /46 検証中 : perl-threads-shared-1.43-6.el7.x86_64 3 /46 検証中 : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 4 /46 検証中 : lsof -4.87-6.el7.x86_64 5 /46 検証中 : perl-Exporter-5.68-3.el7.noarch 6 /46 検証中 : perl-constant-1.27-2.el7.noarch 7 /46 検証中 : perl-PathTools-3.40-5.el7.x86_64 8 /46 検証中 : MariaDB-server-10.6.4-1.el7.centos.x86_64 9 /46 検証中 : perl-Socket-2.010-5.el7.x86_64 10 /46 検証中 : 1:perl-parent-0.225-244.el7.noarch 11 /46 検証中 : 4:perl-macros-5.16.3-299.el7_9.x86_64 12 /46 検証中 : perl-Net-Daemon-0.48-5.el7.noarch 13 /46 検証中 : MariaDB-common-10.6.4-1.el7.centos.x86_64 14 /46 検証中 : perl-File-Temp-0.23.01-3.el7.noarch 15 /46 検証中 : 1:perl-Pod-Simple-3.28-4.el7.noarch 16 /46 検証中 : galera-4-26.4.9-1.el7.centos.x86_64 17 /46 検証中 : perl-Time-Local-1.2300-2.el7.noarch 18 /46 検証中 : 1:perl-Pod-Escapes-1.04-299.el7_9.noarch 19 /46 検証中 : perl-DBI-1.627-4.el7.x86_64 20 /46 検証中 : MariaDB-devel-10.6.4-1.el7.centos.x86_64 21 /46 検証中 : libpmem-1.5.1-2.1.el7.x86_64 22 /46 検証中 : MariaDB-client-10.6.4-1.el7.centos.x86_64 23 /46 検証中 : pcre2-10.23-2.el7.x86_64 24 /46 検証中 : perl-Carp-1.26-244.el7.noarch 25 /46 検証中 : perl-Data-Dumper-2.145-3.el7.x86_64 26 /46 検証中 : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 27 /46 検証中 : perl-Storable-2.45-3.el7.x86_64 28 /46 検証中 : perl-Scalar-List-Utils-1.27-248.el7.x86_64 29 /46 検証中 : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 30 /46 検証中 : perl-IO-Compress-2.061-2.el7.noarch 31 /46 検証中 : perl-Pod-Usage-1.63-3.el7.noarch 32 /46 検証中 : perl-PlRPC-0.2020-14.el7.noarch 33 /46 検証中 : perl-Encode-2.51-7.el7.x86_64 34 /46 検証中 : perl-Pod-Perldoc-3.20-4.el7.noarch 35 /46 検証中 : perl-podlators-2.5.1-3.el7.noarch 36 /46 検証中 : 4:perl-5.16.3-299.el7_9.x86_64 37 /46 検証中 : perl-File-Path-2.09-2.el7.noarch 38 /46 検証中 : perl-threads-1.87-4.el7.x86_64 39 /46 検証中 : MariaDB-compat-10.6.4-1.el7.centos.x86_64 40 /46 検証中 : rsync -3.1.2-10.el7.x86_64 41 /46 検証中 : perl-Filter-1.49-3.el7.x86_64 42 /46 検証中 : perl-Getopt-Long-2.40-3.el7.noarch 43 /46 検証中 : perl-Text-ParseWords-3.29-4.el7.noarch 44 /46 検証中 : 4:perl-libs-5.16.3-299.el7_9.x86_64 45 /46 検証中 : socat-1.7.3.2-2.el7.x86_64 46 /46 インストール: MariaDB-client.x86_64 0:10.6.4-1.el7.centos MariaDB-devel.x86_64 0:10.6.4-1.el7.centos MariaDB-server.x86_64 0:10.6.4-1.el7.centos 依存性関連をインストールしました: MariaDB-common.x86_64 0:10.6.4-1.el7.centos MariaDB-compat.x86_64 0:10.6.4-1.el7.centos boost-program-options.x86_64 0:1.53.0-28.el7 galera-4.x86_64 0:26.4.9-1.el7.centos libpmem.x86_64 0:1.5.1-2.1.el7 lsof .x86_64 0:4.87-6.el7 pcre2.x86_64 0:10.23-2.el7 perl.x86_64 4:5.16.3-299.el7_9 perl-Carp.noarch 0:1.26-244.el7 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBI.x86_64 0:1.627-4.el7 perl-Data-Dumper.x86_64 0:2.145-3.el7 perl-Encode.x86_64 0:2.51-7.el7 perl-Exporter.noarch 0:5.68-3.el7 perl-File-Path.noarch 0:2.09-2.el7 perl-File-Temp.noarch 0:0.23.01-3.el7 perl-Filter.x86_64 0:1.49-3.el7 perl-Getopt-Long.noarch 0:2.40-3.el7 perl-HTTP-Tiny.noarch 0:0.033-3.el7 perl-IO-Compress.noarch 0:2.061-2.el7 perl-Net-Daemon.noarch 0:0.48-5.el7 perl-PathTools.x86_64 0:3.40-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7 perl-Pod-Escapes.noarch 1:1.04-299.el7_9 perl-Pod-Perldoc.noarch 0:3.20-4.el7 perl-Pod-Simple.noarch 1:3.28-4.el7 perl-Pod-Usage.noarch 0:1.63-3.el7 perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 perl-Socket.x86_64 0:2.010-5.el7 perl-Storable.x86_64 0:2.45-3.el7 perl-Text-ParseWords.noarch 0:3.29-4.el7 perl-Time-HiRes.x86_64 4:1.9725-3.el7 perl-Time-Local.noarch 0:1.2300-2.el7 perl-constant.noarch 0:1.27-2.el7 perl-libs.x86_64 4:5.16.3-299.el7_9 perl-macros.x86_64 4:5.16.3-299.el7_9 perl-parent.noarch 1:0.225-244.el7 perl-podlators.noarch 0:2.5.1-3.el7 perl-threads.x86_64 0:1.87-4.el7 perl-threads-shared.x86_64 0:1.43-6.el7 rsync .x86_64 0:3.1.2-10.el7 socat.x86_64 0:1.7.3.2-2.el7 完了しました! [root@localhost ~] # |
このように完了しました! と表示されればOKです。
インストールの確認
下記のコマンドでインストールしたパッケージを確認します。
yum list installed | grep mariadb
1 2 3 4 5 6 7 8 | [root@localhost ~] # yum list installed | grep mariadb MariaDB-client.x86_64 10.6.4-1.el7.centos @mariadb MariaDB-common.x86_64 10.6.4-1.el7.centos @mariadb MariaDB-compat.x86_64 10.6.4-1.el7.centos @mariadb MariaDB-devel.x86_64 10.6.4-1.el7.centos @mariadb MariaDB-server.x86_64 10.6.4-1.el7.centos @mariadb galera-4.x86_64 26.4.9-1.el7.centos @mariadb [root@localhost ~] # |
インストールパッケージの確認では、バージョン5.5も表示されていましたが最新版しかインストールされてませんね。
インストール場所の確認
下記のコマンドでインストールの場所を確認します。
which mysqld
1 2 3 | [root@localhost ~] # which mysqld /usr/sbin/mysqld [root@localhost ~] # |
usrのsbinの配下にインストールされたことが確認できますね。
MariaDB基本的な設定
起動の確認
下記のコマンドでステータスを確認します。
systemctl status mariadb
1 2 3 4 5 6 7 8 9 | [root@localhost ~] # systemctl status mariadb ● mariadb.service - MariaDB 10.6.4 database server Loaded: loaded ( /usr/lib/systemd/system/mariadb .service; disabled; vendor preset: disabled) Drop-In: /etc/systemd/system/mariadb .service.d └─migrated-from-my.cnf-settings.conf Active: inactive (dead) Docs: man :mariadbd(8) https: //mariadb .com /kb/en/library/systemd/ [root@localhost ~] # |
Active: inactive (dead) 起動されてないことが確認できましたね。
systemctl start mariadb コマンドで開始します。
1 2 3 | [root@localhost ~] # [root@localhost ~] # systemctl start mariadb [root@localhost ~] # |
systemctl status mariadb コマンドでステータスを確認します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | [root@localhost ~] # systemctl status mariadb ● mariadb.service - MariaDB 10.6.4 database server Loaded: loaded ( /usr/lib/systemd/system/mariadb .service; disabled; vendor preset: disabled) Drop-In: /etc/systemd/system/mariadb .service.d └─migrated-from-my.cnf-settings.conf Active: active (running) since 月 2021-11-08 21:09:08 JST; 6s ago Docs: man :mariadbd(8) https: //mariadb .com /kb/en/library/systemd/ Process: 1903 ExecStartPost= /bin/sh -c systemctl unset -environment _WSREP_START_POSITION (code=exited, status=0 /SUCCESS ) Process: 1880 ExecStartPre= /bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=` cd /usr/bin/ ..; /usr/bin/galera_recovery `; [ $? - eq 0 ] && systemctl set -environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0 /SUCCESS ) Process: 1878 ExecStartPre= /bin/sh -c systemctl unset -environment _WSREP_START_POSITION (code=exited, status=0 /SUCCESS ) Main PID: 1891 (mariadbd) Status: "Taking your SQL requests now..." CGroup: /system .slice /mariadb .service └─1891 /usr/sbin/mariadbd 11月 08 21:09:08 localhost.localdomain mariadbd[1891]: 2021-11-08 21:09:08 0 [Note] InnoDB: File './ibtmp1' size is no... MB. 11月 08 21:09:08 localhost.localdomain mariadbd[1891]: 2021-11-08 21:09:08 0 [Note] InnoDB: 10.6.4 started; log sequen...d 14 11月 08 21:09:08 localhost.localdomain mariadbd[1891]: 2021-11-08 21:09:08 0 [Note] Plugin 'FEEDBACK' is disabled. 11月 08 21:09:08 localhost.localdomain mariadbd[1891]: 2021-11-08 21:09:08 0 [Note] InnoDB: Loading buffer pool(s) fro...pool 11月 08 21:09:08 localhost.localdomain mariadbd[1891]: 2021-11-08 21:09:08 0 [Note] Server socket created on IP: '0.0.0.0' . 11月 08 21:09:08 localhost.localdomain mariadbd[1891]: 2021-11-08 21:09:08 0 [Note] Server socket created on IP: '::' . 11月 08 21:09:08 localhost.localdomain mariadbd[1891]: 2021-11-08 21:09:08 0 [Note] InnoDB: Buffer pool(s) load comple...9:08 11月 08 21:09:08 localhost.localdomain mariadbd[1891]: 2021-11-08 21:09:08 0 [Note] /usr/sbin/mariadbd : ready for conn...ons. 11月 08 21:09:08 localhost.localdomain mariadbd[1891]: Version: '10.6.4-MariaDB' socket: '/var/lib/mysql/mysql.sock' ...rver 11月 08 21:09:08 localhost.localdomain systemd[1]: Started MariaDB 10.6.4 database server. Hint: Some lines were ellipsized, use -l to show in full. [root@localhost ~] # |
自動起動の設定
systemctl enable mariadb コマンドで自動起動の設定ができます。
1 2 3 | [root@localhost ~] # systemctl enable mariadb Created symlink from /etc/systemd/system/multi-user .target.wants /mariadb .service to /usr/lib/systemd/system/mariadb .service. [root@localhost ~] # |
systemctl is-enabled mariadb コマンドで自動起動が設定されたことを確認
1 2 3 | [root@localhost ~] # systemctl is-enabled mariadb enabled [root@localhost ~] # |
enabledが表示されればOKです。
基本的なセキュリティの設定
mariadb-secure-installationのプログラムで必要最低限の設定ができます。
rootアカウントのパスワード設定 (26行目)
匿名ユーザの削除 (35行目)
リモートからのrootアカウント禁止 (41行目)
testデータベースの削除 (48行目)
今すぐ設定反映 (57行目)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | [root@localhost ~] # mariadb-secure-installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and haven't set the root password yet, you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password or using the unix_socket ensures that nobody can log into the MariaDB root user without the proper authorisation. You already have your root account protected, so you can safely answer 'n' . Switch to unix_socket authentication [Y /n ] y Enabled successfully! Reloading privilege tables.. ... Success! You already have your root account protected, so you can safely answer 'n' . Change the root password? [Y /n ] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users ? [Y /n ] y ... Success! Normally, root should only be allowed to connect from 'localhost' . This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y /n ] y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y /n ] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y /n ] y ... Success! Cleaning up... All done ! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! [root@localhost ~] # |
文字化け対応
server.cnfファイルを変更します。
既存のファイルをバックアップします。
cp -p /etc/my.cnf.d/server.cnf /etc/my.cnf.d/server.cnf.org
1 2 | [root@localhost ~] # cp -p /etc/my.cnf.d/server.cnf /etc/my.cnf.d/server.cnf.org [root@localhost ~] # |
viコマンドで設定を変更します。
vi /etc/my.cnf.d/server.cnf
下記の赤字の「character-set-server=utf8」を追加します。
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
# this is read by the standalone daemon and embedded servers
[server]
character-set-server=utf8
# this is only for the mysqld standalone daemon
[mysqld]
#
# * Galera-related settings
#
[galera]
# Mandatory settings
#wsrep_on=ON
#wsrep_provider=
#wsrep_cluster_address=
#binlog_format=row
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
#bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0
# this is only for embedded server
[embedded]
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
# This group is only read by MariaDB-10.6 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.6]
基本的な設定は完了しました。
設定を反映するために再起動をします。
systemctl restart mariadb
1 2 | [root@localhost ~] # systemctl restart mariadb [root@localhost ~] # |
エラーがなければ、正常に再起動されています。
systemctl status mariadb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | [root@localhost ~] # systemctl status mariadb ● mariadb.service - MariaDB 10.6.4 database server Loaded: loaded ( /usr/lib/systemd/system/mariadb .service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/mariadb .service.d └─migrated-from-my.cnf-settings.conf Active: active (running) since 月 2021-11-08 21:12:46 JST; 7s ago Docs: man :mariadbd(8) https: //mariadb .com /kb/en/library/systemd/ Process: 2015 ExecStartPost= /bin/sh -c systemctl unset -environment _WSREP_START_POSITION (code=exited, status=0 /SUCCESS ) Process: 1989 ExecStartPre= /bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=` cd /usr/bin/ ..; /usr/bin/galera_recovery `; [ $? - eq 0 ] && systemctl set -environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0 /SUCCESS ) Process: 1987 ExecStartPre= /bin/sh -c systemctl unset -environment _WSREP_START_POSITION (code=exited, status=0 /SUCCESS ) Main PID: 2003 (mariadbd) Status: "Taking your SQL requests now..." CGroup: /system .slice /mariadb .service └─2003 /usr/sbin/mariadbd 11月 08 21:12:46 localhost.localdomain mariadbd[2003]: 2021-11-08 21:12:46 0 [Note] InnoDB: File './ibtmp1' size is no... MB. 11月 08 21:12:46 localhost.localdomain mariadbd[2003]: 2021-11-08 21:12:46 0 [Note] InnoDB: 10.6.4 started; log sequen...d 14 11月 08 21:12:46 localhost.localdomain mariadbd[2003]: 2021-11-08 21:12:46 0 [Note] Plugin 'FEEDBACK' is disabled. 11月 08 21:12:46 localhost.localdomain mariadbd[2003]: 2021-11-08 21:12:46 0 [Note] InnoDB: Loading buffer pool(s) fro...pool 11月 08 21:12:46 localhost.localdomain mariadbd[2003]: 2021-11-08 21:12:46 0 [Note] Server socket created on IP: '0.0.0.0' . 11月 08 21:12:46 localhost.localdomain mariadbd[2003]: 2021-11-08 21:12:46 0 [Note] Server socket created on IP: '::' . 11月 08 21:12:46 localhost.localdomain mariadbd[2003]: 2021-11-08 21:12:46 0 [Note] InnoDB: Buffer pool(s) load comple...2:46 11月 08 21:12:46 localhost.localdomain mariadbd[2003]: 2021-11-08 21:12:46 0 [Note] /usr/sbin/mariadbd : ready for conn...ons. 11月 08 21:12:46 localhost.localdomain mariadbd[2003]: Version: '10.6.4-MariaDB' socket: '/var/lib/mysql/mysql.sock' ...rver 11月 08 21:12:46 localhost.localdomain systemd[1]: Started MariaDB 10.6.4 database server. Hint: Some lines were ellipsized, use -l to show in full. [root@localhost ~] # |
注意点
MariaDB 10.6.3以降から「mysql_secure_installation コマンドが見つかりません」と表示しますので
「mariadb-secure-installation」を利用してください。
