
MariaDBのインストールする方法ってどうやるのかな?
設定方法も分からないや。
そうだ!ふくろう先生に聞いてみよう。

ふくろう先生。こんにちは。
MariaDBをインストールする方法ってどうやればいいですか?
設定方法も分からないので教えて下さい。

ナマケモノ君。こんにちは!
今回は、MariaDBをインストール方法と環境設定だね。
わかったよ。
次の手順に従っていけば、出来るよ。
今回の最終目標
- MariaDBのインストールを完了させて標準的な設定を行います。
※今回は、CentOSのバージョン7にインストールする方法です。
用意するもの
- 今回は、CentOS7 がインストールされているPC(Server)を1台。
概要
- MariaDBをインストールします。
- インストールしたMariaDBの初期設定を行います。
作業手順
CentOSのインストールが、まだの方はこちらを参照して下さい。

step.1
まず、スパーユーザーにするよ。
su –


step.2
yumを使用してインストールするよ。
yum install mariaDB-server


step.3
インストールしていいか確認してくるので『y』を押下してね。


step.4
インストールが完了すると下記のメッセージが表示されるよ。


step.5
次は、レポジトリの設定だね。
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash


step.6
レポジトリが完了すると下記のメッセージが表示されるよ。


step.7
次に日本語が使えるように設定するよ。
今回viエディタで編集するけど、使い慣れたエディタでも大丈夫だよ。
vi /etc/my.cnf.d/server.cnf


step.8
[mariadb] セクションに以下の設定を追加してね。
最後は、:wq!で書き込み保存で終了。
character-set-server=utf8


step.9
さっもう少しで終わるよ。
サービスの有効化のコマンドを実行してね。
systemctl enable mariadb


step.10
サービスの有効化が上手くいくと下記にメッセージが表示されるよ。


step.11
最後にサービスを開始するよ。
systemctl start mariadb

Complete!!

お疲れ様でした。
これで晴れてMariaDBのインストール及び環境設定は完了です。
ナマケモノ君。出来たかな?

はい!。出来ました。
ふくろう先生、ありがとうございました。
コメント